roll our own textbox context menu for clipboard functions
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 7 Jan 2009 20:16:13 +0000 (20:16 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 7 Jan 2009 20:16:13 +0000 (20:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11758 dcc99617-32d9-48b4-a31d-7c20da2025e4

24 files changed:
Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay.xul [deleted file]
Open-ILS/xul/staff_client/chrome/content/util/clipboard.js [new file with mode: 0644]
Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul
Open-ILS/xul/staff_client/server/cat/copy_notes.xul
Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul
Open-ILS/xul/staff_client/server/cat/spine_labels.xul
Open-ILS/xul/staff_client/server/cat/z3950.xul
Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
Open-ILS/xul/staff_client/server/circ/checkout_overlay.xul
Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
Open-ILS/xul/staff_client/server/circ/in_house_use.xul
Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul
Open-ILS/xul/staff_client/server/circ/print_list_template_editor.xul
Open-ILS/xul/staff_client/server/main/verify_credentials.xul
Open-ILS/xul/staff_client/server/main/ws_info.xul
Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
Open-ILS/xul/staff_client/server/patron/bill_check_info.xul
Open-ILS/xul/staff_client/server/patron/bill_wizard.xul
Open-ILS/xul/staff_client/server/patron/bills_overlay.xul
Open-ILS/xul/staff_client/server/patron/hold_notices.xul
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/info_notes.xul
Open-ILS/xul/staff_client/server/patron/search_form_overlay.xul

diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay.xul b/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay.xul
deleted file mode 100644 (file)
index a990666..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!-- Modified by Jason for Evergreen -->
-
-<overlay id="openils_util_overlay"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <script>dump('Loading OpenILS/util_overlay.xul\n');</script>
-       <scripts id="openils_util_scripts">
-               <script type="text/javascript" src="../main/constants.js" />
-               <script type="text/javascript" src="util/utils.js" />
-               <script type="text/javascript" src="util/CGI.js" />
-               <script type="text/javascript" src="util/md5.js" />
-               <script type="text/javascript" src="util/JSON_v1.js" />
-               <script type="text/javascript" src="util/fmall.js" />
-               <script type="text/javascript" src="util/fmgen.js" />
-               <script type="text/javascript" src="util/RemoteRequest.js" />
-               <script type="text/javascript" src="util/OrgTree.js" />
-               <script type="text/javascript" src="util/org_utils.js" />   
-               <script type="text/javascript" src="global_util.js" />
-       </scripts>
-       <script>dump('Loaded OpenILS/util_overlay.xul\n');</script>
-
-</overlay>
-
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/clipboard.js b/Open-ILS/xul/staff_client/chrome/content/util/clipboard.js
new file mode 100644 (file)
index 0000000..0c402cb
--- /dev/null
@@ -0,0 +1,72 @@
+dump('entering util/clipboard.js\n');
+
+if (typeof util == 'undefined') var util = {};
+util.clipboard = {};
+
+util.clipboard.EXPORT_OK       = [ 
+       'cut', 'copy', 'paste'
+];
+util.clipboard.EXPORT_TAGS     = { ':all' : util.clipboard.EXPORT_OK };
+
+util.clipboard.cut = function() {
+    try {
+        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+        var n = document.popupNode;
+        var v = n.value;
+        var start = n.selectionStart;
+        var end = n.selectionEnd;
+        var clip = v.substring( start, end );
+        n.value = v.substring(0, start) + v.substring(end, v.length);
+        const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
+            .getService(Components.interfaces.nsIClipboardHelper);
+        gClipboardHelper.copyString(clip);
+        n.setSelectionRange(start,start);
+        dump('Copied ' + clip + '\n');
+    } catch(E) {
+        alert(E);
+    }
+}
+
+util.clipboard.copy = function() {
+    try {
+        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+        var n = document.popupNode;
+        var v = n.value;
+        var start = n.selectionStart;
+        var end = n.selectionEnd;
+        var clip = v.substring( start, end );
+        const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
+            .getService(Components.interfaces.nsIClipboardHelper);
+        gClipboardHelper.copyString(clip);
+        dump('Copied ' + clip + '\n');
+    } catch(E) {
+        alert(E);
+    }
+}
+
+util.clipboard.paste = function() {
+    try {
+        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+        var n = document.popupNode;
+        var v = n.value;
+        var start = n.selectionStart;
+        var end = n.selectionEnd;
+        var cb = Components.classes["@mozilla.org/widget/clipboard;1"].getService(Components.interfaces.nsIClipboard); 
+        if (!cb) return false; 
+        var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable); 
+        if (!trans) return false; 
+        trans.addDataFlavor("text/unicode"); 
+        cb.getData(trans, cb.kGlobalClipboard);
+        var str = {}; var strLength = {};
+        trans.getTransferData("text/unicode",str,strLength);
+        if (str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
+        var clip; if (str) clip = str.data.substring(0, strLength.value / 2);
+        n.value = v.substring(0, start) + clip + v.substring(end, v.length);
+        n.setSelectionRange(start + clip.length,start + clip.length);
+        dump('Pasted ' + clip + '\n');
+    } catch(E) {
+        alert(E);
+    }
+}
+
+dump('exiting util/clipboard.js\n');
index 0dfbb47..b404d3f 100644 (file)
@@ -1,12 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Modified by Jason for Evergreen -->
-
+<!DOCTYPE overlay PUBLIC "" ""[
+    <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
 <overlay id="openils_util_overlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <scripts id="openils_util_scripts">
                <script>dump('starting openils_util_overlay\n');</script>
                <script type="text/javascript" src="/xul/server/main/constants.js" />
+               <script type="text/javascript" src="/xul/server/util/clipboard.js" />
                <script type="text/javascript" src="/opac/common/js/utils.js" />
                <script type="text/javascript" src="/opac/common/js/CGI.js" />
                <script type="text/javascript" src="/opac/common/js/md5.js" />
                <script type="text/javascript" src="/opac/common/js/OrgTree.js" />
                <script type="text/javascript" src="/opac/common/js/org_utils.js" />   
                <script type="text/javascript" src="global_util.js" />   
-               <script>dump('finished openils_util_overlay\n');</script>
-
+        <menupopup id="clipboard">
+            <menuitem label="&common.textbox.cut;" oncommand="util.clipboard.cut()" />
+            <menuitem label="&common.textbox.copy;" oncommand="util.clipboard.copy()" />
+            <menuitem label="&common.textbox.paste;" oncommand="util.clipboard.paste()" />
+            <menuitem label="&common.textbox.delete;" oncommand="document.popupNode.value = ''" />
+            <menuitem label="&common.textbox.select_all;" oncommand="document.popupNode.select()" />
+        </menupopup>
                <messagecatalog id="commonStrings" src='/xul/server/locale/<!--#echo var="locale"-->/common.properties'/>
                <messagecatalog id="offlineStrings" src='/xul/server/locale/<!--#echo var="locale"-->/offline.properties'/>
+               <script>dump('finished openils_util_overlay\n');</script>
        </scripts>
 
 </overlay>
index 55d6302..b7bfb92 100644 (file)
                                        <grid flex="1"><columns><column/><column flex="1"/></columns> \
                                                <rows> \
                                                        <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.public') + '"/><checkbox id="pub" name="fancy_data" checked="false"/></row> \
-                                                       <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.title') + '"/><textbox id="title" name="fancy_data"/></row> \
-                                                       <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.note') + '"/><textbox multiline="true" id="note" name="fancy_data"/></row> \
+                                                       <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.title') + '"/><textbox id="title" name="fancy_data" context="clipboard"/></row> \
+                                                       <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.note') + '"/><textbox multiline="true" id="note" name="fancy_data" context="clipboard"/></row> \
                                                        <row><spacer/><hbox> \
                                                                <button label="' + $('catStrings').getString('staff.cat.copy_notes.new_note.cancel.label') + '" name="fancy_cancel" accesskey="' + $('catStrings').getString('staff.cat.copy_notes.new_note.cancel.accesskey') + '"/> \
                                                                <button label="' + $('catStrings').getString('staff.cat.copy_notes.new_note.add_note.label') + '" accesskey="' + $('catStrings').getString('staff.cat.copy_notes.new_note.add_note.accesskey') + '" name="fancy_submit"/></hbox></row> \
index 4d86ec8..25354eb 100644 (file)
@@ -74,7 +74,7 @@
 <hbox id="record_query_top_ui">
     <label id="record_query_label" value="&staff.cat.record_buckets_overlay.record_query.label;"
         accesskey="&staff.cat.record_buckets_overlay.record_query.accesskey;" control="record_query_input"/>
-    <textbox id="record_query_input" flex="1"/>
+    <textbox id="record_query_input" flex="1" context="clipboard"/>
     <button command="cmd_submit_query" label="&staff.cat.record_buckets_overlay.cmd_submit_query.button.label;"
         accesskey="&staff.cat.record_buckets_overlay.cmd_submit_query.button.accesskey;"/>
     <button id="query_help" label="&staff.cat.record_buckets_overlay.query_help.button.label;"
index 3ed1135..c0a2c4c 100644 (file)
 
                        <hbox>
                                <label value="&staff.cat.spine_labels.font_size.label;" control="pt"/>
-                               <textbox id="pt" value="10" onchange="this.setAttribute('value',this.value)" persist="value"/>
+                               <textbox id="pt" value="10" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/>
                        </hbox>
                        <grid><columns><column/><column/><column/><column/></columns><rows>
                                <row> <label class="header" value="&staff.cat.spine_labels.spine_label.label;"/><spacer/> </row>
-                               <row> <label value="&staff.cat.spine_labels.spine_label.left_margin.label;" control="lm"/><textbox id="lm" value="0" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
-                               <row> <label value="&staff.cat.spine_labels.spine_label.label_width.label;" control="lw"/><textbox id="lw" value="8" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
-                               <row> <label value="&staff.cat.spine_labels.spine_label.label_length.label;" control="ll"/><textbox id="ll" value="9" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+                               <row> <label value="&staff.cat.spine_labels.spine_label.left_margin.label;" control="lm"/><textbox id="lm" value="0" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/> </row>
+                               <row> <label value="&staff.cat.spine_labels.spine_label.label_width.label;" control="lw"/><textbox id="lw" value="8" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/> </row>
+                               <row> <label value="&staff.cat.spine_labels.spine_label.label_length.label;" control="ll"/><textbox id="ll" value="9" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/> </row>
                                <row> <label class="header" value="&staff.cat.spine_labels.pocket_label.label;"/><checkbox id="pl" checked="false" persist="checked" label="Enabled"/> </row>
-                               <row> <label value="&staff.cat.spine_labels.pocket_label.middle_margin.label;" control="mm"/><textbox id="mm" value="2" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
-                               <row> <label value="&staff.cat.spine_labels.pocket_label.label_width.label;" control="plw"/><textbox id="plw" value="28" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
-                               <row> <label value="&staff.cat.spine_labels.pocket_label.label_length.label;" control="pll"/><textbox id="pll" value="9" onchange="this.setAttribute('value',this.value)" persist="value"/> </row>
+                               <row> <label value="&staff.cat.spine_labels.pocket_label.middle_margin.label;" control="mm"/><textbox id="mm" value="2" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/> </row>
+                               <row> <label value="&staff.cat.spine_labels.pocket_label.label_width.label;" control="plw"/><textbox id="plw" value="28" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/> </row>
+                               <row> <label value="&staff.cat.spine_labels.pocket_label.label_length.label;" control="pll"/><textbox id="pll" value="9" onchange="this.setAttribute('value',this.value)" persist="value" context="clipboard"/> </row>
                                <row>
                                        <checkbox id="title" checked="true" persist="checked" label="&staff.cat.spine_labels.pocket_label.title.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="title_line" value="4" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="title_line" value="4" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <checkbox id="title_r" checked="true" persist="checked" label="&staff.cat.spine_labels.pocket_label.include_title.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="title_r_line" value="5" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="title_r_line" value="5" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row> <spacer/><checkbox id="title_r_indent" checked="true" persist="checked" label="&staff.cat.spine_labels.indent_title.label;"/> </row>
                                        <checkbox id="author" checked="true" persist="checked" label="Include Author"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="author_line" value="3" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="author_line" value="3" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <checkbox id="call_number" checked="true" persist="checked" label="&staff.cat.spine_labels.inc_call_number.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="call_number_line" value="2" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="call_number_line" value="2" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <checkbox id="owning_lib_shortname" checked="false" persist="checked" label="&staff.cat.spine_labels.inc_owning_library_policy_code.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="owning_lib_shortname_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="owning_lib_shortname_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <checkbox id="owning_lib" checked="false" persist="checked" label="&staff.cat.spine_labels.inc_owning_library.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="owning_lib_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="owning_lib_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <checkbox id="shelving_location" checked="false" persist="checked" label="&staff.cat.spine_labels.inc_shelving_location.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="shelving_location_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="shelving_location_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                </hbox>
                                </row>
                                <row>
                                        <checkbox id="barcode" checked="true" persist="checked" label="&staff.cat.spine_labels.inc_item_barcode.label;"/>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="barcode_line" value="1" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="barcode_line" value="1" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <hbox>
                                                <checkbox id="custom1" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
-                                               <textbox id="custom1_tb" value="%price%" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom1_tb" value="%price%" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="custom1_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom1_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <hbox>
                                                <checkbox id="custom2" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
-                                               <textbox id="custom2_tb" value="%deposit_amount%" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom2_tb" value="%deposit_amount%" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                        <hbox>
                                                        <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                                       <textbox id="custom2_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                                       <textbox id="custom2_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <hbox>
                                                <checkbox id="custom3" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
-                                               <textbox id="custom3_tb" value="%alert_message%" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom3_tb" value="%alert_message%" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="custom3_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom3_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                                <row>
                                        <hbox>
                                                <checkbox id="custom4" checked="false" persist="checked" label="&staff.cat.spine_labels.custom.label;"/>
-                                               <textbox id="custom4_tb" value="Don't sell me on eBay" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom4_tb" value="Don't sell me on eBay" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                        <hbox>
                                                <label value="&staff.cat.spine_labels.on_line.label;"/>
-                                               <textbox id="custom4_line" value="" persist="value" onchange="this.setAttribute('value',this.value)"/>
+                                               <textbox id="custom4_line" value="" persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>
                                        </hbox>
                                </row>
                        </rows></grid>
index 2201810..a8a2834 100644 (file)
                             </row>
                             <row>
                                 <checkbox id="native-evergreen-catalog_service" mytype="service_class" service="native-evergreen-catalog" label="&staff.cat.z3950.catalog_service.label;" tooltiptext="&staff.cat.z3950.catalog_service.tooltiptext;" /> 
-                                <textbox id="native-evergreen-catalog_username" hidden="true"/>
-                                <textbox id="native-evergreen-catalog_password" type="password" hidden="true"/>
+                                <textbox id="native-evergreen-catalog_username" hidden="true" context="clipboard"/>
+                                <textbox id="native-evergreen-catalog_password" type="password" hidden="true" context="clipboard"/>
                             </row>
                         </rows>
                     </grid>
index b8ae827..f471946 100644 (file)
@@ -60,7 +60,7 @@
                                value="&staff.circ.checkin.scan.label;" 
                                accesskey="&staff.circ.checkin.scan.accesskey;" 
                                control="checkin_barcode_entry_textbox"/>
-                       <textbox id="checkin_barcode_entry_textbox"/>
+                       <textbox id="checkin_barcode_entry_textbox" context="clipboard"/>
                        <button id="checkin_submit_barcode_button" 
                                label="&staff.circ.checkin.submit.label;" 
                                command="cmd_checkin_submit_barcode"
@@ -73,7 +73,7 @@
                <hbox>
                        <hbox id="checkin_effective_date_hbox">
                                <label id="checkin_effective_date_label" value="&staff.circ.checkin_overlay.effective_date.label;" control="checkin_effective_date_textbox" accesskey="&staff.circ.checkin_overlay.effective_date.accesskey;"/>
-                               <textbox id="checkin_effective_date_textbox"/>
+                               <textbox id="checkin_effective_date_textbox" context="clipboard"/>
                        </hbox>
                        <menubar>
                        <menu label="&staff.circ.checkin_overlay.actions.label;" accesskey="&staff.circ.checkin_overlay.actions.accesskey;">
index e56703d..2d7052e 100644 (file)
@@ -32,7 +32,7 @@
 -->
        <hbox id="checkout_menu_placeholder" flex="0"/>
        <label accesskey="&staff.circ.checkout_overlay.barcode.accesskey;" control="checkout_barcode_entry_textbox"/>
-       <textbox id="checkout_barcode_entry_textbox"/>
+       <textbox id="checkout_barcode_entry_textbox" context="clipboard"/>
        <button id="checkout_submit_barcode_button" 
                label="&staff.patron_display.checkout.submit.label;" 
                command="cmd_checkout_submit"
index 736b7fc..f6379bd 100644 (file)
@@ -95,7 +95,7 @@
                value="&staff.circ.copy_status_overlay.copy_status_scan_barcode.label;"
                accesskey="&staff.circ.copy_status_overlay.copy_status_scan_barcode.accesskey;"
                control="copy_status_barcode_entry_textbox"/>
-       <textbox id="copy_status_barcode_entry_textbox"/>
+       <textbox id="copy_status_barcode_entry_textbox" context="clipboard"/>
        <button id="copy_status_submit_barcode_button" 
                label="&staff.circ.copy_status_overlay.copy_status_submit_barcode.label;"
                accesskey="&staff.circ.copy_status_overlay.copy_status_submit_barcode.accesskey;"
index bcc4ad8..81fa3a5 100644 (file)
@@ -92,9 +92,9 @@
 
        <hbox id="in_house_use_top_ui">
                <label id="in_house_use_multiplier_label" value="&staff.circ.in_house_use.multiplier.label;" control="in_house_use_multiplier_textbox" accesskey="&staff.circ.in_house_use.multiplier.accesskey;" hidden="false"/>
-               <textbox id="in_house_use_multiplier_textbox" value="1" hidden="false" size="2" cols="2"/>
+               <textbox id="in_house_use_multiplier_textbox" value="1" hidden="false" size="2" cols="2" context="clipboard"/>
                <hbox id="in_house_use_menu_placeholder" flex="0"/>
-               <textbox id="in_house_use_barcode_entry_textbox"/>
+               <textbox id="in_house_use_barcode_entry_textbox" context="clipboard"/>
                <button id="in_house_use_submit_barcode_button" 
                        label="&staff.circ.in_house_use.submit.label;"
                        command="cmd_in_house_use_submit_barcode"
index 907092a..ec32c39 100644 (file)
                        <rows>
                                <row>
                                        <label value="&staff.circ.pre_cat.dummy_title.value;" control="dummy_title"/>
-                                       <textbox id="dummy_title" onchange="g.data.dummy_title = event.target.value;"/>
+                                       <textbox id="dummy_title" onchange="g.data.dummy_title = event.target.value;" context="clipboard"/>
                                </row>
                                <row>
                                        <label value="&staff.circ.pre_cat.dummy_author.value;" control="dummy_author"/>
-                                       <textbox id="dummy_author" onchange="g.data.dummy_author = event.target.value;"/>
+                                       <textbox id="dummy_author" onchange="g.data.dummy_author = event.target.value;" context="clipboard"/>
                                </row>
                        </rows>
                </grid>
index 82ae6cf..5e7a455 100644 (file)
                        <vbox flex="1">
                                <groupbox flex="1">
                                        <caption label="&staff.circ.print_list.header.label;"/>
-                                       <textbox id="header" multiline="true" flex="1"/>
+                                       <textbox id="header" multiline="true" flex="1" context="clipboard"/>
                                </groupbox>
                                <groupbox flex="1">
                                        <caption label="&staff.circ.print_list.line_item.label;"/>
-                                       <textbox id="line_item" multiline="true" flex="1"/>
+                                       <textbox id="line_item" multiline="true" flex="1" context="clipboard"/>
                                </groupbox>
                                <groupbox flex="1">
                                        <caption label="&staff.circ.print_list.footer.label;"/>
-                                       <textbox id="footer" multiline="true" flex="1"/>
+                                       <textbox id="footer" multiline="true" flex="1" context="clipboard"/>
                                </groupbox>
                        </vbox>
                </hbox>
index ee9bff8..e5709a8 100644 (file)
             <rows>
                 <row>
                     <label value="&common.username;" control="name_prompt" accesskey="&common.username.accesskey;"/>
-                    <textbox id="name_prompt" value=""/>
+                    <textbox id="name_prompt" value="" context="clipboard"/>
                 </row>
                 <row>
                     <label value="&common.barcode;" control="barcode_prompt" accesskey="&common.barcode.accesskey;"/>
-                    <textbox id="barcode_prompt" value=""/>
+                    <textbox id="barcode_prompt" value="" context="clipboard"/>
                 </row>
                 <row>
                     <label value="&common.password;" control="password_prompt" accesskey="&common.password.accesskey;"/>
-                    <textbox id="password_prompt" value="" type="password"/>
+                    <textbox id="password_prompt" value="" type="password" context="clipboard"/>
                 </row>
                 <row>
                     <spacer />
index 6d65a2d..5761a0c 100644 (file)
                </description>
                <hbox>
                        <label value="&staff.main.ws_info.name;" control="wsname"/>
-                       <textbox id="wsname" />
+                       <textbox id="wsname"  context="clipboard"/>
                </hbox>
                <hbox>
                        <hbox id="placeholder"/>
index f8bd567..8dceab6 100644 (file)
                        <caption label="&staff.pat.barcode_entry.retrieve_patron.label;" />
                        <hbox>
                                <label value="&staff.pat.barcode_entry.barcode.label;" accesskey="&staff.pat.barcode_entry.barcode.accesskey;" control="barcode_tb"/>
-                               <textbox id="barcode_tb" />
+                               <textbox id="barcode_tb"  context="clipboard"/>
                                <button label="&staff.pat.barcode_entry.submit_btn.label;" accesskey="&staff.pat.barcode_entry.submit_btn.accesskey;" oncommand="submit();"/>
                        </hbox>
                        <label value="&staff.pat.barcode_entry.retrieving.label;" style="color: green" id="progress" hidden="true"/>
index 87addfe..5c4b3f9 100644 (file)
                                </row>
                                <row>
                                        <label value="&staff.patron.bill_cc_info.cc_number.value;"/>
-                                       <textbox id="cc_number" onchange="g.payment_blob.cc_number = event.target.value"/>
+                                       <textbox id="cc_number" onchange="g.payment_blob.cc_number = event.target.value" context="clipboard"/>
                                </row>
                                <row>
                                        <label value="&staff.patron.bill_cc_info.month_expire.value;"/>
-                                       <textbox id="expire_month" onchange="g.payment_blob.expire_month = event.target.value"/>
+                                       <textbox id="expire_month" onchange="g.payment_blob.expire_month = event.target.value" context="clipboard"/>
                                </row>
                                <row>
                                        <label value="&staff.patron.bill_cc_info.year_expire.value;"/>
-                                       <textbox id="expire_year" onchange="g.payment_blob.expire_year = event.target.value"/>
+                                       <textbox id="expire_year" onchange="g.payment_blob.expire_year = event.target.value" context="clipboard"/>
                                </row>
                                <row>
                                        <label value="&staff.patron.bill_cc_info.approval_code.value;"/>
-                                       <textbox id="approval_code" onchange="g.payment_blob.approval_code = event.target.value"/>
+                                       <textbox id="approval_code" onchange="g.payment_blob.approval_code = event.target.value" context="clipboard"/>
                                </row>
                                <row>
                                        <label value="&staff.patron.bill_cc_info.note.value;"/>
-                                       <textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true"/>
+                                       <textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true" context="clipboard"/>
                                </row>
                        </rows>
                </grid>
index b3c9b60..153d90a 100644 (file)
                        <rows>
                                <row>
                                        <label value="&staff.patron.bill_check_info.check_number.value;"/>
-                                       <textbox id="check_number" onchange="g.payment_blob.check_number = event.target.value"/>
+                                       <textbox id="check_number" onchange="g.payment_blob.check_number = event.target.value" context="clipboard"/>
                                </row>
                                <row>
                                        <label value="&staff.patron.bill_check_info.note.value;"/>
-                                       <textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true"/>
+                                       <textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true" context="clipboard"/>
                                </row>
                        </rows>
                </grid>
index e415516..85b10a6 100644 (file)
@@ -46,7 +46,7 @@
                                <grid>
                                        <columns> <column flex="0" /> <column flex="0" /> </columns>
                                        <rows id="page1_rows">
-                                               <row><label value="&staff.patron.bill_wizard.location.value;"/><textbox id="billing_location" disabled="true" /></row>
+                                               <row><label value="&staff.patron.bill_wizard.location.value;"/><textbox id="billing_location" disabled="true" context="clipboard" /></row>
                                                <row><label value="&staff.patron.bill_wizard.transaction_type.value;"/>
                                                        <menulist id="xact_type">
                                                                <menupopup>
@@ -58,8 +58,8 @@
                                                <row><label value="&staff.patron.bill_wizard.billing_type.label;"/>
                                                        <hbox id="menu_placeholder"/>
                                                </row>
-                                               <row><label value="&staff.patron.bill_wizard.amount.value;"/><textbox id="bill_amount" /></row>
-                                               <row><label value="&staff.patron.bill_wizard.note.value;"/><textbox id="bill_note" multiline="true" rows="5" /></row>
+                                               <row><label value="&staff.patron.bill_wizard.amount.value;"/><textbox id="bill_amount" context="clipboard" /></row>
+                                               <row><label value="&staff.patron.bill_wizard.note.value;"/><textbox id="bill_note" multiline="true" rows="5" context="clipboard" /></row>
                                        </rows>
                                </grid>
                                <spacer flex="1"/>
index 24acfd7..8187ff9 100644 (file)
                                        <row>
                                                <label value="&staff.patron.bills_overlay.net_balance.value;"/>
        
-                                               <textbox id="bill_total_owed" value="" readonly="true" />
+                                               <textbox id="bill_total_owed" value="" readonly="true"  context="clipboard"/>
                                        </row>
                                        <row>
                                                <label value="&staff.patron.bills_overlay.payment_applied.value;"/>
                        
-                                               <textbox id="bill_payment_applied" readonly="true"/>
+                                               <textbox id="bill_payment_applied" readonly="true" context="clipboard"/>
                                        </row>
                                        <row>
                                                <label value="&staff.patron.bills_overlay.new_balance.value;" 
                                                        style="font-family: bold" />
        
-                                               <textbox id="bill_new_balance" readonly="true"/>
+                                               <textbox id="bill_new_balance" readonly="true" context="clipboard"/>
                                        </row>
                                </rows>
                        </grid>
                                                <label value="&staff.patron.bills_overlay.payment_received.value;" style="font-weight: bold"
                                                        accesskey="&staff.patron.bills_overlay.payment_received.accesskey;" control="bill_payment_amount" />
                        
-                                               <textbox id="bill_payment_amount" style="border: solid thick black"/>
+                                               <textbox id="bill_payment_amount" style="border: solid thick black" context="clipboard"/>
                                        </row>
                                        <row>
                                                <label value="&staff.patron.bills_overlay.payment_applied.value;"/>
                        
-                                               <textbox id="bpato" observes="bill_payment_applied" />
+                                               <textbox id="bpato" observes="bill_payment_applied"  context="clipboard"/>
                                        </row>
                                        <row>
                                                <label value="&staff.patron.bills_overlay.change.value;" control="bill_change_amount" style="font-weight: bold" />
        
                                                <hbox>
-                                                       <textbox id="bill_change_amount" readonly="true"/>
+                                                       <textbox id="bill_change_amount" readonly="true" context="clipboard"/>
                                                </hbox>
                                        </row>
                                        <row class="hide_patron_credit" hidden="true">
                                                <label value="&staff.patron.bills_overlay.patron_credit.value;" 
                                                        style="font-family: bold" />
        
-                                               <textbox id="bill_credit_amount" readonly="true"/>
+                                               <textbox id="bill_credit_amount" readonly="true" context="clipboard"/>
                                        </row>
                                </rows>
                        </grid>
index 8ea583d..e115e93 100644 (file)
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
                                var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">';
                                xml += '<caption label="' + $("patronStrings").getString('staff.patron.hold_notices.new_notification_record') + '"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows>';
-                               xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.method') + '"/><textbox id="method" name="fancy_data"/></row>';
-                               xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.note') + '"/><textbox multiline="true" id="note" name="fancy_data"/></row>';
+                               xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.method') + '"/><textbox id="method" name="fancy_data" context="clipboard"/></row>';
+                               xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.note') + '"/><textbox multiline="true" id="note" name="fancy_data" context="clipboard"/></row>';
                                xml += '<row><spacer/><hbox><button label="' + $("patronStrings").getString('staff.patron.hold_notices.cancel') + '" name="fancy_cancel" ';
                                xml += 'accesskey="' + $("patronStrings").getString('staff.patron.hold_notices.cancel_accesskey') + '"/>';
                                xml += '<button label="' + $("patronStrings").getString('staff.patron.hold_notices.add_notif_record') + '" ';
index 5964bd3..ed6467c 100644 (file)
@@ -412,7 +412,7 @@ patron.holds.prototype = {
                                                        try {
                                                                var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
                                                                xml += '<description>'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.new_phone_number')+'</description>';
-                                                               xml += '<textbox id="phone" name="fancy_data"/>';
+                                                               xml += '<textbox id="phone" name="fancy_data" context="clipboard"/>';
                                                                xml += '</vbox>';
                                                                var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
                                                                bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_done.label')+'"';
index adae2ec..ad56fc1 100644 (file)
                                var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">';
                                xml += '<caption label="'+$("patronStrings").getString('staff.patron.info_notes.new_note.label')+'"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows><row>';
                                xml += '<label value="'+$("patronStrings").getString('staff.patron.info_notes.new_note.patron_visible.value')+'"/><checkbox id="pub" name="fancy_data"/></row>';
-                               xml += '<row><label value="'+$("patronStrings").getString('staff.patron.info_notes.new_note.title.value')+'"/><textbox id="title" name="fancy_data"/></row>';
-                               xml += '<row><label value="'+$("patronStrings").getString('staff.patron.info_notes.new_note.note.value')+'"/><textbox multiline="true" id="note" name="fancy_data"/></row>';
+                               xml += '<row><label value="'+$("patronStrings").getString('staff.patron.info_notes.new_note.title.value')+'"/><textbox id="title" name="fancy_data" context="clipboard"/></row>';
+                               xml += '<row><label value="'+$("patronStrings").getString('staff.patron.info_notes.new_note.note.value')+'"/><textbox multiline="true" id="note" name="fancy_data" context="clipboard"/></row>';
                                xml += '<row><spacer/><hbox><button label="'+$("patronStrings").getString('staff.patron.info_notes.new_note.cancel.label')+'" name="fancy_cancel"';
                                xml += ' accesskey="'+$("patronStrings").getString('staff.patron.info_notes.new_note.cancel.accesskey')+'"/>';
                                xml += '<button label="'+$("patronStrings").getString('staff.patron.info_notes.new_note.add.label')+'"';
index 7f6e274..0d29d2b 100644 (file)
                        <label id="psl1" control="family_name" 
                                value="&staff.patron_search_form.family_name.label;" 
                                accesskey="&staff.patron_search_form.family_name.accesskey;"/>
-                       <textbox id="family_name" group="0"/>
+                       <textbox id="family_name" group="0" context="clipboard"/>
                </row>
                <row id="psr2">
                        <label id="psl2" control="first_given_name" 
                                value="&staff.patron_search_form.first_given_name.label;" 
                                accesskey="&staff.patron_search_form.first_given_name.accesskey;"/>
-                       <textbox id="first_given_name" group="0"/>
+                       <textbox id="first_given_name" group="0" context="clipboard"/>
                </row>
                <row id="psr3">
                        <label id="psl3" control="second_given_name" 
                                value="&staff.patron_search_form.second_given_name.label;" 
                                accesskey="&staff.patron_search_form.second_given_name.accesskey;"/>
-                       <textbox id="second_given_name" group="0"/>
+                       <textbox id="second_given_name" group="0" context="clipboard"/>
                </row>
                <row id="psr14">
                        <label id="psl14" control="alias" 
                                value="&staff.patron_search_form.alias.label;" 
                                accesskey="&staff.patron_search_form.alias.accesskey;"/>
-                       <textbox id="alias" group="0"/>
+                       <textbox id="alias" group="0" context="clipboard"/>
                </row>
                <row id="psr4">
                        <label id="psl4" control="email" 
                                value="&staff.patron_search_form.email.label;" 
                                accesskey="&staff.patron_search_form.email.accesskey;"/>
-                       <textbox id="email" group="0"/>
+                       <textbox id="email" group="0" context="clipboard"/>
                </row>
                <row id="psr5">
                        <label id="psl5" control="phone" 
                                value="&staff.patron_search_form.phone.label;" 
                                accesskey="&staff.patron_search_form.phone.accesskey;"/>
-                       <textbox id="phone" group="2"/>
+                       <textbox id="phone" group="2" context="clipboard"/>
                </row>
                <row id="psr6">
                        <label id="psl6" control="ident" 
                                value="&staff.patron_search_form.ident.label;" 
                                accesskey="&staff.patron_search_form.ident.accesskey;"/>
-                       <textbox id="ident" group="2"/>
+                       <textbox id="ident" group="2" context="clipboard"/>
                </row>
                <row id="psr6a">
                        <label id="psl6a" value=" "/>
                        <label id="psl7" control="street1" 
                                value="&staff.patron_search_form.street1.label;" 
                                accesskey="&staff.patron_search_form.street1.accesskey;"/>
-                       <textbox id="street1" group="1"/>
+                       <textbox id="street1" group="1" context="clipboard"/>
                </row>
                <row id="psr8">
                        <label id="psl8" control="street2" 
                                value="&staff.patron_search_form.street2.label;" 
                                accesskey="&staff.patron_search_form.street2.accesskey;"/>
-                       <textbox id="street2" group="1"/>
+                       <textbox id="street2" group="1" context="clipboard"/>
                </row>
                <row id="psr9">
                        <label id="psl9" control="city" 
                                value="&staff.patron_search_form.city.label;" 
                                accesskey="&staff.patron_search_form.city.accesskey;"/>
-                       <textbox id="city" group="1"/>
+                       <textbox id="city" group="1" context="clipboard"/>
                </row>
                <row id="psr10" hidden="true">
                        <label id="psl10" control="state" 
                                value="&staff.patron_search_form.state.label;" 
                                accesskey="&staff.patron_search_form.state.accesskey;"/>
-                       <textbox id="state" group="1"/>
+                       <textbox id="state" group="1" context="clipboard"/>
                </row>
                <row id="psr11">
                        <label id="psl11" control="post_code" 
                                value="&staff.patron_search_form.post_code.label;" 
                                accesskey="&staff.patron_search_form.post_code.accesskey;"/>
-                       <textbox id="post_code" group="1"/>
+                       <textbox id="post_code" group="1" context="clipboard"/>
                </row>
                <row id="psr12">
                        <spacer id="pss12"/>