From: phasefx Date: Mon, 11 Jul 2005 08:25:32 +0000 (+0000) Subject: various patron display components X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0e916e47cc8f669dae769a18813a2f23865834a1;p=Evergreen.git various patron display components git-svn-id: svn://svn.open-ils.org/ILS/trunk@1124 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js new file mode 100755 index 0000000000..44f52f62fc --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js @@ -0,0 +1,89 @@ +sdump('D_TRACE','Loading patron_display.js\n'); + +function patron_display_init(p) { + sdump('D_PATRON_DISPLAY',"TESTING: patron_display.js: " + mw.G['main_test_variable'] + '\n'); + sdump('D_TRACE_ENTER',arg_dump(arguments)); + + p.w.set_patron = function (au) { + return p.w._patron = au; + } + p.w.display_patron = function (au) { + if (au) p.w.set_patron(au); + if (p.w.status_w) + p.w.status_w.display_patron(au); + if (p.w.contact_w) + p.w.contact_w.display_patron(au); + return render_fm(p.w.document, { 'au' : p.w._patron }); + }; + p.w.retrieve_patron_via_barcode = function (barcode) { + if (!barcode) barcode = patron_get_barcode( p.w._patron ); + p.w.set_patron( retrieve_patron_by_barcode( barcode ) ); + return p.w.display_patron(); + } + p.w.retrieve_patron_via_id = function (id) { + p.w.set_patron( retrieve_patron_by_id( id ) ); + return p.w.display_patron(); + } + p.w.refresh = function() { + p.w.retrieve_patron_via_id( p.w._patron.id() ); + } + + if (p.patron) { + if (typeof(p.patron) == 'object') { + p.w._patron = p.patron; + p.w.display_patron(); + } else + p.w.retrieve_patron_via_barcode( p.patron ); + } + + p.w.clamshell = spawn_clamshell( + p.w.document, 'new_iframe', p.clamshell, { + 'horizontal' : true, + 'onload' : patron_display_init_after_clamshell(p) + } + ); + + + sdump('D_TRACE_EXIT',arg_dump(arguments)); + return; +} + +function patron_display_init_after_clamshell(p) { + sdump('D_PATRON_DISPLAY',arg_dump(arguments)); + return function (clamshell_w) { + p.w.inner_clamshell = spawn_clamshell_vertical( + clamshell_w.document, + 'new_iframe', + clamshell_w.first_deck, { + 'vertical' : true, + 'onload' : patron_display_init_after_inner_clamshell(p) + } + ); + + return; + }; + +} + +function patron_display_init_after_inner_clamshell(p) { + sdump('D_PATRON_DISPLAY',arg_dump(arguments)); + return function (clamshell_w) { + sdump('D_PATRON_DISPLAY',arg_dump(arguments)); + p.w.status_w = spawn_patron_display_status( + clamshell_w.document, + 'new_iframe', + clamshell_w.first_deck, { + 'patron' : p.w._patron + } + ); + p.w.contact_w = spawn_patron_display_contact( + clamshell_w.document, + 'new_iframe', + clamshell_w.second_deck, { + 'patron' : p.w._patron + } + ); + return; + }; +} + diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.xul b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.xul new file mode 100755 index 0000000000..4b73386d7e --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.xul @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact.js b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact.js new file mode 100755 index 0000000000..a3cd803394 --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact.js @@ -0,0 +1,37 @@ +sdump('D_TRACE','Loading patron_display_contact.js\n'); + +function patron_display_contact_init(p) { + sdump('D_PATRON_DISPLAY_CONTACT',"TESTING: patron_display_contact.js: " + mw.G['main_test_variable'] + '\n'); + + if (p.app_shell) p.w.app_shell = p.app_shell; + + p.w.set_patron = function (au) { + return p.w._patron = au; + } + p.w.display_patron = function (au) { + if (au) p.w.set_patron(au); + return render_fm(p.w.document, { 'au' : p.w._patron }); + }; + p.w.retrieve_patron_via_barcode = function (barcode) { + if (!barcode) barcode = patron_get_barcode( p.w._patron ); + p.w.set_patron( retrieve_patron_by_barcode( barcode ) ); + return p.w.display_patron(); + } + p.w.retrieve_patron_via_id = function (id) { + p.w.set_patron( retrieve_patron_by_id( id ) ); + return p.w.display_patron(); + } + + if (p.patron) { + if (typeof(p.patron) == 'object') { + p.w.set_patron( p.patron ); + p.w.display_patron(); + } else + p.w.retrieve_patron_via_barcode( p.patron ); + } + + sdump('D_TRACE_EXIT',arg_dump(arguments)); + return; +} + + diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact.xul b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact.xul new file mode 100755 index 0000000000..5d876b68a8 --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact.xul @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact_overlay.xul b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact_overlay.xul new file mode 100755 index 0000000000..d798d8a0eb --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_contact_overlay.xul @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_overlay.xul b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_overlay.xul new file mode 100755 index 0000000000..9206e0c172 --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display_overlay.xul @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +