clipboard
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Aug 2006 00:29:55 +0000 (00:29 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Aug 2006 00:29:55 +0000 (00:29 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5353 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkin.xul
Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
Open-ILS/xul/staff_client/server/circ/checkout.js
Open-ILS/xul/staff_client/server/circ/checkout.xul
Open-ILS/xul/staff_client/server/circ/checkout_overlay.xul
Open-ILS/xul/staff_client/server/circ/in_house_use.js
Open-ILS/xul/staff_client/server/circ/in_house_use.xul

index a35e342..100f7cf 100644 (file)
@@ -52,6 +52,7 @@ circ.checkin.prototype = {
                                                        obj.controller.view.sel_bucket.setAttribute('disabled','true');
                                                        obj.controller.view.sel_spine.setAttribute('disabled','true');
                                                        obj.controller.view.sel_transit_abort.setAttribute('disabled','true');
+                                                       obj.controller.view.sel_clip.setAttribute('disabled','true');
                                                } else {
                                                        obj.controller.view.sel_edit.setAttribute('disabled','false');
                                                        obj.controller.view.sel_opac.setAttribute('disabled','false');
@@ -59,6 +60,7 @@ circ.checkin.prototype = {
                                                        obj.controller.view.sel_bucket.setAttribute('disabled','false');
                                                        obj.controller.view.sel_spine.setAttribute('disabled','false');
                                                        obj.controller.view.sel_transit_abort.setAttribute('disabled','false');
+                                                       obj.controller.view.sel_clip.setAttribute('disabled','false');
                                                }
                                        } catch(E) {
                                                alert('FIXME: ' + E);
@@ -72,6 +74,10 @@ circ.checkin.prototype = {
                obj.controller.init(
                        {
                                'control_map' : {
+                                       'sel_clip' : [
+                                               ['command'],
+                                               function() { obj.list.clipboard(); }
+                                       ],
                                        'sel_edit' : [
                                                ['command'],
                                                function() {
index ef1080c..2f9fa50 100644 (file)
@@ -82,6 +82,7 @@
                <command id="cmd_checkin_reprint" />
                <command id="cmd_checkin_done" />
                
+               <command id="sel_clip" disabled="true"/>
                <command id="sel_edit" disabled="true"/>
                <command id="sel_opac" disabled="true"/>
                <command id="sel_patron" disabled="true"/>
index 2fab2d2..72d7280 100644 (file)
@@ -11,6 +11,7 @@
 
 <popupset id="copy_status_popupset">
        <popup id="copy_status_actions" position="at_pointer"> 
+               <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
                <menuitem command="sel_opac" label="Show in Catalog" accesskey="S" />
                <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
                <menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
@@ -54,6 +55,7 @@
        <menubar>
        <menu label="Actions for Selected Items" accesskey="S">
                <menupopup>
+                       <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
                        <menuitem command="sel_opac" label="Show in Catalog" accesskey="S" />
                        <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
                        <menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
index e78c2c7..1d2bb1a 100644 (file)
@@ -31,6 +31,10 @@ circ.checkout.prototype = {
                        {
                                'columns' : columns,
                                'map_row_to_column' : circ.util.std_map_row_to_column(),
+                               'on_select' : function() {
+                                       var sel = obj.list.retrieve_selection();
+                                       document.getElementById('clip_button').disabled = sel.length < 1;
+                               }
                        }
                );
                
@@ -38,6 +42,10 @@ circ.checkout.prototype = {
                obj.controller.init(
                        {
                                'control_map' : {
+                                       'sel_clip' : [
+                                               ['command'],
+                                               function() { obj.list.clipboard(); }
+                                       ],
                                        'checkout_menu_placeholder' : [
                                                ['render'],
                                                function(e) {
@@ -355,6 +363,7 @@ circ.checkout.prototype = {
                                } else {
                                        obj.error.sdump('D_CIRC','circ.checkout: No external .on_checkout()\n');
                                }
+
                        } else {
                                throw(checkout);
                        }
index 0369414..9a48307 100644 (file)
@@ -81,6 +81,7 @@
                <command id="cmd_checkout_print" />
                <command id="cmd_checkout_reprint" />
                <command id="cmd_checkout_done" />
+               <command id="sel_clip" />
        </commandset>
 
        <box id="checkout_main" />
index 541ef74..af561f7 100644 (file)
@@ -60,6 +60,7 @@
                label="&staff.patron_display.checkout.reprint_receipt_label;" 
                command="cmd_checkout_reprint"
                accesskey="&staff.patron_display.checkout.reprint_receipt_label.accesskey;"/>
+       <button id="clip_button" disabled="true" command="sel_clip" label="Copy to Clipboard" />
        <spacer id="pcii3s" flex="1"/>
        <checkbox id="checkout_auto" persist="checked"
                label="&staff.patron_display.checkout.auto_print_label;" 
index c04ea57..19f6264 100644 (file)
@@ -32,6 +32,10 @@ circ.in_house_use.prototype = {
                        {
                                'columns' : columns,
                                'map_row_to_column' : circ.util.std_map_row_to_column(),
+                               'on_select' : function() {
+                                       var sel = obj.list.retrieve_selection();
+                                       document.getElementById('clip_button').disabled = sel.length < 1;
+                               }
                        }
                );
                
@@ -39,6 +43,10 @@ circ.in_house_use.prototype = {
                obj.controller.init(
                        {
                                'control_map' : {
+                                       'sel_clip' : [
+                                               ['command'],
+                                               function() { obj.list.clipboard(); }
+                                       ],
                                        'in_house_use_barcode_entry_textbox' : [
                                                ['keypress'],
                                                function(ev) {
index 2f02fd6..731373f 100644 (file)
@@ -65,6 +65,7 @@
        </script>
 
        <commandset id="in_house_use_cmds">
+               <command id="sel_clip" />
                <command id="cmd_in_house_use_submit_barcode" />
                <command id="cmd_in_house_use_print" />
                <command id="cmd_in_house_use_reprint" />
                        label="Re-Print Last List" 
                        command="cmd_in_house_use_reprint"
                        accesskey="L"/>
+               <button id="clip_button" disabled="true" command="sel_clip" label="Copy to Clipboard" />
                <spacer id="pcii3s" flex="1"/>
        </hbox>