Roberto Sánchez
2014-01-16 8f97df85eefe4d648f2002b8d68818ef6020c2df
securis/src/main/resources/static/js/admin.js
....@@ -1,7 +1,7 @@
11 (function() {
22 'use strict';
33
4
- var app = angular.module('app', [ 'ngRoute', 'ngResource', 'toaster', 'localytics.directives', 'catalogs' ]);
4
+ var app = angular.module('securis');
55
66 var HTTP_ERRORS = {
77 403: "Forbidden action",
....@@ -28,7 +28,7 @@
2828 };
2929 });
3030
31
- app.controller('CatalogsCtrl', [
31
+ app.controller('AdminCtrl', [
3232 '$scope',
3333 '$http',
3434 'toaster',
....@@ -87,7 +87,7 @@
8787 toaster.pop('success', Catalogs.getName(), "Element deleted successfully");
8888 },function(error) {
8989 console.log(error);
90
- toaster.pop('error', Catalogs.getName(), "Error deleting element, reason: " + HTTP_ERRORS[error.status] + ". Details: " + error.headers('X-SECURIS-ERROR'), 12000);
90
+ toaster.pop('error', Catalogs.getName(), "Error deleting element, reason: " + HTTP_ERRORS[error.status] + ". Details: " + error.headers('X-SECURIS-ERROR'), 10000);
9191 });
9292 }
9393 });
....@@ -153,7 +153,7 @@
153153 toaster.pop('success', Catalogs.getName(), "Element saved successfully");
154154 }, function(error) {
155155 console.log(error);
156
- toaster.pop('error', Catalogs.getName(), "Error saving element, reason: " + HTTP_ERRORS[error.status] + ". Details: " + error.headers('X-SECURIS-ERROR'), 12000);
156
+ toaster.pop('error', Catalogs.getName(), "Error saving element, reason: " + HTTP_ERRORS[error.status] + ". Details: " + error.headers('X-SECURIS-ERROR'), 10000);
157157 });
158158
159159 }