From: Jason Etheridge Date: Fri, 10 Jun 2016 18:16:22 +0000 (-0400) Subject: getting changes to stick within a session X-Git-Tag: sprint4-merge-nov22~161 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d914aab30ba0ccf75a081aa8dfcf157e8385c1e1;p=working%2FEvergreen.git getting changes to stick within a session Signed-off-by: Jason Etheridge --- 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;