var ORG_SETTINGS = {
- 'circ.lost_materials_processing_fee' : null,
- 'cat.default_item_price' : null,
- 'circ.collections_fee' : null
+ 'circ.lost_materials_processing_fee' : null,
+ 'cat.default_item_price' : null,
+ 'circ.collections_fee' : null,
+ 'auth.opac_timeout' : null,
};
function osEditorInit() {
setSelector( selector, gotoOrg );
}
+ for( var i in ORG_SETTINGS )
+ osSetCallback(i);
+
return gotoOrg;
}
+function osSetCallback(setting) {
+ $(setting+'.apply_all').onclick = function() { osUpdate(setting, true); };
+ $(setting+'.apply').onclick = function() { osUpdate(setting, false); };
+}
+
function osDrawRange() {
return m;
}
+function osUpdate( setting, allOrgs ) {
+ var val = ORG_SETTINGS[setting].value;
+ var org = osCurrentOrg();
+
+ if(allOrgs) {
+
+ } else {
+ osUpdateOrg(setting, val, org);
+ }
+
+ osDrawRange();
+}
+
+function osUpdateOrg( setting, value, org ) {
+ var s = {};
+ s[setting] = value;
+ var req = new Request(ORG_SETTING_UPDATE, SESSION, org, s);
+ req.send(true);
+ var resp = req.result();
+
+ alert(js2JSON(resp));
+
+ if( checkILSEvent(resp) ) {
+ alertILSEvent(resp);
+ return false;
+ }
+
+ return true;
+}
+
+
</thead>
<tbody id='os_tbody'>
<tr>
+ <td>OPAC Inactivity Timeout (in seconds)</td>
+ <td><input type='text' id='auth.opac_timeout' size='5'/></td>
+ <td><button id='auth.opac_timeout.apply'>Apply</button></td>
+ <td><button id='auth.opac_timeout.apply_all'>Apply to all Locations</button></td>
+ </tr>
+ <tr>
<td>Lost Materials Processing Fee</td>
- <td>$<input ismoney='1' type='text' id='circ.lost_materials_processing_fee' value='0.00'/></td>
+ <td>$<input ismoney='1' type='text' id='circ.lost_materials_processing_fee' size='5'/></td>
<td><button id='circ.lost_materials_processing_fee.apply'>Apply</button></td>
<td><button id='circ.lost_materials_processing_fee.apply_all'>Apply to all Locations</button></td>
</tr>
<tr>
<td>Default Item Price</td>
- <td>$<input ismoney='1' type='text' id='cat.default_item_price' value='0.00'/></td>
+ <td>$<input ismoney='1' type='text' id='cat.default_item_price' size='5'/></td>
<td><button id='cat.default_item_price.apply'>Apply</button></td>
<td><button id='cat.default_item_price.apply_all'>Apply to all Locations</button></td>
</tr>
<tr>
<td>Collections Fee</td>
- <td>$<input ismoney='1' type='text' id='circ.collections_fee' value='0.00'/></td>
+ <td>$<input ismoney='1' type='text' id='circ.collections_fee' size='5'/></td>
<td><button id='circ.collections_fee.apply'>Apply</button></td>
<td><button id='circ.collections_fee.apply_all'>Apply to all Locations</button></td>
</tr>
</tbody>
</table>
+ <br/>
+ <div style='font-size: 9pt;'>
+ <div>
+ I. "Apply to all Locations" will force the new setting
+ to be applied to all locations in the location dropdown.
+ </div>
+ </div>
</center>
</body>
</html>