dojo.require('dijit.Toolbar');
var authtoken;
+var query;
var contextOrg;
var user;
var osSettings = {};
var ouSettingValues = {};
var ouSettingNames = {};
+var ouNames = {};
var osEditAutoWidget;
var perm_codes = {};
var osGroups = {};
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;
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);
}
function osFormatEditLink(name) {
- return this.value.replace(/SETTING/, name);
+ return this.value.replace(/SETTING/g, name);
}
function osLaunchEditor(name) {
var thisHist = pcrud.search('coustl', {'field_name':name});
for(var i in thisHist) {
data += "<tr><td>" + thisHist[i].date_applied() + "</td><td>" +
- thisHist[i].org() + "</td><td>" + thisHist[i].original_value() +
+ ouNames[thisHist[i].org()] + "</td><td>" + thisHist[i].original_value() +
"</td><td>" + thisHist[i].new_value() + "</td></tr>";
}
dojo.byId('msgInner').innerHTML = message;
- var fadeArgs = {
- node: "msgCont"
- };
+ var fadeArgs = { node: "msgCont" };
dojo.fadeIn(fadeArgs).play();
window.setTimeout('hideAlert()', timeout);
}
function hideAlert() {
- var fadeArgs = {
- node: "msgCont"
- };
+ var fadeArgs = { node: "msgCont" };
dojo.fadeOut(fadeArgs).play();
dojo.addClass('msgCont', 'hidden');
}
<script type="text/javascript" src='org_unit_settings.js' />
<script type="text/javascript" src="/xul/server/util/clipboard.js" />
<style type="text/css">
- h1 {
+ h2 {
display:inline;
padding:5px;
}
<div dojoType='dijit.layout.LayoutContainer' orientation='vertical' class='tall'>
<div dojoType='dijit.layout.ContentPane' layoutAlign='top'>
<div id="toolbar1" dojoType="dijit.Toolbar">
- <strong>&staff.server.admin.org_unit_settings.title;</strong>
+ <h2>&staff.server.admin.org_unit_settings.title;</h2>
<span dojoType="dijit.ToolbarSeparator" />
{name: '&staff.server.admin.org_unit_settings.group;', get: osGetGridData, field:'grp'},
{name: '&staff.server.admin.org_unit_settings.setting;', get: osGetGridData, field:'label', width:'auto', styles:'text-align:left;'},
{name: '&staff.server.admin.org_unit_settings.context;', get: osGetGridData, field:'context'},
- {name: '&staff.server.admin.org_unit_settings.value;', get: osGetGridData, field:'value', width:'auto'},
+ {name: '&staff.server.admin.org_unit_settings.value;', get: osGetGridData, field:'value'},
]]
}];
</script>