<!ENTITY staff.cat.z3950.search_form.accesskey "F">
<!ENTITY staff.cat.z3950.page_next.label "Fetch More Results">
<!ENTITY staff.cat.z3950.page_next.accesskey "M">
-<!ENTITY staff.cat.z3950.export.label "CSV to Clipboard">
-<!ENTITY staff.cat.z3950.clip_button.label "Copy to Clipboard">
-<!ENTITY staff.cat.z3950.save_cols_btn.label "Save Columns">
+<!ENTITY staff.cat.z3950.list_actions.label "List Actions">
+<!ENTITY staff.cat.z3950.list_actions.accesskey "L">
+<!ENTITY staff.cat.z3950.menuitem.csv_to_clipboard.label "Copy List CSV to Clipboard">
+<!ENTITY staff.cat.z3950.menuitem.csv_to_file.label "Save List CSV to File">
+<!ENTITY staff.cat.z3950.menuitem.csv_to_printer.label "Print List CSV">
+<!ENTITY staff.cat.z3950.menuitem.copy_to_clipboard.label "Copy Field from selected row to Clipboard">
+<!ENTITY staff.cat.z3950.menuitem.save_columns.label "Save List Configuration">
<!ENTITY staff.cat.z3950.marc_view.label "MARC View">
<!ENTITY staff.cat.z3950.marc_view.accesskey "V">
<!ENTITY staff.cat.z3950.marc_import_overlay.label "MARC Editor for Overlay">
try {
JSAN.use('util.functional');
var sel = obj.list.retrieve_selection();
- document.getElementById('clip_button').disabled = sel.length < 1;
+ document.getElementById('sel_clip').setAttribute('disabled', sel.length < 1);
var list = util.functional.map_list(
sel,
function(o) { return o.getAttribute('retrieve_id'); }
{
control_map : {
'save_columns' : [ [ 'command' ], function() { obj.list.save_columns(); } ],
- 'sel_clip' : [
- ['command'],
- function() { obj.list.clipboard(); }
- ],
- 'cmd_export' : [
- ['command'],
- function() {
- obj.list.dump_csv_to_clipboard();
- }
- ],
+ 'sel_clip' : [ ['command'], function() { obj.list.clipboard(); } ],
+ 'cmd_z3950_csv_to_clipboard' : [ ['command'], function() { obj.list.dump_csv_to_clipboard(); } ],
+ 'cmd_z3950_csv_to_printer' : [ ['command'], function() { obj.list.dump_csv_to_printer(); } ],
+ 'cmd_z3950_csv_to_file' : [ ['command'], function() { obj.list.dump_csv_to_file( { 'defaultFileName' : 'z3950_results.txt' } ); } ],
'cmd_broken' : [
['command'],
function() { alert('Not Yet Implemented'); }
x.appendChild( document.createTextNode($("catStrings").getString('staff.cat.z3950.initial_search.searching')));
obj.search_params = {}; obj.list.clear();
obj.controller.view.page_next.disabled = true;
+ obj.controller.view.cmd_z3950_csv_to_file.setAttribute('disabled','true');
+ obj.controller.view.cmd_z3950_csv_to_clipboard.setAttribute('disabled','true');
+ obj.controller.view.cmd_z3950_csv_to_printer.setAttribute('disabled','true');
obj.search_params.service = [];
obj.search_params.username = [];
x.appendChild( document.createTextNode($("catStrings").getFormattedString('staff.cat.z3950.handle_results.server_error', [results.textcode, results.desc])));
return;
}
+ obj.controller.view.cmd_z3950_csv_to_file.setAttribute('disabled','false');
+ obj.controller.view.cmd_z3950_csv_to_clipboard.setAttribute('disabled','false');
+ obj.controller.view.cmd_z3950_csv_to_printer.setAttribute('disabled','false');
if (typeof results.length == 'undefined') results = [ results ];
for (var i = 0; i < results.length; i++) {
if (results[i].query) {
<commandset id="cat_z3950_cmds">
<command id="cmd_broken" />
- <command id="cmd_export" />
- <command id="sel_clip" />
+ <command id="sel_clip" disabled="true" />
+ <command id="cmd_z3950_csv_to_printer" disabled="true" />
+ <command id="cmd_z3950_csv_to_clipboard" disabled="true" />
+ <command id="cmd_z3950_csv_to_file" disabled="true" />
<command id="save_columns" />
<command id="toggle_form" />
<command id="marc_view" />
<hbox id="result_message" />
<hbox>
<button id="page_next" label="&staff.cat.z3950.page_next.label;" accesskey="&staff.cat.z3950.page_next.accesskey;" disabled="true"/>
- <button id="export" label="&staff.cat.z3950.export.label;" command="cmd_export" accesskey=""/>
- <button id="clip_button" command="sel_clip" label="&staff.cat.z3950.clip_button.label;" disabled="true"/>
- <button id="save_cols_btn" command="save_columns" label="&staff.cat.z3950.save_cols_btn.label;"/>
+ <button id="z3950_list_actions" oncommand="this.firstChild.showPopup();"
+ label="&staff.cat.z3950.list_actions.label;"
+ accesskey="&staff.cat.z3950.list_actions.accesskey;"
+ type="menu" allowevents="true">
+ <menupopup id="z3950_list_actions_popup">
+ <menuitem command="sel_clip" label="&staff.cat.z3950.menuitem.copy_to_clipboard.label;" disabled="true" />
+ <menuitem command="cmd_z3950_csv_to_printer" label="&staff.cat.z3950.menuitem.csv_to_printer.label;" />
+ <menuitem command="cmd_z3950_csv_to_clipboard" label="&staff.cat.z3950.menuitem.csv_to_clipboard.label;" />
+ <menuitem command="cmd_z3950_csv_to_file" label="&staff.cat.z3950.menuitem.csv_to_file.label;" />
+ <menuitem command="save_columns" label="&staff.cat.z3950.menuitem.save_columns.label;" />
+ </menupopup>
+ </button>
<spacer flex="1"/>
<button id="marc_view_btn" command="marc_view" disabled="true"/>
<button id="marc_import_overlay" label="&staff.cat.z3950.marc_import_overlay.label;" accesskey="&staff.cat.z3950.marc_import_overlay.accesskey;" disabled="true"/>