Notification on created work package

pull/3778/head
Oliver Günther 9 years ago
parent 64819caa14
commit d07b40445f
  1. 6
      frontend/app/components/inplace-edit/directives/edit-actions-bar/edit-actions-bar.directive.js
  2. 7
      frontend/app/components/inplace-edit/services/editable-fields-state.service.js

@ -43,7 +43,7 @@ function editActionsBar() {
bindToController: true,
controllerAs: 'vm',
controller: function ($scope, I18n, EditableFieldsState) {
controller: function ($scope, I18n, EditableFieldsState, NotificationsService) {
var vm = this;
angular.extend(vm, {
@ -52,7 +52,9 @@ function editActionsBar() {
},
save: function () {
EditableFieldsState.save();
EditableFieldsState.save().then(function() {
NotificationsService.addSuccess(I18n.t('js.notice_successful_create'));
});
},
cancel: function () {

@ -49,7 +49,9 @@ function EditableFieldsState($q, $rootScope, $window) {
},
save: function () {
var promises = [];
var promises = [],
deferred = $q.defer();
angular.forEach(this.submissionPromises, function(field) {
var p = field.thePromise.call(this);
promises[field.prepend ? 'unshift' : 'push' ](p);
@ -61,7 +63,10 @@ function EditableFieldsState($q, $rootScope, $window) {
this.submissionPromises = {};
this.currentField = null;
this.editAll.stop();
deferred.resolve();
}));
return deferred.promise;
},
discard: function (fieldName) {

Loading…
Cancel
Save