some Copy to Clipboard holdouts
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Aug 2006 12:19:43 +0000 (12:19 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Aug 2006 12:19:43 +0000 (12:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5418 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/holds.xul
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
Open-ILS/xul/staff_client/server/patron/items.js
Open-ILS/xul/staff_client/server/patron/items.xul
Open-ILS/xul/staff_client/server/patron/items_overlay.xul

index eaed2e2..43e8a5c 100644 (file)
@@ -97,6 +97,7 @@ patron.holds.prototype = {
                                'on_select' : function(ev) {
                                        JSAN.use('util.functional');
                                        var sel = obj.list.retrieve_selection();
+                                       obj.controller.view.sel_clip.setAttribute('disabled',sel.length < 1);
                                        obj.retrieve_ids = util.functional.map_list(
                                                sel,
                                                function(o) { return JSON2js( o.getAttribute('retrieve_id') ); }
@@ -131,6 +132,10 @@ patron.holds.prototype = {
                obj.controller.init(
                        {
                                'control_map' : {
+                                       'sel_clip' : [
+                                               ['command'],
+                                               function() { obj.list.clipboard(); }
+                                       ],
                                        'cmd_broken' : [
                                                ['command'],
                                                function() { alert('Not Yet Implemented'); }
index 8dc2038..49a81c2 100644 (file)
@@ -65,6 +65,7 @@
        </script>
 
        <commandset id="holds_cmds">
+               <command id="sel_clip" />
                <command id="cmd_holds_print" />
                <command id="cmd_show_catalog" />
                <command id="cmd_retrieve_patron" />
index e3fdf85..9c4cbc3 100644 (file)
@@ -11,6 +11,7 @@
 
 <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 label="Retrieve Patron" command="cmd_retrieve_patron" accesskey="P"/>
                <menuitem label="Show Notices" command="cmd_show_notifications" accesskey="N" />
@@ -49,6 +50,7 @@
        <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 label="Retrieve Patron" command="cmd_retrieve_patron" accesskey="P"/>
                                <menuitem label="Show Notices" command="cmd_show_notifications" accesskey="N" />
index e8abab6..98f06fb 100644 (file)
@@ -23,6 +23,8 @@ patron.items.prototype = {
                        {
                                'control_map' : {
                                        'cmd_broken' : [ ['command'], function() { alert('Not Yet Implemented'); } ],
+                                       'sel_clip' : [ ['command'], function() { obj.list.clipboard(); } ],
+                                       'sel_clip2' : [ ['command'], function() { obj.list2.clipboard(); } ],
                                        'cmd_items_print' : [ ['command'], function() { obj.items_print(1); } ],
                                        'cmd_items_print2' : [ ['command'], function() { obj.items_print(2); } ],
                                        'cmd_items_renew' : [ ['command'], function() { obj.items_renew(1); } ],
@@ -47,6 +49,8 @@ patron.items.prototype = {
 
                obj.retrieve();
 
+               obj.controller.view.sel_clip.setAttribute('disabled','true');
+               obj.controller.view.sel_clip2.setAttribute('disabled','true');
                obj.controller.view.cmd_items_claimed_returned.setAttribute('disabled','true');
                obj.controller.view.cmd_items_renew.setAttribute('disabled','true');
                obj.controller.view.cmd_items_checkin.setAttribute('disabled','true');
@@ -547,6 +551,7 @@ patron.items.prototype = {
                                'on_select' : function(ev) {
                                        JSAN.use('util.functional');
                                        var sel = obj.list.retrieve_selection();
+                                       obj.controller.view.sel_clip.setAttribute('disabled',sel.length < 1);
                                        var list = util.functional.map_list(
                                                sel,
                                                function(o) { return JSON2js( o.getAttribute('retrieve_id') ); }
@@ -573,6 +578,7 @@ patron.items.prototype = {
                                'on_select' : function(ev) {
                                        JSAN.use('util.functional');
                                        var sel = obj.list2.retrieve_selection();
+                                       obj.controller.view.sel_clip2.setAttribute('disabled',sel.length < 1);
                                        var list = util.functional.map_list(
                                                sel,
                                                function(o) { return JSON2js( o.getAttribute('retrieve_id') ); }
index 1853d06..a999798 100644 (file)
@@ -64,6 +64,7 @@
        </script>
 
        <commandset id="items_cmds">
+               <command id="sel_clip" />
                <command id="cmd_items_print" />
                <command id="cmd_items_renew" />
                <command id="cmd_items_renew_all" />
@@ -76,6 +77,7 @@
                
                <command id="cmd_show_noncats" />
 
+               <command id="sel_clip2" />
                <command id="cmd_items_print2" />
                <command id="cmd_items_renew2" />
                <command id="cmd_items_claimed_returned2" />
index fd7a69e..76bbb7e 100644 (file)
@@ -11,6 +11,7 @@
 
 <popupset id="items_popupset">
        <popup id="items_actions" position="at_pointer"> 
+               <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
                <menuitem label="Show in Catalog" command="cmd_show_catalog" />
                <menuitem label="Edit Due Date" command="cmd_items_edit" />
                <menuitem label="Mark Lost (by Patron)" command="cmd_items_mark_lost" />
@@ -21,6 +22,7 @@
                <menuitem label="Add Billing" command="cmd_add_billing" />
        </popup>
        <popup id="items_actions2" position="at_pointer"> 
+               <menuitem command="sel_clip2" label="Copy to Clipboard" accesskey="C" />
                <menuitem label="Show in Catalog" command="cmd_show_catalog2" />
                <menuitem label="Edit Due Date" command="cmd_items_edit2" />
                <menuitem label="Mark Lost (by Patron)" command="cmd_items_mark_lost2" />
@@ -66,6 +68,7 @@
        <menubar>
                <menu label="Actions for Selected Items" accesskey="S">
                        <menupopup>
+                               <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
                                <menuitem label="Show in Catalog" command="cmd_show_catalog" />
                                <menuitem label="Edit Due Date" command="cmd_items_edit" />
                                <menuitem label="Mark Lost (by Patron)" command="cmd_items_mark_lost" />
@@ -84,6 +87,7 @@
        <menubar>
                <menu label="Actions for Selected Items" old_accesskey="S">
                        <menupopup>
+                               <menuitem command="sel_clip2" label="Copy to Clipboard" accesskey="C" />
                                <menuitem label="Show in Catalog" command="cmd_show_catalog2" />
                                <menuitem label="Edit Due Date" command="cmd_items_edit2" />
                                <menuitem label="Mark Lost (by Patron)" command="cmd_items_mark_lost2" />