Commit 58acca9a286711da8a48bb4deea82ee981313dd8
1 parent
1b518446
Exists in
master
and in
38 other branches
Add message feedback when create article
Showing
3 changed files
with
10 additions
and
3 deletions
Show diff stats
bower.json
@@ -25,7 +25,8 @@ | @@ -25,7 +25,8 @@ | ||
25 | "angular-filter": "~0.5.8", | 25 | "angular-filter": "~0.5.8", |
26 | "angular-deckgrid": "~0.5.0", | 26 | "angular-deckgrid": "~0.5.0", |
27 | "angular-timeline": "~1.6.2", | 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 | "devDependencies": { | 31 | "devDependencies": { |
31 | "angular-mocks": "~1.4.2" | 32 | "angular-mocks": "~1.4.2" |
src/app/cms/cms.controller.js
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | 7 | ||
8 | 8 | ||
9 | /** @ngInject */ | 9 | /** @ngInject */ |
10 | - function CmsController(noosfero, $stateParams, $httpParamSerializer, $state) { | 10 | + function CmsController(noosfero, $stateParams, $httpParamSerializer, $state, SweetAlert) { |
11 | var vm = this; | 11 | var vm = this; |
12 | vm.article = {}; | 12 | vm.article = {}; |
13 | vm.profile = null; | 13 | vm.profile = null; |
@@ -25,6 +25,12 @@ | @@ -25,6 +25,12 @@ | ||
25 | {'Content-Type':'application/json'} | 25 | {'Content-Type':'application/json'} |
26 | ).then(function(response) { | 26 | ).then(function(response) { |
27 | $state.transitionTo('main.profile.page', {page: response.data.article.path, profile: vm.profile.identifier}); | 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 +6,6 @@ | ||
6 | 'ngSanitize', 'ngMessages', 'ngAria', 'restangular', | 6 | 'ngSanitize', 'ngMessages', 'ngAria', 'restangular', |
7 | 'ui.router', 'ui.bootstrap', 'toastr', | 7 | 'ui.router', 'ui.bootstrap', 'toastr', |
8 | 'angularMoment', 'angular.filter', 'akoenig.deckgrid', | 8 | 'angularMoment', 'angular.filter', 'akoenig.deckgrid', |
9 | - 'angular-timeline', 'duScroll']); | 9 | + 'angular-timeline', 'duScroll', 'oitozero.ngSweetAlert']); |
10 | 10 | ||
11 | })(); | 11 | })(); |