Commit 58acca9a286711da8a48bb4deea82ee981313dd8

Authored by Victor Costa
1 parent 1b518446

Add message feedback when create article

bower.json
... ... @@ -25,7 +25,8 @@
25 25 "angular-filter": "~0.5.8",
26 26 "angular-deckgrid": "~0.5.0",
27 27 "angular-timeline": "~1.6.2",
28   - "angular-scroll": "~1.0.0"
  28 + "angular-scroll": "~1.0.0",
  29 + "ngSweetAlert": "angular-sweetalert#~1.1.0"
29 30 },
30 31 "devDependencies": {
31 32 "angular-mocks": "~1.4.2"
... ...
src/app/cms/cms.controller.js
... ... @@ -7,7 +7,7 @@
7 7  
8 8  
9 9 /** @ngInject */
10   - function CmsController(noosfero, $stateParams, $httpParamSerializer, $state) {
  10 + function CmsController(noosfero, $stateParams, $httpParamSerializer, $state, SweetAlert) {
11 11 var vm = this;
12 12 vm.article = {};
13 13 vm.profile = null;
... ... @@ -25,6 +25,12 @@
25 25 {'Content-Type':'application/json'}
26 26 ).then(function(response) {
27 27 $state.transitionTo('main.profile.page', {page: response.data.article.path, profile: vm.profile.identifier});
  28 + SweetAlert.swal({
  29 + title: "Good job!",
  30 + text: "Article saved!",
  31 + type: "success",
  32 + timer: 1000
  33 + });
28 34 });
29 35 }
30 36  
... ...
src/app/index.module.js
... ... @@ -6,6 +6,6 @@
6 6 'ngSanitize', 'ngMessages', 'ngAria', 'restangular',
7 7 'ui.router', 'ui.bootstrap', 'toastr',
8 8 'angularMoment', 'angular.filter', 'akoenig.deckgrid',
9   - 'angular-timeline', 'duScroll']);
  9 + 'angular-timeline', 'duScroll', 'oitozero.ngSweetAlert']);
10 10  
11 11 })();
... ...