return 'f';
}
+ function copy_to_clipboard(ev) {
+ try {
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ var text;
+ if (typeof ev == 'object') {
+ if (typeof ev.target != 'undefined') {
+ if (typeof ev.target.textContent != 'undefined') if (ev.target.textContent) text = ev.target.textContent;
+ if (typeof ev.target.value != 'undefined') if (ev.target.value) text = ev.target.value;
+ }
+ } else if (typeof ev == 'string') {
+ text = ev;
+ }
+ const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
+ .getService(Components.interfaces.nsIClipboardHelper);
+ gClipboardHelper.copyString(text);
+ alert('Copied "'+text+'" to clipboard.');
+ } catch(E) {
+ alert('Clipboard action failed: ' + E);
+ }
+ }
</html:tr>
<html:tr valign="top">
<html:td>
- <html:span style="font-weight: bold;">TCN: </html:span><html:span id="tcn" />
+ <html:span style="font-weight: bold;">TCN: </html:span><html:span id="tcn" style="text-decoration: underline; color: blue;" onclick="copy_to_clipboard(event)"/>
</html:td>
<html:td>
<html:span style="font-weight: bold;">Created By: </html:span><html:span id="creator" />
<row id="pdsgr0">
<label id="PatronSummaryContact_library_card_label" class="text_left card label"
value="&staff.patron_display.library_card.label;"/>
- <!--<label id="patron_card" class="card value"/>-->
- <textbox id="patron_card" class="plain" readonly="true" onclick="this.select()"/>
+ <label id="patron_card" class="card value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="copy_to_clipboard(event)"/>
+ <!--<textbox id="patron_card" class="plain" readonly="true" onclick="this.select()"/>-->
</row>
<row id="pdsgr1">
<label id="PatronSummaryContact_ident_label" class="text_left"
<row id="pdcgpr5">
<label id="PatronSummaryContact_email_label" class="text_left email label"
value="&staff.patron_display.email.label;" />
- <label id="patron_email" class="email value"/>
+ <label id="patron_email" class="email value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="copy_to_clipboard(event)"/>
</row>
<row id="pdsgpr6"><label id="pdsgpr6l" value=" "/></row>