quick way to give hold pull list its own savable columns. really need a default...
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 03:37:47 +0000 (03:37 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Sep 2006 03:37:47 +0000 (03:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5943 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/admin/hold_pull_list_overlay.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/admin/index.xhtml
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/patron/holds.js

diff --git a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul
new file mode 100644 (file)
index 0000000..22963fd
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Patron Display -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+]>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="/xul/server/admin/hold_pull_list_overlay.xul"?>
+
+<window id="holds_win" 
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+       <!-- 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" src="/xul/server/main/JSAN.js"/>
+       <script>
+       <![CDATA[
+               function my_init() {
+                       try {
+                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+                               JSAN.errorLevel = "die"; // none, warn, or die
+                               JSAN.addRepository('/xul/server/');
+                               JSAN.use('util.error'); g.error = new util.error();
+                               g.error.sdump('D_TRACE','my_init() for holds.xul');
+
+                               g.cgi = new CGI();
+
+                               JSAN.use('patron.holds'); g.holds = new patron.holds();
+                               g.holds.init( 
+                                       { 
+                                               'tree_id' : 'holds_pull_list',
+                                               'patron_id' : g.cgi.param('patron_id'), 
+                                               'docid' : g.cgi.param('docid'),
+                                               'shelf' : g.cgi.param('shelf'),
+                                               'pull' : g.cgi.param('pull'),
+                                       } 
+                               );
+                               window.refresh = function(p) { g.holds.retrieve(p); }
+
+                               default_focus();
+
+                       } catch(E) {
+                               var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
+                                       "system administrator or software developer the following:\npatron/holds.xul\n" + E + '\n';
+                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
+                               alert(err_msg);
+                       }
+               }
+
+               function default_focus() { try { document.getElementById('holds_print').focus(); } catch(E) { } }
+
+       ]]>
+       </script>
+
+       <commandset id="holds_cmds">
+               <command id="sel_mark_items_damaged" disabled="true"/>
+               <command id="sel_mark_items_missing" disabled="true"/>
+               <command id="sel_copy_details" disabled="true"/>
+               <command id="sel_patron" disabled="true"/>
+               <command id="sel_clip" />
+               <command id="cmd_holds_print" />
+               <command id="cmd_show_catalog" />
+               <command id="cmd_retrieve_patron" />
+               <command id="cmd_show_notifications" />
+               <command id="cmd_holds_edit_pickup_lib" />
+               <command id="cmd_holds_edit_phone_notify" />
+               <command id="cmd_holds_edit_email_notify" />
+               <command id="cmd_holds_edit_selection_depth" disabled="true" hidden="true"/>
+               <command id="cmd_broken" disabled="true" hidden="true"/>
+               <command id="cmd_holds_retarget"/>
+               <command id="cmd_holds_cancel" />
+               <command id="save_columns" />
+       </commandset>
+
+       <popupset id="holds_popupset"/>
+
+       <box id="holds_main" />
+
+</window>
+
diff --git a/Open-ILS/xul/staff_client/server/admin/hold_pull_list_overlay.xul b/Open-ILS/xul/staff_client/server/admin/hold_pull_list_overlay.xul
new file mode 100644 (file)
index 0000000..7c167bc
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE overlay PUBLIC "" ""[
+       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+]>
+<overlay id="holds_overlay" 
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script>dump('loading holds_overlay.xul\n');</script>
+
+<commandset id="holds_cmds" />
+
+<popupset id="holds_popupset">
+       <popup id="holds_actions" position="at_pointer"> 
+               <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
+               <menuitem label="Show in Catalog" command="cmd_show_catalog" accesskey="S"/>
+               <menuitem command="sel_copy_details" label="Show Item Details" accesskey="I" />
+               <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
+               <menuseparator />
+               <menuitem label="Retrieve Patron" command="cmd_retrieve_patron" accesskey="P"/>
+               <menuitem label="Show Notices" command="cmd_show_notifications" accesskey="N" />
+               <menuseparator />
+               <menuitem label="Edit Pickup Library" command="cmd_holds_edit_pickup_lib" accesskey="L"/>
+               <menuitem label="Edit Phone Notification" command="cmd_holds_edit_phone_notify" accesskey="P"/>
+               <menuitem label="Toggle Email Notification" command="cmd_holds_edit_email_notify" accesskey="E"/>
+               <!--
+               <menuitem label="Edit Hold Range" command="cmd_holds_edit_selection_depth" accesskey="R"/>
+               <menuitem label="Edit Hold Focus" command="cmd_broken" accesskey="F"/>
+               -->
+               <menuseparator />
+               <menuitem command="sel_mark_items_damaged" label="Mark Item Damaged" accesskey="D"/>
+               <menuitem command="sel_mark_items_missing" label="Mark Item Missing" accesskey="M"/>
+               <menuitem label="Find Another Target" command="cmd_holds_retarget" accesskey="T"/>
+               <menuitem label="Cancel Hold" command="cmd_holds_cancel" accesskey="C"/>
+               <menuseparator />
+               <menuitem command="save_columns" label="Save Columns"/>
+       </popup>
+</popupset>
+
+
+<box id="holds_main" flex="1" orient="vertical" class="my_overflow">
+       <vbox id="cmvb1" flex="1"/>
+</box>
+
+<vbox id="cmvb1" flex="1">
+       <groupbox id="cmgb1" flex="1" orient="vertical">
+               <caption label="&staff.patron_navbar.holds;" />
+               <vbox flex="0">
+                       <hbox id="holds_top_ui" />
+               </vbox>
+               <tree id="holds_pull_list" flex="1" enableColumnDrag="true" context="holds_actions"/>
+               <vbox flex="0">
+                       <hbox id="holds_bottom_ui" />
+               </vbox>
+       </groupbox>
+</vbox>
+
+<hbox id="holds_top_ui" flex="1">
+       <vbox id="menu_placeholder" />
+       <spacer flex="1"/>
+       <menubar>
+               <menu label="Actions for Selected Holds" accesskey="S">
+                       <menupopup>
+                               <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
+                               <menuitem label="Show in Catalog" command="cmd_show_catalog"  accesskey="S"/>
+                               <menuitem command="sel_copy_details" label="Show Item Details" accesskey="I" />
+                               <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
+                               <menuseparator />
+                               <menuitem label="Retrieve Patron" command="cmd_retrieve_patron" accesskey="P"/>
+                               <menuitem label="Show Notices" command="cmd_show_notifications" accesskey="N" />
+                               <menuseparator />
+                               <menuitem label="Edit Pickup Library" command="cmd_holds_edit_pickup_lib" accesskey="L"/>
+                               <menuitem label="Edit Phone Notification" command="cmd_holds_edit_phone_notify" accesskey="P"/>
+                               <menuitem label="Toggle Email Notification" command="cmd_holds_edit_email_notify" accesskey="E" />
+                               <!--
+                               <menuitem label="Edit Hold Range" command="cmd_holds_edit_selection_depth" accesskey="R" />
+                               <menuitem label="Edit Hold Focus" command="cmd_broken" accesskey="F" />
+                               -->
+                               <menuseparator />
+                               <menuitem command="sel_mark_items_damaged" label="Mark Item Damaged" accesskey="D"/>
+                               <menuitem command="sel_mark_items_missing" label="Mark Item Missing" accesskey="M"/>
+                               <menuitem label="Find Another Target" command="cmd_holds_retarget" accesskey="T"/>
+                               <menuitem label="Cancel Hold" command="cmd_holds_cancel"  accesskey="C"/>
+                               <menuseparator />
+                               <menuitem command="save_columns" label="Save Columns"/>
+                       </menupopup>
+               </menu>
+       </menubar>
+</hbox>
+
+<hbox id="holds_bottom_ui" flex="1">
+       <spacer flex="1"/>
+       <button id="holds_print" label="Print" command="cmd_holds_print" accesskey="P" />
+</hbox>
+
+</overlay>
index 94cc73a..0f9d97a 100644 (file)
@@ -54,7 +54,7 @@
                                                        </div>
                                                </td><td>
                                                        <div style='padding: 8px;'>
-                                                               <a href='javascript:_l("../patron/holds.xul");'>Pull List for Hold Requests</a> <span style="color: red">(Testing)</span>
+                                                               <a href='javascript:_l("hold_pull_list.xul");'>Pull List for Hold Requests</a> <span style="color: red">(Testing)</span>
                                                        </div>
                                                        <div style='padding: 8px;'>
                                                                <a href='javascript:_l("cash_reports.xhtml");'>Cash Reports</a>
index 5ce24d4..285e10f 100644 (file)
@@ -848,7 +848,11 @@ circ.util.hold_columns = function(modify,params) {
                {
                        'persist' : 'hidden width ordinal', 'id' : 'patron_name', 'label' : 'Patron Name', 'flex' : 1,
                        'primary' : false, 'hidden' : true, 'render' : 'my.patron_barcode + " " + my.patron_family_name + ", " + my.patron_first_given_name;',
-               }
+               },
+               {
+                       'persist' : 'hidden width ordinal', 'id' : 'callnumber', 'label' : 'Call Number', 'flex' : 1,
+                       'primary' : false, 'hidden' : true, 'render' : 'my.acn.label()',
+               },
        ];
        for (var i = 0; i < c.length; i++) {
                if (modify[ c[i].id ]) {
index 22587b0..ab3b2d8 100644 (file)
@@ -23,6 +23,7 @@ patron.holds.prototype = {
                obj.patron_id = params['patron_id'];
                obj.docid = params['docid'];
                obj.shelf = params['shelf'];
+               obj.tree_id = params['tree_id'];
 
                JSAN.use('circ.util');
                var columns = circ.util.hold_columns( 
@@ -38,7 +39,7 @@ patron.holds.prototype = {
                        } 
                );
 
-               JSAN.use('util.list'); obj.list = new util.list('holds_list');
+               JSAN.use('util.list'); obj.list = new util.list( obj.tree_id || 'holds_list');
                obj.list.init(
                        {
                                'columns' : columns,