From: Joseph Lewis Date: Tue, 14 Jun 2011 21:46:59 +0000 (-0600) Subject: Updated so that the history shows the org-unit shortname rather than the id. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=81be7e71bdaefa41a52b7cd112b2b1accd15f709;p=working%2FEvergreen.git Updated so that the history shows the org-unit shortname rather than the id. Signed-off-by: Joseph Lewis --- diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js index 56f392f36b..02d1687fc9 100644 --- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js +++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js @@ -20,11 +20,13 @@ dojo.require('openils.widget.ProgressDialog'); dojo.require('dijit.Toolbar'); var authtoken; +var query; var contextOrg; var user; var osSettings = {}; var ouSettingValues = {}; var ouSettingNames = {}; +var ouNames = {}; var osEditAutoWidget; var osGroups = {}; var searchAssist = []; @@ -34,6 +36,7 @@ function osInit(data) { showProcessingDialog(true); authtoken = new openils.CGI().param('ses') || dojo.cookie('ses'); + query = new openils.CGI().param('filter'); user = new openils.User({authtoken:authtoken}); contextOrg = user.user.ws_ou(); openils.User.authtoken = authtoken; @@ -54,10 +57,14 @@ function osInit(data) { dojo.removeClass('no-perms', 'hide_me'); } }); + }; new openils.User().buildPermOrgSelector('VIEW_ORG_SETTINGS', osContextSelector, null, connect); + var aous = pcrud.retrieveAll('aou'); + dojo.forEach(aous, function(ou) { ouNames[ou.id()] = ou.shortname(); }); + showProcessingDialog(false); } dojo.addOnLoad(osInit); @@ -332,7 +339,7 @@ function osGetEditLink(rowIdx) { } function osFormatEditLink(name) { - return this.value.replace(/SETTING/, name); + return this.value.replace(/SETTING/g, name); } function osLaunchEditor(name) { @@ -471,7 +478,7 @@ function osLaunchHistory(name) { var thisHist = pcrud.search('coustl', {'field_name':name}); for(var i in thisHist) { data += "" + thisHist[i].date_applied() + "" + - thisHist[i].org() + "" + thisHist[i].original_value() + + ouNames[thisHist[i].org()] + "" + thisHist[i].original_value() + "" + thisHist[i].new_value() + ""; } @@ -490,9 +497,7 @@ function showAlert(message, timeout) { dojo.byId('msgInner').innerHTML = message; - var fadeArgs = { - node: "msgCont" - }; + var fadeArgs = { node: "msgCont" }; dojo.fadeIn(fadeArgs).play(); window.setTimeout('hideAlert()', timeout); @@ -500,9 +505,7 @@ function showAlert(message, timeout) { } function hideAlert() { - var fadeArgs = { - node: "msgCont" - }; + var fadeArgs = { node: "msgCont" }; dojo.fadeOut(fadeArgs).play(); dojo.addClass('msgCont', 'hidden'); } \ No newline at end of file diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml index 58ba5cc3c8..988ad21ea7 100644 --- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml @@ -29,7 +29,7 @@