backporting changeset r12284 which supplys working context menus to remote textbox...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Mar 2009 18:13:20 +0000 (18:13 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Mar 2009 18:13:20 +0000 (18:13 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@12473 dcc99617-32d9-48b4-a31d-7c20da2025e4

30 files changed:
Open-ILS/web/opac/skin/default/js/rdetail.js.orig [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay.xul
Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_chrome.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/admin/survey_wizard.xul
Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
Open-ILS/xul/staff_client/chrome/content/main/main.xul
Open-ILS/xul/staff_client/chrome/content/main/menu_frame.xul
Open-ILS/xul/staff_client/chrome/content/util/browser.xul
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/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/web/opac/skin/default/js/rdetail.js.orig b/Open-ILS/web/opac/skin/default/js/rdetail.js.orig
new file mode 100644 (file)
index 0000000..5fba851
--- /dev/null
@@ -0,0 +1,783 @@
+/* */
+
+
+detachAllEvt('common', 'run');
+attachEvt("common", "run", rdetailDraw);
+attachEvt("rdetail", "recordDrawn", rdetailBuildStatusColumns);
+attachEvt("rdetail", "recordDrawn", rdetailBuildInfoRows);
+attachEvt("rdetail", "recordDrawn", rdetailGetPageIds);
+
+var record = null;
+var cp_statuses = null;
+var recordsCache = [];
+
+var copyRowParent = null;
+var copyRow = null;
+var statusRow = null;
+var numStatuses = null;
+var defaultCN;
+var callnumberCache = {};
+var rdetailLocalOnly = true;
+var globalCNCache      = {};
+var localTOC;
+var cachedRecords;
+
+var rdetailShowLocal = true;
+
+
+
+var nextContainerIndex;
+
+function rdetailReload() {
+       var args = {};
+       args[PARAM_LOCATION] = getNewSearchLocation();
+       args[PARAM_DEPTH] = depthSelGetDepth();
+       goTo(buildOPACLink(args));
+}
+
+var nextRecord;
+var prevRecord;
+
+var rdetailPrev = null;
+var rdetailNext = null;
+var rdetailStart = null;
+var rdetailEnd = null;
+
+
+
+/* looks to see if we have a next and/or previous record in the
+record cache, if so, set up the nav links */
+function rdetailSetPaging(ids) {
+
+       cachedRecords = {};
+       cachedRecords.ids = ids;
+
+       for( var i = 0; i < cachedRecords.ids.length; i++ ) {
+               var rec = cachedRecords.ids[i];
+               if( rec == getRid() ) {
+                       if( i > 0 ) prevRecord = cachedRecords.ids[i-1];
+                       if( i < cachedRecords.ids.length - 1 )
+                               nextRecord = cachedRecords.ids[i+1];
+                       break;
+               }
+       }
+
+       $('np_offset').appendChild(text(i + 1));
+       $('np_count').appendChild(text(getHitCount()));
+
+       if(prevRecord) {
+               unHideMe($('np_table'));
+               unHideMe($('np_prev'));
+               unHideMe($('np_start'));
+               rdetailPrev = function() { _rdetailNav(prevRecord); };
+               rdetailStart = function() { _rdetailNav(cachedRecords.ids[0]); };
+       }
+
+       if(nextRecord) {
+               unHideMe($('np_table'));
+               unHideMe($('np_next'));
+               unHideMe($('np_end'));
+               rdetailNext = function() { _rdetailNav(nextRecord); };
+               rdetailEnd = function() { _rdetailNav(cachedRecords.ids[cachedRecords.ids.length-1]); };
+       }
+
+       runEvt('rdetail', 'nextPrevDrawn', i, cachedRecords.ids.length);
+}
+
+
+function _rdetailNav(id, offset) {
+       var args = {};
+       args[PARAM_RID] = id;
+       goTo(buildOPACLink(args));
+}
+
+function rdetailDraw() {
+
+       detachAllEvt('common','depthChanged');
+       detachAllEvt('common','locationUpdated');
+       attachEvt('common','depthChanged', rdetailReload);
+       attachEvt('common','locationUpdated', rdetailReload);
+       attachEvt('common','holdUpdated', rdetailReload);
+       attachEvt('common','holdUpdateCanceled', rdetailReload);
+
+       copyRowParent = G.ui.rdetail.cp_info_row.parentNode;
+       copyRow = copyRowParent.removeChild(G.ui.rdetail.cp_info_row);
+       statusRow = G.ui.rdetail.cp_status.parentNode;
+       statusRow.id = '__rdsrow';
+
+       G.ui.rdetail.cp_info_local.onclick = rdetailShowLocalCopies;
+       G.ui.rdetail.cp_info_all.onclick = rdetailShowAllCopies;
+
+       if(getLocation() == globalOrgTree.id())
+               hideMe(G.ui.rdetail.cp_info_all);
+
+       var req = new Request(FETCH_RMODS, getRid());
+       req.callback(_rdetailDraw);
+       req.send();
+
+       detachAllEvt("result", "idsReceived");
+       G.evt.result.hitCountReceived = [];
+       G.evt.result.recordReceived = [];
+       G.evt.result.copyCountsReceived = [];
+       G.evt.result.allRecordsReceived = [];
+}
+
+function rdetailGetPageIds() {
+       attachEvt("result", "idsReceived", rdetailSetPaging );
+       resultFetchAllRecords = true;
+       rresultCollectIds(true);
+}
+
+
+function buildunAPISpan (span, type, id) {
+       var cgi = new CGI();
+       var d = new Date();
+
+       addCSSClass(span,'unapi-id');
+
+       span.setAttribute(
+               'title', 'tag:' + cgi.server_name + ',' +
+               d.getFullYear() + ':' + type + '/' + id
+       );
+}
+
+function rdetailViewMarc(r,id) {
+       hideMe($('rdetail_extras_loading'));
+       $('rdetail_view_marc_box').innerHTML = r.getResultObject();
+
+       var div = elem('div', { "class" : 'hide_me' });
+       var span = div.appendChild( elem('abbr') );
+
+       buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+       $('rdetail_view_marc_box').insertBefore(span, $('rdetail_view_marc_box').firstChild);
+}
+
+
+function rdetailShowLocalCopies() {
+       rdetailShowLocal = true;
+       rdetailBuildInfoRows();
+       hideMe(G.ui.rdetail.cp_info_local);
+       unHideMe(G.ui.rdetail.cp_info_all);
+       hideMe(G.ui.rdetail.cp_info_none); 
+}
+
+function rdetailShowAllCopies() {
+
+       rdetailShowLocal = false;
+       rdetailBuildInfoRows();
+       hideMe(G.ui.rdetail.cp_info_all);
+       unHideMe(G.ui.rdetail.cp_info_local);
+       hideMe(G.ui.rdetail.cp_info_none); 
+}
+
+
+function _rdetailDraw(r) {
+       record = r.getResultObject();
+
+       runEvt('rdetail', 'recordRetrieved', record.doc_id());
+
+       G.ui.rdetail.title.appendChild(text(record.title()));
+       buildSearchLink(STYPE_AUTHOR, record.author(), G.ui.rdetail.author);
+       G.ui.rdetail.isbn.appendChild(text(cleanISBN(record.isbn())));
+       G.ui.rdetail.edition.appendChild(text(record.edition()));
+       G.ui.rdetail.pubdate.appendChild(text(record.pubdate()));
+       G.ui.rdetail.publisher.appendChild(text(record.publisher()));
+       $('rdetail_physical_desc').appendChild(text(record.physical_description()));
+    r = record.types_of_resource();
+    if(r) {
+        G.ui.rdetail.tor.appendChild(text(r[0]));
+           setResourcePic( G.ui.rdetail.tor_pic, r[0]);
+    }
+       G.ui.rdetail.abstr.appendChild(text(record.synopsis()));
+
+    try{
+        if(record.isbn()) {
+            if(ENABLE_ADDED_CONTENT_ATTRIB_LINKS) {
+                unHideMe($('rdetail.jacket_attrib_div'));
+                var href = $('rdetail.jacket_attrib_link').getAttribute('href') +cleanISBN(record.isbn());
+                $('rdetail.jacket_attrib_link').setAttribute('href', href);
+            }
+        } else {
+            hideMe($("rdetail.jacket_attrib_div"));
+            hideMe($("rdetail_img_link"));
+        }
+    } catch(E) {}
+
+
+       // see if the record has any external links 
+       var links = record.online_loc();
+       for( var i = 0; links && links.length > 0 && i < links.length; i = i + 3 ) {
+               var href = links[i];
+               // avoid matching "HTTP: The Complete Reference"
+               if( href.match(/https?:\/|ftps?:\/|mailto:/i) ) {
+                       unHideMe($('rdetail_online_row'));
+                       // MODS can contain a display label (used for the text of the link)
+                       // as well as a note about the URL; many legacy systems conflate the
+                       // two and generate MARC records that expect the note to be used as
+                       // the text of the link, with no display label; here's the canonical
+                       // format:
+                       //
+                       // 856 40 $uhttp://localhost$yDisplay label$zPublic note
+                       //
+                       // Note that the MARC21slim2MODS XSL concatenates $3 and $y together
+                       // (as $y was defined later in MARC21's life as the display label)
+                       var displayLabel = '' + links[i+1];
+                       var note = '' + links[i+2];
+                       if(!displayLabel || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) {
+                               if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) {
+                                       displayLabel = href;
+                               } else {
+                                       displayLabel = note;
+                               }
+                       }
+                       $('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, displayLabel));
+                       if (!note && note != displayLabel) {
+                               $('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
+                       }
+                       $('rdetail_online').appendChild(elem('br'));
+               }
+       }
+
+       // Fill in our unAPI ID, if anyone cares
+       var abbrs = document.getElementsByTagName('abbr');
+       var span;
+       for (var i = 0; i < abbrs.length; i = i + 1) {
+               if (abbrs[i].getAttribute('name') == 'unapi') {
+                       span = abbrs[i];
+                       break;
+               }
+       }
+       buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+       $('rdetail_place_hold').setAttribute(
+               'href','javascript:holdsDrawEditor({record:"'+record.doc_id()+'",type:"T"});');
+
+       $('rdetail_img_link').setAttribute('href', buildISBNSrc(cleanISBN(record.isbn()), 'large'));
+       G.ui.rdetail.image.setAttribute("src", buildISBNSrc(cleanISBN(record.isbn())));
+       runEvt("rdetail", "recordDrawn");
+       recordsCache.push(record);
+
+       rdetailSetExtrasSelector();
+
+       var breq = new Request(FETCH_BRE, [getRid()]);
+       breq.callback( rdetailCheckDeleted );
+       breq.send();
+
+       resultBuildCaches( [ record ] );
+       resultDrawSubjects();
+       resultDrawSeries();
+
+       // grab added content 
+       acCollectData(cleanISBN(record.isbn()), rdetailhandleAC);
+}
+
+
+
+function rdetailCheckDeleted(r) {
+       var br = r.getResultObject()[0];
+       if( isTrue(br.deleted()) ) {
+               hideMe($('rdetail_place_hold'));
+               $('rdetail_more_actions_selector').disabled = true;
+               unHideMe($('rdetail_deleted_exp'));
+       }
+}
+
+function rdetailSetExtrasSelector() {
+       if(!grabUser()) return;
+       unHideMe($('rdetail_more_actions'));
+
+       var req = new Request( 
+               FETCH_CONTAINERS, G.user.session, G.user.id(), 'biblio', 'bookbag' );
+       req.callback(rdetailAddBookbags);
+       req.send();
+}
+
+function rdetailAddBookbags(r) {
+
+       var containers = r.getResultObject();
+       var selector = $('rdetail_more_actions_selector');
+       var found = false;
+       var index = 3;
+       doSelectorActions(selector);
+
+       for( var i = 0; i != containers.length; i++ ) {
+               found = true;
+               var container = containers[i];
+               insertSelectorVal( selector, index++, container.name(), 
+                       "container_" + container.id(), rdetailAddToBookbag,  1 );
+       }
+
+       nextContainerIndex = index;
+}
+
+var _actions = {};
+function rdetailNewBookbag() {
+       var name = prompt($('rdetail_bb_new').innerHTML,"");
+       if(!name) return;
+
+       var id;
+       if( id = containerCreate( name ) ) {
+               alert($('rdetail_bb_success').innerHTML);
+               var selector = $('rdetail_more_actions_selector');
+               insertSelectorVal( selector, nextContainerIndex++, name, 
+                       "container_" + id, rdetailAddToBookbag, 1 );
+               setSelector( selector, 'start' );
+       }
+}
+
+
+function rdetailAddToBookbag() {
+       var selector = $('rdetail_more_actions_selector');
+       var id = selector.options[selector.selectedIndex].value;
+       setSelector( selector, 'start' );
+
+       if( containerCreateItem( id.substring(10), record.doc_id() )) {
+               alert($('rdetail_bb_item_success').innerHTML);
+       }
+}
+
+
+var rdetailMarcFetched = false;
+function rdetailShowExtra(type, args) {
+
+       hideMe($('rdetail_copy_info_div'));
+       hideMe($('rdetail_reviews_div'));
+       hideMe($('rdetail_toc_div'));
+       hideMe($('rdetail_anotes_div'));
+       hideMe($('rdetail_excerpt_div'));
+       hideMe($('rdetail_marc_div'));
+       hideMe($('cn_browse'));
+       hideMe($('rdetail_cn_browse_div'));
+       hideMe($('rdetail_notes_div'));
+
+       removeCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_annotation_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+
+       switch(type) {
+
+               case "copyinfo": 
+                       unHideMe($('rdetail_copy_info_div')); 
+                       addCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+                       break;
+
+               case "reviews": 
+                       addCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_reviews_div')); 
+                       break;
+
+
+               case "excerpt": 
+                       addCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_excerpt_div'));
+                       break;
+
+               case "anotes": 
+                       addCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_anotes_div'));
+                       break;
+
+
+               case "toc": 
+                       addCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_toc_div'));
+                       break;
+
+               case "marc": 
+                       addCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_marc_div')); 
+                       if(rdetailMarcFetched) return;
+                       unHideMe($('rdetail_extras_loading'));
+                       rdetailMarcFetched = true;
+                       var req = new Request( FETCH_MARC_HTML, record.doc_id() );
+                       req.callback(rdetailViewMarc); 
+                       req.send();
+                       break;
+
+               case 'cn':
+                       addCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_cn_browse_div'));
+                       rdetailShowCNBrowse(defaultCN, getLocation(), null, true);
+                       break;
+
+       }
+}
+
+function rdetailVolumeDetails(args) {
+       var row = $(args.rowid);
+       var tbody = row.parentNode;
+       cpdBuild( tbody, row, record, args.cn, args.org, args.depth );
+       return;
+}
+
+
+function rdetailBuildCNList() {
+
+       var select = $('cn_browse_selector');
+       var index = 0;
+       var arr = [];
+       for( var cn in callnumberCache ) arr.push( cn );
+       arr.sort();
+
+       if( arr.length == 0 ) {
+               hideMe($('rdetail_cn_browse_select_div'));
+               return;
+       }
+
+       for( var i in arr ) {
+               var cn = arr[i];
+               var opt = new Option(cn);
+               select.options[index++] = opt;
+       }
+       select.onchange = rdetailGatherCN;
+}
+
+function rdetailGatherCN() {
+       var cn = getSelectorVal($('cn_browse_selector'));
+       rdetailShowCNBrowse( cn, getLocation(), getDepth(), true );
+       setSelector( $('cn_browse_selector'), cn );
+}
+
+
+function rdetailShowCNBrowse( cn, loc, depth, fromOnclick ) {
+
+       if(!cn) {
+               unHideMe($('cn_browse_none'));
+               hideMe($('rdetail_cn_browse_select_div'));
+               return;
+       }
+               
+       unHideMe($('rdetail_cn_browse_select_div'));
+       rdetailBuildCNList();
+       setSelector( $('cn_browse_selector'), cn );
+       hideMe($('rdetail_copy_info_div'));
+       hideMe($('rdetail_reviews_div'));
+       hideMe($('rdetail_toc_div'));
+       hideMe($('rdetail_marc_div'));
+       unHideMe($('rdetail_cn_browse_div'));
+       unHideMe($('cn_browse'));
+       if( !rdetailLocalOnly && ! fromOnclick ) depth = findOrgDepth(globalOrgTree);
+       cnBrowseGo(cn, loc, depth);
+}
+
+function rdetailhandleAC(data) {
+
+       if( data.reviews.html ) {
+               $('rdetail_review_container').innerHTML = data.reviews.html;
+               unHideMe($('rdetail_reviews_link'));
+       }
+
+       if( data.toc.html ) {
+               $('rdetail_toc_div').innerHTML = data.toc.html;
+               unHideMe($('rdetail_toc_link'));
+       }
+
+       if( data.excerpt.html ) {
+               $('rdetail_excerpt_div').innerHTML = data.excerpt.html;
+               unHideMe($('rdetail_excerpt_link'));
+       }
+
+       if( data.anotes.html ) {
+               $('rdetail_anotes_div').innerHTML = data.anotes.html;
+               unHideMe($('rdetail_anotes_link'));
+       }
+}
+
+function rdetailShowReviews(r) {
+       hideMe($('rdetail_extras_loading'));
+       var res = r.getResultObject();
+       var par = $('rdetail_reviews_div');
+       var template = par.removeChild($('rdetail_review_template'));
+       if( res && res.length > 0 ) {
+               unHideMe($('rdetail_reviews_link'));
+               for( var i = 0; i != res.length; i++ ) {
+                       var rev = res[i];       
+                       if( rev.text && rev.info ) {
+                               var node = template.cloneNode(true);
+                               $n(node, 'review_header').appendChild(text(rev.info));
+                               $n(node, 'review_text').appendChild(text(rev.text));
+                               par.appendChild(node);
+                       }
+               }
+       }
+}
+
+
+function rdetailShowTOC(r) {
+       hideMe($('rdetail_extras_loading'));
+       var resp = r.getResultObject();
+       if(resp) {
+               unHideMe($('rdetail_toc_link'));
+               $('rdetail_toc_div').innerHTML = resp;
+       }
+}
+
+
+function rdetailBuildInfoRows() {
+       var req;
+       if( rdetailShowLocal ) 
+               req = new Request(FETCH_COPY_COUNTS_SUMMARY, record.doc_id(), getLocation(), getDepth())
+       else
+               req = new Request(FETCH_COPY_COUNTS_SUMMARY, record.doc_id());
+       req.callback(_rdetailBuildInfoRows);
+       req.send();
+}
+
+function _rdetailRows(node) {
+
+       if( rdetailShowLocal && getLocation() != globalOrgTree.id() ) {
+
+               var loc = findOrgUnit(getLocation());
+
+               if( node ) {
+                       if( !orgIsMine(loc, node) ) return;
+
+               } else {
+
+                       for( var i = 0; i < globalOrgTree.children().length; i++ ) {
+                               var org = findOrgUnit(globalOrgTree.children()[i]);
+                               if( orgIsMine(org, loc) ) {
+                                       node = org;
+                                       break;
+                               }
+                       }
+               } 
+       }
+
+    if(!node && findOrgType(globalOrgTree.ou_type()).can_have_vols())
+        node = globalOrgTree;
+
+
+    /* don't show hidden orgs */
+
+       if(node) {
+
+        if(!isXUL() && !isTrue(node.opac_visible())) return;
+
+               var row = copyRow.cloneNode(true);
+               row.id = "cp_info_" + node.id();
+
+               var libtd = findNodeByName( row, config.names.rdetail.lib_cell );
+               var cntd  = findNodeByName( row, config.names.rdetail.cn_cell );
+               var cpctd = findNodeByName( row, config.names.rdetail.cp_count_cell );
+               var actions = $n(row, 'rdetail_actions_cell');
+       
+               var p = libtd.getElementsByTagName('a')[0];
+               libtd.insertBefore(text(node.name()), p);
+               libtd.setAttribute("style", "padding-left: " + ((findOrgDepth(node) - 1)  * 9) + "px;");
+       
+               if(!findOrgType(node.ou_type()).can_have_vols()) {
+
+                       row.removeChild(cntd);
+                       row.removeChild(cpctd);
+                       row.removeChild(actions);
+                       row.setAttribute('novols', '1');
+
+                       libtd.setAttribute("colspan", numStatuses + 3 );
+                       libtd.colSpan = numStatuses + 3;
+                       addCSSClass(row, 'copy_info_region_row');
+               } 
+       
+               copyRowParent.appendChild(row);
+
+       } else { node = globalOrgTree; }
+
+       for( var c in node.children() ) 
+               _rdetailRows(node.children()[c]);
+}
+
+function rdetailCNPrint(orgid, cn) {
+       var div = cpdBuildPrintWindow( record, orgid);
+       var template = div.removeChild($n(div, 'cnrow'));
+       var rowNode = $("cp_info_" + orgid);
+       cpdStylePopupWindow(div);
+       openWindow(div.innerHTML);
+}
+
+var localCNFound = false;
+var ctr = 0;
+function _rdetailBuildInfoRows(r) {
+
+       removeChildren(copyRowParent);
+
+       _rdetailRows();
+
+       var summary = r.getResultObject();
+       if(!summary) return;
+
+       var found = false;
+       for( var i = 0; i < summary.length; i++ ) {
+
+               var arr = summary[i];
+               globalCNCache[arr[1]] = 1;
+               var thisOrg = findOrgUnit(arr[0]);
+               var rowNode = $("cp_info_" + thisOrg.id());
+               if(!rowNode) continue;
+
+               if(rowNode.getAttribute("used")) {
+
+                       if( rowNode.nextSibling ) {
+                sib = rowNode.nextSibling;
+                o ='cp_info_'+thisOrg.id()+'_';
+                /* push the new row on as the last row for this org unit */
+                while( sib && sib.id.match(o) ) {
+                    sib = sib.nextSibling;
+                }
+                if(sib)
+                                   rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+                else
+                    rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+            } else {
+                               rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+            }
+
+                       var n = findNodeByName( rowNode, config.names.rdetail.lib_cell );
+                       n.appendChild(text(thisOrg.name()));
+                       n.setAttribute("style", "padding-left: " + ((findOrgDepth(thisOrg) - 1)  * 9) + "px;");
+                       rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr); 
+
+               } else {
+                       rowNode.setAttribute("used", "1");
+               }
+
+               var cpc_temp = rowNode.removeChild(
+                       findNodeByName(rowNode, config.names.rdetail.cp_count_cell));
+
+               rdetailApplyStatuses(rowNode, cpc_temp, arr[2]);
+
+               var isLocal = false;
+               if( orgIsMine( findOrgUnit(getLocation()), thisOrg ) ) { 
+                       found = true; 
+                       isLocal = true; 
+                       if(!localCNFound) {
+                               localCNFound = true;
+                               defaultCN = arr[1];
+                       }
+               }
+
+               //if(isLocal) unHideMe(rowNode);
+               unHideMe(rowNode);
+
+               rdetailSetPath( thisOrg, isLocal );
+               rdetailBuildBrowseInfo( rowNode, arr[1], isLocal, thisOrg );
+
+               if( i == summary.length - 1 && !defaultCN) defaultCN = arr[1];
+       }
+
+       if(!found) unHideMe(G.ui.rdetail.cp_info_none);
+}
+
+
+function rdetailBuildBrowseInfo(row, cn, local, orgNode) {
+
+       if(local) {
+               var cache = callnumberCache[cn];
+               if( cache ) cache.count++;
+               else callnumberCache[cn] = { count : 1 };
+       }
+
+       var depth = getDepth();
+       if( !local ) depth = findOrgDepth(globalOrgTree);
+
+       $n(row, 'rdetail_callnumber_cell').appendChild(text(cn));
+
+       _debug('setting action clicks for cn ' + cn);
+
+       var dHref = 'javascript:rdetailVolumeDetails('+
+               '{rowid : "'+row.id+'", cn :"'+cn+'", depth:"'+depth+'", org:"'+orgNode.id()+'", local: '+local+'});';
+
+       var bHref = 'javascript:rdetailShowCNBrowse("' + cn + '", '+orgNode.id()+', "'+depth+'");'; 
+
+       $n(row, 'details').setAttribute('href', dHref);
+       $n(row, 'browse').setAttribute('href', bHref);
+
+       if(isXUL()) {
+               unHideMe($n(row, 'hold_div'));
+               $n(row, 'hold').onclick = function() {
+                       var req = new Request(FETCH_VOLUME_BY_INFO, cn, record.doc_id(), orgNode.id());
+                       req.callback(
+                               function(r) {
+                                       var vol = r.getResultObject();
+                                       holdsDrawEditor({type: 'V', volumeObject : vol});
+                               }
+                       );
+                       req.send();
+               };
+       }
+}
+
+
+// sets the path to org as 'active' and displays the path if it's local 
+function rdetailSetPath(org, local) {
+       if( findOrgDepth(org) == 0 ) return;
+       var row = $("cp_info_" + org.id());
+       row.setAttribute("hasinfo", "1");
+       unHideMe(row);
+       rdetailSetPath(findOrgUnit(org.parent_ou()), local);
+}
+
+
+
+
+//Append all the statuses for a give summary to the 
+//copy summary table 
+function rdetailApplyStatuses( row, template, statuses ) {
+       for( var j in _statusPositions ) {
+               var stat = _statusPositions[j];
+               var val = statuses[stat.id()];
+               var nn = template.cloneNode(true);
+               if(val) nn.appendChild(text(val));
+               else nn.appendChild(text(0));
+               row.appendChild(nn);    
+       }
+}
+
+
+var _statusPositions = {};
+
+//Add one td (creating a new column) to the copy summary
+//table for each opac_visible copy status
+
+function rdetailBuildStatusColumns() {
+
+       rdetailGrabCopyStatuses();
+       var parent = statusRow;
+       var template = parent.removeChild(G.ui.rdetail.cp_status);
+
+       var i = 0;
+       for( i = 0; i < cp_statuses.length; i++ ) {
+
+               var c = cp_statuses[i];
+               if( c && isTrue(c.opac_visible()) ) {
+                       var name = c.name();
+                       _statusPositions[i] = c;
+                       var node = template.cloneNode(true);
+                       var data = findNodeByName( node, config.names.rdetail.cp_status);
+       
+                       data.appendChild(text(name));
+                       parent.appendChild(node);
+               }
+       }       
+
+       numStatuses = 0;
+       for(x in _statusPositions) numStatuses++; 
+}
+
+function rdetailGrabCopyStatuses() {
+       if(cp_statuses) return cp_statuses;
+   var req = new Request(FETCH_COPY_STATUSES);
+   req.send(true);
+       cp_statuses = req.result();
+       cp_statuses = cp_statuses.sort(_rdetailSortStatuses);
+}
+
+function _rdetailSortStatuses(a, b) {
+       return parseInt(a.id()) - parseInt(b.id());
+}
+
index a990666..e69de29 100644 (file)
@@ -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/OpenILS/util_overlay_chrome.xul b/Open-ILS/xul/staff_client/chrome/content/OpenILS/util_overlay_chrome.xul
new file mode 100644 (file)
index 0000000..168e714
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="../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" />   
+               <messagecatalog id="offlineStrings" src='chrome://open_ils_staff_client/locale/offline.properties'/>
+               <script>dump('finished openils_util_overlay\n');</script>
+       </scripts>
+
+</overlay>
+
index a7ec139..1193017 100644 (file)
@@ -4,7 +4,7 @@
 
        <!-- Overlays for this XUL file -->
        <?xul-overlay href="chrome://open_ils_staff_client/content/admin/survey_overlay.xul"?>
-       <?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
+       <?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay_chrome.xul"?>
 
 <!-- This DTD declaration needs to be fixed for Mozilla locales -->
 <!DOCTYPE wizard SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
index 479fb3b..46f7e8f 100644 (file)
@@ -13,7 +13,7 @@
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay_chrome.xul"?>
 
 <window id="opac_win"
        onload="try { my_init(); } catch(E) { alert(E); }"
index 6b307fc..ebe5e0f 100644 (file)
@@ -15,7 +15,7 @@
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- OVERLAYS -->
 <!--
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay_chrome.xul"?>
 -->
 
 <window id="main_win" 
index 6d5ecec..98e6922 100644 (file)
@@ -21,7 +21,7 @@
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- OVERLAYS -->
 <?xul-overlay href="chrome://open_ils_staff_client/content/main/menu_frame_overlay.xul"?>
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay_chrome.xul"?>
 <!--
 <?xul-overlay href="/xul/server/main/menu_frame_overlay.xul"?>
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
index 47ea663..9e33902 100644 (file)
@@ -13,7 +13,7 @@
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- OVERLAYS -->
-<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="chrome://open_ils_staff_client/content/OpenILS/util_overlay_chrome.xul"?>
 
 <window id="util_browser_win" 
        onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
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 317e911..59531a1 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 0a77d22..01b0c9c 100644 (file)
@@ -75,7 +75,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 1b42234..a028d9b 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 88af0ef..59683f2 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 5202c82..e14f148 100644 (file)
@@ -93,9 +93,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 6061b67..f29be49 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 8d29cb5..88e31f0 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 03c9141..7e52539 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 42925dd..5ec3989 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 58b5fb1..357f121 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 5dd8ad9..41578df 100644 (file)
                                <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>
                                                <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 15c41d7..077c6f7 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 decefa0..a5a37e8 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 2209916..4b3223a 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 2d1dea2..d0e4224 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="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"/>