clipboard for patron search
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Aug 2006 13:46:09 +0000 (13:46 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Aug 2006 13:46:09 +0000 (13:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5512 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/search_result.js
Open-ILS/xul/staff_client/server/patron/search_result.xul
Open-ILS/xul/staff_client/server/patron/search_result_overlay.xul

index c5eb6f2..891b3c3 100644 (file)
@@ -63,6 +63,7 @@ patron.search_result.prototype = {
                                                sel,
                                                function(o) { return o.getAttribute('retrieve_id'); }
                                        );
+                                       obj.controller.view.cmd_sel_clip.setAttribute('disabled', list.length < 1 );
                                        if (typeof obj.on_select == 'function') {
                                                obj.on_select(list);
                                        }
@@ -90,6 +91,16 @@ patron.search_result.prototype = {
                                                        alert( js2JSON( obj.list.dump() ) );
                                                }
                                        ],
+                                       'cmd_sel_clip' : [
+                                               ['command'],
+                                               function() {
+                                                       try {
+                                                               obj.list.clipboard();
+                                                       } catch(E) {
+                                                               obj.error.standard_unexpected_error_alert('patron search clipboard',E);
+                                                       }
+                                               }
+                                       ],
                                }
                        }
                );
index 2f4e08d..aa19543 100644 (file)
@@ -71,6 +71,7 @@
                <command id="cmd_patron_edit" />
                <command id="cmd_patron_info" />
                <command id="cmd_search_print" />
+               <command id="cmd_sel_clip" disabled="true"/>
        </commandset>
 
        <box id="patron_search_result_main" />
index 148977d..1a9e212 100644 (file)
@@ -14,6 +14,7 @@
                        <tree id="patron_list" flex="1" enableColumnDrag="true" seltype="multiple"/>
                        <hbox>
                                <spacer flex="1"/>
+                               <button label="Copy to Clipboard" command="cmd_sel_clip"/>
                                <button label="Print" command="cmd_search_print" />
                        </hbox>
                </vbox>