From 8d6ab652779f6a6870474f4656cc0461e1964210 Mon Sep 17 00:00:00 2001 From: manuschiller Date: Tue, 22 Mar 2016 17:04:50 +0100 Subject: [PATCH] [22624] Add link to success message on work package update/create --- frontend/app/templates/components/notification-box.html | 5 ++++- frontend/app/ui_components/index.js | 2 +- frontend/app/ui_components/notification-box-directive.js | 9 ++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/app/templates/components/notification-box.html b/frontend/app/templates/components/notification-box.html index 0ab12155e6..02aa9ce9eb 100644 --- a/frontend/app/templates/components/notification-box.html +++ b/frontend/app/templates/components/notification-box.html @@ -1,6 +1,9 @@
-

{{content.message}}

+

+ {{::content.message}} + show in fullscreen view +

diff --git a/frontend/app/ui_components/index.js b/frontend/app/ui_components/index.js index 4aab85bd04..195248e58d 100644 --- a/frontend/app/ui_components/index.js +++ b/frontend/app/ui_components/index.js @@ -104,7 +104,7 @@ angular.module('openproject.uiComponents') .directive('zoomSlider', ['I18n', require('./zoom-slider-directive')]) .directive('clickNotification', ['$timeout','NotificationsService', require('./click-notification-directive')]) .directive('notifications', [require('./notifications-directive')]) - .directive('notificationBox', ['I18n', '$timeout', require('./notification-box-directive')]) + .directive('notificationBox', ['I18n', '$timeout','$state','loadingIndicator', require('./notification-box-directive')]) .directive('uploadProgress', [require('./upload-progress-directive')]) .directive('attachmentIcon', [require('./attachment-icon-directive')]) .filter('ancestorsExpanded', require('./filters/ancestors-expanded-filter')) diff --git a/frontend/app/ui_components/notification-box-directive.js b/frontend/app/ui_components/notification-box-directive.js index 45f44a90eb..ed5f79d7d4 100644 --- a/frontend/app/ui_components/notification-box-directive.js +++ b/frontend/app/ui_components/notification-box-directive.js @@ -26,17 +26,24 @@ // See doc/COPYRIGHT.rdoc for more details. //++ -module.exports = function(I18n, $timeout) { +module.exports = function(I18n, $timeout,$state,loadingIndicator) { var notificationBoxController = function(scope, element) { scope.uploadCount = 0; scope.show = false; scope.I18n = I18n; + scope.currentState = $state.current.name; + scope.canBeHidden = function() { return scope.content.uploads.length > 5; }; + scope.showFullScreen = function(){ + scope.remove(); + loadingIndicator.mainPage = $state.go.apply($state, ["work-packages.show.activity", $state.params]); + }; + scope.removable = function() { return scope.content.type !== 'upload'; };