diff --git a/example/notifications/src/NotificationLaunchController.js b/example/notifications/src/NotificationLaunchController.js index 17c448e598..ae07f3fa62 100644 --- a/example/notifications/src/NotificationLaunchController.js +++ b/example/notifications/src/NotificationLaunchController.js @@ -79,30 +79,34 @@ define( * periodically, tracking an ongoing process. */ $scope.newProgress = function () { + let progress = 0; var notificationModel = { title: "Progress notification example", severity: "info", - progress: 0, + progress: progress, actionText: getExampleActionText() }; + let notification; /** * Simulate an ongoing process and update the progress bar. * @param notification */ function incrementProgress() { - notificationModel.progress = Math.min(100, Math.floor(notificationModel.progress + Math.random() * 30)); - notificationModel.progressText = ["Estimated time" + + progress = Math.min(100, Math.floor(progress + Math.random() * 30)) + let progressText = ["Estimated time" + " remaining:" + - " about ", 60 - Math.floor((notificationModel.progress / 100) * 60), " seconds"].join(" "); - if (notificationModel.progress < 100) { + " about ", 60 - Math.floor((progress / 100) * 60), " seconds"].join(" "); + notification.progress(progress, progressText); + + if (progress < 100) { $timeout(function () { incrementProgress(notificationModel); }, 1000); } } - notificationService.notify(notificationModel); + notification = notificationService.notify(notificationModel); incrementProgress(); }; diff --git a/platform/commonUI/dialog/res/templates/message.html b/platform/commonUI/dialog/res/templates/message.html index 50124f8a71..4a41f43a69 100644 --- a/platform/commonUI/dialog/res/templates/message.html +++ b/platform/commonUI/dialog/res/templates/message.html @@ -2,31 +2,14 @@ ng-class="'message-severity-' + ngModel.severity">
diff --git a/platform/commonUI/general/res/templates/progress-bar.html b/platform/commonUI/general/res/templates/progress-bar.html index fefaff22d3..69883ed7ec 100644 --- a/platform/commonUI/general/res/templates/progress-bar.html +++ b/platform/commonUI/general/res/templates/progress-bar.html @@ -1,10 +1,10 @@ -