'If enabled and a patron has outstanding bills and the alert page is not required, show the billing tab by default, instead of the checkout tab, when a patron is loaded',
'bool' ),
-( 'ui.circ.patron_display_timeout_interval',
- 'GUI: Patron display timeout interval',
- 'Set this if you would like patron displays in the staff client to be closed after a certain interval of inactivity. Example ''5 minutes''',
- 'interval' ),
+( 'ui.general.idle_timeout',
+ 'GUI: Idle timeout',
+ 'If you want staff client windows to be minimized after a certain amount of system idle time, set this to the number of seconds of idle time that you want to allow before minimizing (requires staff client restart).',
+ 'integer' ),
( 'ui.circ.in_house_use.entry_cap',
'GUI: Record In-House Use: Maximum # of uses allowed per entry.',
--- /dev/null
+-- Correct the description of the org unit setting to match its use.
+
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0076'); -- senator
+
+DELETE FROM config.org_unit_setting_type WHERE name = 'ui.circ.patron_display_timeout_interval';
+
+INSERT INTO config.org_unit_setting_type
+ (name, label, description, datatype) VALUES
+ ('ui.general.idle_timeout', 'GUI: Idle timeout', 'If you want staff client windows to be minimized after a certain amount of system idle time, set this to the number of seconds of idle time that you want to allow before minimizing (requires staff client restart).', 'integer');
+
+COMMIT;
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<!-- BEHAVIOR -->
- <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
- <scripts id="openils_util_scripts"/>
+ <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {}; var idleService = null; var idleObserver = null;</script>
+ <scripts id="openils_util_scripts"/>
<script type="text/javascript" src="JSAN.js"/>
<script type="text/javascript" src="constants.js"/>
<script type="text/javascript" src="../OpenILS/util/fmall.js"/>
<script type="text/javascript">
<![CDATA[
+ function setup_idle_observer(delay) {
+ dump("will minimize after " + delay + " idle seconds\n");
+ idleService = Components.classes[
+ "@mozilla.org/widget/idleservice;1"
+ ].getService(Components.interfaces.nsIIdleService);
+ idleObserver = {
+ observe: function(subject, topic, data) {
+ if (topic == "idle") {
+ window.minimize();
+ dump("minimizing window; subject: " + subject +
+ ", topic: " + topic +
+ ", data: " + data + "\n");
+ }
+ }
+ };
+ idleService.addIdleObserver(idleObserver, delay); // seconds
+ // You could remove the IdleObserver with the following line...
+ // idleService.removeIdleObserver(idleObserver, delay);
+ // ... but why would we?
+ }
function my_init() {
try {
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(document.getElementById('offlineStrings').getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
document.title = g.window.appshell_name_increment() + ': ' + g.data.list.au[0].usrname() + '@' + g.data.ws_name + '.' + g.data.server_unadorned;
+ var delay = g.data.hash.aous["ui.general.idle_timeout"];
+ if (delay) setup_idle_observer(delay);
} catch(E) {
var err_msg = document.getElementById("offlineStrings").getFormattedString("common.exception", ["menu_frame.xul", E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }