|
@@ -1579,14 +1579,21 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
}
|
|
|
$modal.open({
|
|
$modal.open({
|
|
|
templateUrl: 'static/tpl/index/home/modal/notice.html',
|
|
templateUrl: 'static/tpl/index/home/modal/notice.html',
|
|
|
- controller: 'NotifyCtrl',
|
|
|
|
|
- size: 'lg'
|
|
|
|
|
|
|
+ controller: 'NotifyCtrl'
|
|
|
}).result.then(function (s) {
|
|
}).result.then(function (s) {
|
|
|
});
|
|
});
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
- app.controller('NotifyCtrl', ['$scope', '$modalInstance',
|
|
|
|
|
- function($scope, $modalInstance) {
|
|
|
|
|
|
|
+ app.controller('NotifyCtrl', ['$scope', '$modalInstance', '$interval', function($scope, $modalInstance, $interval) {
|
|
|
|
|
+ $scope.count = 5;
|
|
|
|
|
+ $scope.intervalTime = $interval(function () {
|
|
|
|
|
+ $scope.count--;
|
|
|
|
|
+ if ($scope.count === 0) {
|
|
|
|
|
+ $scope.lockstatus = false;
|
|
|
|
|
+ $interval.cancel($scope.intervalTime)
|
|
|
|
|
+ $scope.close()
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 1000);
|
|
|
$scope.close = function() {
|
|
$scope.close = function() {
|
|
|
$modalInstance.close();
|
|
$modalInstance.close();
|
|
|
}
|
|
}
|