[open-ils-commits] r11018 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 31 21:31:29 EDT 2008
Author: phasefx
Date: 2008-10-31 21:31:27 -0400 (Fri, 31 Oct 2008)
New Revision: 11018
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/cat/z3950.js
trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul
Log:
more standardization of universal list actions
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2008-11-01 00:42:06 UTC (rev 11017)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2008-11-01 01:31:27 UTC (rev 11018)
@@ -2096,9 +2096,13 @@
<!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">
Modified: trunk/Open-ILS/xul/staff_client/server/cat/z3950.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/z3950.js 2008-11-01 00:42:06 UTC (rev 11017)
+++ trunk/Open-ILS/xul/staff_client/server/cat/z3950.js 2008-11-01 01:31:27 UTC (rev 11018)
@@ -58,7 +58,7 @@
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'); }
@@ -82,16 +82,10 @@
{
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'); }
@@ -409,6 +403,9 @@
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 = [];
@@ -491,6 +488,9 @@
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) {
Modified: trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul 2008-11-01 00:42:06 UTC (rev 11017)
+++ trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul 2008-11-01 01:31:27 UTC (rev 11018)
@@ -82,8 +82,10 @@
<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" />
@@ -164,9 +166,18 @@
<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"/>
More information about the open-ils-commits
mailing list