From d914aab30ba0ccf75a081aa8dfcf157e8385c1e1 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 10 Jun 2016 14:16:22 -0400 Subject: [PATCH] getting changes to stick within a session Signed-off-by: Jason Etheridge --- .../js/ui/default/staff/admin/actor/org_unit/app.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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 bd24c808cb..6632bdc99e 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 @@ -37,6 +37,9 @@ function($scope , $q , $routeParams , $window , egCore , egOrg ) { function(res) { // success console.log('handler1'); window.handler1 = res; + window.sessionStorage.removeItem('eg.env.aou.tree'); + egCore.env.load(); + init(0); }, function(res) { // success console.log('handler2'); @@ -57,9 +60,18 @@ function($scope , $q , $routeParams , $window , egCore , egOrg ) { // the org tree - $scope.treedata = [ egCore.idl.toHash( egOrg.tree() ) ]; - $scope.selected = $scope.treedata[0]; // FIXME -- why no work? - $scope.expandedNodes = [ $scope.treedata[0] ]; + function init(n) { + $scope.treedata = [ egCore.idl.toHash( egOrg.tree() ) ]; + $scope.selected = $scope.treedata[0]; // FIXME -- why no work? + $scope.expandedNodes = [ $scope.treedata[0], $scope.selected ]; + } + init(1); + + window.phasefx = { + 'scope' : $scope + ,'egorg' : egOrg + ,'egcore' : egCore + }; $scope.showSelected = function(sel) { $scope.selectedNode = sel; -- 2.11.0