From 4e911171a113e5d7562ed998229f108a9120badc Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 11 Jul 2016 10:20:43 -0400 Subject: [PATCH] toast, comments, logging Signed-off-by: Jason Etheridge --- .../templates/staff/admin/actor/org_unit/index.tt2 | 6 ++++++ .../staff/admin/actor/org_unit/t_main_tab.tt2 | 2 +- .../ui/default/staff/admin/actor/org_unit/app.js | 25 ++++++++++++---------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Open-ILS/src/templates/staff/admin/actor/org_unit/index.tt2 b/Open-ILS/src/templates/staff/admin/actor/org_unit/index.tt2 index 8959e196a1..39a51ee0be 100644 --- a/Open-ILS/src/templates/staff/admin/actor/org_unit/index.tt2 +++ b/Open-ILS/src/templates/staff/admin/actor/org_unit/index.tt2 @@ -7,6 +7,12 @@ [% BLOCK APP_JS %] + [% END %] diff --git a/Open-ILS/src/templates/staff/admin/actor/org_unit/t_main_tab.tt2 b/Open-ILS/src/templates/staff/admin/actor/org_unit/t_main_tab.tt2 index 11134b7d11..234389309f 100644 --- a/Open-ILS/src/templates/staff/admin/actor/org_unit/t_main_tab.tt2 +++ b/Open-ILS/src/templates/staff/admin/actor/org_unit/t_main_tab.tt2 @@ -36,7 +36,7 @@
- + [% l('NOTE: A server-side "autogen" process is needed to complete updates to the Org Hierarchy.') %]
diff --git a/Open-ILS/web/js/ui/default/staff/admin/actor/org_unit/app.js b/Open-ILS/web/js/ui/default/staff/admin/actor/org_unit/app.js index 6d2ebc8ca7..24b62268d9 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/actor/org_unit/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/actor/org_unit/app.js @@ -1,5 +1,12 @@ angular.module('egOrgUnitApp', - ['ngRoute', 'ui.bootstrap', 'treeControl', 'egCoreMod', 'egUiMod']) + ['ngRoute', 'ui.bootstrap', 'treeControl', 'egCoreMod', 'egUiMod', 'ngToast']) + +.config(['ngToastProvider', function(ngToastProvider) { + ngToastProvider.configure({ + verticalPosition: 'bottom', + animation: 'fade' + }); +}]) .config(function($routeProvider, $locationProvider, $compileProvider) { $locationProvider.html5Mode(true); @@ -24,8 +31,8 @@ angular.module('egOrgUnitApp', }) .controller('OrgUnitCtrl', - ['$scope','$q','$routeParams','$window','egCore','egOrg', -function($scope , $q , $routeParams , $window , egCore , egOrg ) { + ['$scope','$q','$routeParams','$window','egCore','egOrg','ngToast', +function($scope , $q , $routeParams , $window , egCore , egOrg , ngToast ) { $scope.reset = function() { $scope.org = angular.copy($scope.selectedNode); @@ -92,19 +99,15 @@ function($scope , $q , $routeParams , $window , egCore , egOrg ) { new_org.phone( $scope.org.phone ); egCore.pcrud.update(new_org).then( function(res) { // success - console.log('handler1'); - window.handler1 = res; window.sessionStorage.removeItem('eg.env.aou.tree'); egCore.env.load(); init(0); + ngToast.create(egCore.strings.ORG_UPDATE_SUCCESS); }, - function(res) { // success - console.log('handler2'); - window.handler2 = res; + function(res) { // failure + ngToast.create(egCore.strings.ORG_UPDATE_FAILURE); }, - function(res) { // error - console.log('handler3'); - window.handler3 = res; + function(res) { // progress } ); }; -- 2.11.0