[22624] Add link to success message on work package update/create

pull/4251/head
manuschiller 9 years ago
parent 4db66586f8
commit 8d6ab65277
  1. 5
      frontend/app/templates/components/notification-box.html
  2. 2
      frontend/app/ui_components/index.js
  3. 9
      frontend/app/ui_components/notification-box-directive.js

@ -1,6 +1,9 @@
<div class="notification-box{{' -' + content.type}}" tabindex="0" aria-atomic="true">
<div class="notification-box--content">
<p>{{content.message}}</p>
<p>
<span>{{::content.message}}</span>
<a ng-click="showFullScreen()" ng-if="currentState !== 'work-packages.new'">show in fullscreen view</a>
</p>
<div data-ng-switch="content.type" data-ng-if="typeable()">
<div data-ng-switch-when="upload">
<div data-ng-show="canBeHidden()">

@ -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'))

@ -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';
};

Loading…
Cancel
Save