[open-ils-commits] r11142 - in branches/rel_1_4/Open-ILS: web/js/dojo/openils xul/staff_client/server/admin
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 11 15:12:02 EST 2008
Author: erickson
Date: 2008-11-11 15:11:58 -0500 (Tue, 11 Nov 2008)
New Revision: 11142
Modified:
branches/rel_1_4/Open-ILS/web/js/dojo/openils/User.js
branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
Log:
fixed a description dtd. when we draw the edit dialog, load the existing setting from the grid. allow for a selected org in the filtering select perm drawer
Modified: branches/rel_1_4/Open-ILS/web/js/dojo/openils/User.js
===================================================================
--- branches/rel_1_4/Open-ILS/web/js/dojo/openils/User.js 2008-11-11 20:10:22 UTC (rev 11141)
+++ branches/rel_1_4/Open-ILS/web/js/dojo/openils/User.js 2008-11-11 20:11:58 UTC (rev 11142)
@@ -233,7 +233,7 @@
* @param perm The permission to check
* @param selector The pre-created dijit.form.FilteringSelect object.
*/
- buildPermOrgSelector : function(perm, selector) {
+ buildPermOrgSelector : function(perm, selector, selectedOrg) {
var _u = this;
dojo.require('dojo.data.ItemFileReadStore');
@@ -241,7 +241,10 @@
function hookupStore(store) {
selector.store = store;
selector.startup();
- selector.setValue(_u.user.ws_ou());
+ if(selectedOrg != null)
+ selector.setValue(selectedOrg);
+ else
+ selector.setValue(_u.user.ws_ou());
}
function buildTreePicker(orgList) {
Modified: branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
===================================================================
--- branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js 2008-11-11 20:10:22 UTC (rev 11141)
+++ branches/rel_1_4/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js 2008-11-11 20:11:58 UTC (rev 11142)
@@ -155,7 +155,7 @@
function osLaunchEditor(name) {
osEditDialog._osattr = name;
osEditDialog.show();
- user.buildPermOrgSelector('UPDATE_ORG_UNIT_SETTING.' + name, osEditContextSelector);
+ user.buildPermOrgSelector('UPDATE_ORG_UNIT_SETTING.' + name, osEditContextSelector, osSettings[name].context);
dojo.byId('os-edit-name').innerHTML = osSettings[name].label;
dojo.byId('os-edit-desc').innerHTML = osSettings[name].desc || '';
@@ -164,19 +164,23 @@
dojo.style(osEditNumberTextBox.domNode, 'display', 'none');
dojo.style(osEditBoolSelect.domNode, 'display', 'none');
+ var widget;
switch(osSettings[name].type) {
case 'number':
- dojo.style(osEditNumberTextBox.domNode, 'display', 'block');
+ widget = osEditNumberTextBox;
break;
case 'currency':
- dojo.style(osEditCurrencyTextBox.domNode, 'display', 'block');
+ widget = osEditCurrencyTextBox;
break;
case 'bool':
- dojo.style(osEditBoolSelect.domNode, 'display', 'block');
+ widget = osEditBoolSelect;
break;
default:
- dojo.style(osEditTextBox.domNode, 'display', 'block');
+ widget = osEditTextBox;
}
+
+ dojo.style(widget.domNode, 'display', 'block');
+ widget.setValue(osSettings[name].value);
}
function osEditSetting(deleteMe) {
More information about the open-ils-commits
mailing list