From 7182617b8d37f8a3aca18ffb79f3e676b8c7241c Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 29 Jan 2009 08:53:35 +0000 Subject: [PATCH] experimental horizontal interface for patron summary git-svn-id: svn://svn.open-ils.org/ILS/branches/staff-client-experiment@12009 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 + .../staff_client/chrome/content/OpenILS/data.js | 18 +- .../staff_client/chrome/content/main/constants.js | 1 + .../server/admin/org_unit_settings.xhtml | 7 +- Open-ILS/xul/staff_client/server/patron/display.js | 10 +- .../staff_client/server/patron/display_overlay.xul | 17 +- .../xul/staff_client/server/patron/summary.xul | 24 ++- .../server/patron/summary_overlay_horiz.xul | 236 +++++++++++++++++++++ 8 files changed, 294 insertions(+), 21 deletions(-) create mode 100644 Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 2ee0ed991f..27e523ca45 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2645,3 +2645,5 @@ + + diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index 1a60bed18a..2445af3da7 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -638,7 +638,23 @@ OpenILS.data.prototype = { } ); - // Do this after we get the user object + // Do these after we get the user object + + this.chain.push( + function() { + try { + var robj = obj.network.simple_request('FM_AOUS_RETRIEVE',[ obj.list.au[0].ws_ou() ]); + if (typeof robj.ilsevent != 'undefined') throw(robj); + obj.hash.aous = robj; + obj.data_progress('Retrieved org unit settings. '); + } catch(E) { + var error = 'Error: ' + js2JSON(E); + obj.error.sdump('D_ERROR',error); + throw(E); + } + } + ); + this.chain.push( function() { diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 5d20703a3e..1eceed1217 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -105,6 +105,7 @@ const api = { 'FM_AOU_RETRIEVE_RELATED_VIA_SESSION' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_unit.full_path.retrieve' }, 'FM_AOU_IDS_RETRIEVE_VIA_RECORD_ID' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.actor.org_unit.retrieve_by_title', 'secure' : false }, 'FM_AOU_IDS_RETRIEVE_VIA_RECORD_ID.authoritative' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.actor.org_unit.retrieve_by_title.authoritative', 'secure' : false }, + 'FM_AOUS_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_unit.settings.retrieve', 'secure' : false }, 'FM_AOUT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_types.retrieve', 'secure' : false }, 'FM_ASC_BATCH_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.stat_cat.asset.retrieve.batch', 'secure' : false }, 'FM_ASC_RETRIEVE_VIA_AOU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.stat_cat.asset.retrieve.all', 'secure' : false }, 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 eef3ff90c0..e9a975b68c 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 @@ -135,7 +135,12 @@ label : '&staff.server.admin.org_settings.patron.password.use_phone;', desc : '&staff.server.admin.org_settings.patron.password.use_phone.desc;', type : 'bool' - } + }, + 'ui.circ.patron_summary.horizontal' : { + label : '&ui.circ.patron_summary.horizontal;', + desc : '&ui.circ.patron_summary.horizontal.desc;', + type : 'bool' + } }; diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 71aefba2dd..8e8ba01e2f 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -26,13 +26,17 @@ patron.display.prototype = { JSAN.use('OpenILS.data'); this.OpenILS = {}; obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'}); - + + var horizontal_interface = String( obj.OpenILS.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == '1'; + document.getElementById('ui.circ.patron_summary.horizontal').setAttribute('orient', horizontal_interface ? 'vertical' : 'horizontal'); + document.getElementById('pdms1').setAttribute('orient', horizontal_interface ? 'vertical' : 'horizontal'); + JSAN.use('util.deck'); obj.right_deck = new util.deck('patron_right_deck'); obj.left_deck = new util.deck('patron_left_deck'); function spawn_checkout_interface() { - try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_checkout" ) ); } catch(E) {}; + try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_checkout" ) ); } catch(E) {}; obj.reset_nav_styling('cmd_patron_checkout'); var frame = obj.right_deck.set_iframe( urls.XUL_CHECKOUT, @@ -196,7 +200,7 @@ patron.display.prototype = { function spawn_search(s) { obj.error.sdump('D_TRACE', $("commonStrings").getFormattedString('staff.patron.display.cmd_patron_edit.edit_search', [js2JSON(s)]) ); - obj.data.stash_retrieve(); + obj.OpenILS.data.stash_retrieve(); var loc = xulG.url_prefix(urls.XUL_PATRON_DISPLAY); //loc += '?doit=1&query=' + window.escape(js2JSON(s)); xulG.new_tab( loc, {}, { 'doit' : 1, 'query' : s } ); diff --git a/Open-ILS/xul/staff_client/server/patron/display_overlay.xul b/Open-ILS/xul/staff_client/server/patron/display_overlay.xul index e02630df6a..66e104200a 100644 --- a/Open-ILS/xul/staff_client/server/patron/display_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/display_overlay.xul @@ -32,14 +32,15 @@