[open-ils-commits] r9049 -
trunk/Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 16 04:12:56 EDT 2008
Author: phasefx
Date: 2008-03-16 03:39:04 -0400 (Sun, 16 Mar 2008)
New Revision: 9049
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js
trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul
trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul
Log:
layout and source tweaks
Modified: trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2008-03-16 04:46:29 UTC (rev 9048)
+++ trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2008-03-16 07:39:04 UTC (rev 9049)
@@ -116,16 +116,16 @@
try {
JSAN.use('util.functional');
var sel = obj.list1.retrieve_selection();
- document.getElementById('clip_button1').disabled = sel.length < 1;
+ obj.controller.view.sel_clip1.setAttribute('disabled', sel.length < 1 ? "true" : "false");
obj.selection_list1 = util.functional.map_list(
sel,
function(o) { return JSON2js(o.getAttribute('retrieve_id')); }
);
obj.error.sdump('D_TRACE','circ/record_buckets: selection list 1 = ' + js2JSON(obj.selection_list1) );
if (obj.selection_list1.length == 0) {
- obj.controller.view.record_buckets_sel_add.disabled = true;
+ obj.controller.view.cmd_record_buckets_sel_add.setAttribute('disabled','true');
} else {
- obj.controller.view.record_buckets_sel_add.disabled = false;
+ obj.controller.view.cmd_record_buckets_sel_add.setAttribute('disabled','false');
}
} catch(E) {
alert('FIXME: ' + E);
@@ -146,22 +146,18 @@
try {
JSAN.use('util.functional');
var sel = obj.list2.retrieve_selection();
- document.getElementById('clip_button2').disabled = sel.length < 1;
+ obj.controller.view.sel_clip2.setAttribute('disabled', sel.length < 1 ? "true" : "false");
obj.selection_list2 = util.functional.map_list(
sel,
function(o) { return JSON2js(o.getAttribute('retrieve_id')); }
);
obj.error.sdump('D_TRACE','circ/record_buckets: selection list 2 = ' + js2JSON(obj.selection_list2) );
if (obj.selection_list2.length == 0) {
- obj.controller.view.record_buckets_delete_item.disabled = true;
- obj.controller.view.record_buckets_delete_item.setAttribute('disabled','true');
- obj.controller.view.record_buckets_export.disabled = true;
- obj.controller.view.record_buckets_export.setAttribute('disabled','true');
+ obj.controller.view.cmd_record_buckets_delete_item.setAttribute('disabled','true');
+ obj.controller.view.cmd_pending_buckets_to_record_buckets.setAttribute('disabled','true');
} else {
- obj.controller.view.record_buckets_delete_item.disabled = false;
- obj.controller.view.record_buckets_delete_item.setAttribute('disabled','false');
- obj.controller.view.record_buckets_export.disabled = false;
- obj.controller.view.record_buckets_export.setAttribute('disabled','false');
+ obj.controller.view.cmd_record_buckets_delete_item.setAttribute('disabled','false');
+ obj.controller.view.cmd_pending_buckets_to_record_buckets.setAttribute('disabled','false');
}
} catch(E) {
alert('FIXME: ' + E);
@@ -240,6 +236,15 @@
ev.target.setAttribute('value',bucket_id);
}
if (!bucket_id) return;
+ var x = document.getElementById('info_box');
+ x.setAttribute('hidden','true');
+ obj.controller.view.cmd_record_buckets_delete_bucket.setAttribute('disabled','true');
+ obj.controller.view.cmd_record_buckets_refresh.setAttribute('disabled','true');
+ obj.controller.view.record_buckets_export_records.disabled = true;
+ obj.controller.view.cmd_merge_records.setAttribute('disabled','true');
+ obj.controller.view.cmd_delete_records.setAttribute('disabled','true');
+ obj.controller.view.cmd_sel_opac.setAttribute('disabled','true');
+ obj.controller.view.record_buckets_list_actions.disabled = true;
var bucket = obj.network.simple_request(
'BUCKET_FLESH',
[ ses(), 'biblio', bucket_id ]
@@ -253,6 +258,14 @@
return;
}
try {
+ obj.controller.view.cmd_record_buckets_delete_bucket.setAttribute('disabled','false');
+ obj.controller.view.cmd_record_buckets_refresh.setAttribute('disabled','false');
+ obj.controller.view.record_buckets_export_records.disabled = false;
+ obj.controller.view.cmd_merge_records.setAttribute('disabled','false');
+ obj.controller.view.cmd_delete_records.setAttribute('disabled','false');
+ obj.controller.view.cmd_sel_opac.setAttribute('disabled','false');
+ obj.controller.view.record_buckets_list_actions.disabled = false;
+
var x = document.getElementById('info_box');
x.setAttribute('hidden','false');
x = document.getElementById('bucket_number');
@@ -283,14 +296,18 @@
}, false);
obj.controller.view.bucket_menulist = ml;
JSAN.use('util.widgets'); util.widgets.dispatch('change_bucket',ml);
- document.getElementById('refresh').addEventListener( 'command', function() {
- JSAN.use('util.widgets'); util.widgets.dispatch('change_bucket',ml);
- }, false);
};
},
],
- 'record_buckets_add' : [
+ 'cmd_record_buckets_refresh' : [
+ ['command'],
+ function() {
+ JSAN.use('util.widgets'); util.widgets.dispatch('change_bucket',obj.controller.view.bucket_menulist);
+ }
+ ],
+
+ 'cmd_record_buckets_add' : [
['command'],
function() {
var bucket_id = obj.controller.view.bucket_menulist.value;
@@ -316,7 +333,7 @@
}
}
],
- 'record_buckets_sel_add' : [
+ 'cmd_record_buckets_sel_add' : [
['command'],
function() {
var bucket_id = obj.controller.view.bucket_menulist.value;
@@ -344,7 +361,7 @@
}
],
- 'record_buckets_export' : [
+ 'cmd_pending_buckets_to_record_buckets' : [
['command'],
function() {
for (var i = 0; i < obj.selection_list2.length; i++) {
@@ -358,7 +375,7 @@
}
],
- 'record_buckets_delete_item' : [
+ 'cmd_record_buckets_delete_item' : [
['command'],
function() {
for (var i = 0; i < obj.selection_list2.length; i++) {
@@ -380,7 +397,7 @@
);
}
],
- 'record_buckets_delete_bucket' : [
+ 'cmd_record_buckets_delete_bucket' : [
['command'],
function() {
try {
@@ -405,7 +422,7 @@
}
}
],
- 'record_buckets_new_bucket' : [
+ 'cmd_record_buckets_new_bucket' : [
['command'],
function() {
try {
@@ -668,7 +685,8 @@
}
}
],
-
+ 'record_buckets_export_records' : [ ['render'], function(){} ],
+ 'record_buckets_list_actions' : [ ['render'], function(){} ]
}
}
);
Modified: trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul 2008-03-16 04:46:29 UTC (rev 9048)
+++ trunk/Open-ILS/xul/staff_client/server/cat/record_buckets.xul 2008-03-16 07:39:04 UTC (rev 9049)
@@ -82,8 +82,8 @@
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale' -->/circ.properties"/>
<commandset id="record_buckets_cmds">
- <command id="sel_clip1" />
- <command id="sel_clip2" />
+ <command id="sel_clip1" disabled="true"/>
+ <command id="sel_clip2" disabled="true"/>
<command id="save_columns1" />
<command id="save_columns2" />
@@ -91,17 +91,27 @@
<command id="cmd_pending_buckets_csv_to_clipboard" />
<command id="cmd_pending_buckets_csv_to_file" />
+ <command id="cmd_record_buckets_new_bucket" />
+ <command id="cmd_record_buckets_delete_bucket" disabled="true"/>
+ <command id="cmd_record_buckets_refresh" disabled="true"/>
+
+ <command id="cmd_record_buckets_delete_item" />
+ <command id="cmd_pending_buckets_to_record_buckets" />
+
<command id="cmd_record_buckets_csv_to_printer" />
<command id="cmd_record_buckets_csv_to_clipboard" />
<command id="cmd_record_buckets_csv_to_file" />
+
+ <command id="cmd_record_buckets_add" />
+ <command id="cmd_record_buckets_sel_add" />
- <command id="cmd_merge_records" />
+ <command id="cmd_merge_records" disabled="true" />
<command id="cmd_export_records_usmarc" />
<command id="cmd_export_records_unimarc" />
<command id="cmd_export_records_xml" />
<command id="cmd_export_records_bre" />
- <command id="cmd_delete_records" />
- <command id="cmd_sel_opac" />
+ <command id="cmd_delete_records" disabled="true" />
+ <command id="cmd_sel_opac" disabled="true" />
</commandset>
<box id="record_buckets_main" />
Modified: trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul 2008-03-16 04:46:29 UTC (rev 9048)
+++ trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul 2008-03-16 07:39:04 UTC (rev 9049)
@@ -31,30 +31,32 @@
</vbox>
<hbox id="pending_buckets_bottom_ui">
- <button id="pending_buckets_export_list" label="Export List" type="menu" allowevents="true">
- <menupopup id="pending_buckets_export_actions">
+ <button id="pending_buckets_list_actions" label="List Actions" type="menu" allowevents="true">
+ <menupopup id="pending_buckets_list_actions_popup">
+ <menuitem command="sel_clip1" label="Copy Field from selected row to Clipboard" disabled="true" />
<menuitem command="cmd_pending_buckets_csv_to_printer" label="Print List CSV" />
<menuitem command="cmd_pending_buckets_csv_to_clipboard" label="Copy List CSV to Clipboard" accesskey=""/>
<menuitem command="cmd_pending_buckets_csv_to_file" label="Save List CSV to File" accesskey=""/>
+ <menuitem command="save_columns1" label="Save List Configuration" />
</menupopup>
</button>
- <button id="save_button1" command="save_columns1" label="Save Columns" />
- <button id="clip_button1" command="sel_clip1" label="Copy to Clipboard" disabled="true" />
<spacer flex="1"/>
- <button label="Add All" id="record_buckets_add" accesskey="A" image="/xul/server/skin/media/images/down_arrow.gif"/>
- <button label="Add Selected" id="record_buckets_sel_add" accesskey="" image="/xul/server/skin/media/images/down_arrow.gif"/>
+ <button command="cmd_record_buckets_add" label="Add All" accesskey="A" image="/xul/server/skin/media/images/down_arrow.gif"/>
+ <button command="cmd_record_buckets_sel_add" label="Add Selected" accesskey="" image="/xul/server/skin/media/images/down_arrow.gif"/>
</hbox>
<hbox id="record_buckets_top_ui">
<hbox id="record_buckets_menulist_placeholder" />
- <button id="record_buckets_new_bucket" label="New Bucket"/>
- <button id="record_buckets_delete_bucket" label="Delete Bucket"/>
- <button id="refresh" label="Refresh"/>
+ <button id="record_buckets_action_list" label="Bucket Actions" type="menu" allowevents="true">
+ <menupopup id="record_buckets_action_list_popup">
+ <menuitem command="cmd_record_buckets_new_bucket" label="New Bucket"/>
+ <menuitem command="cmd_record_buckets_delete_bucket" label="Delete Bucket"/>
+ <menuitem command="cmd_record_buckets_refresh" label="Refresh"/>
+ </menupopup>
+ </button>
<spacer flex="1"/>
- <button id="save_button2" command="save_columns2" label="Save Columns" />
- <button id="clip_button2" command="sel_clip2" label="Copy to Clipboard" disabled="true" />
- <button id="record_buckets_delete_item" label="Delete Selected" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
- <button id="record_buckets_export" label="Add Selected" disabled="true" image="/xul/server/skin/media/images/up_arrow.gif"/>
+ <button command="cmd_record_buckets_delete_item" label="Remove Selected from Bucket" disabled="true" image="/xul/server/skin/media/images/icon_delete.gif"/>
+ <button command="cmd_pending_buckets_to_record_buckets" label="Add Selected to Bucket" disabled="true" image="/xul/server/skin/media/images/up_arrow.gif"/>
</hbox>
<hbox id="info_box" hidden="true" style="font-size: large;">
@@ -66,20 +68,22 @@
</hbox>
<hbox id="record_buckets_bottom_ui">
- <button id="record_buckets_export_list" label="Export List" type="menu" allowevents="true">
- <menupopup id="record_buckets_export_actions">
+ <button id="record_buckets_list_actions" label="List Actions" type="menu" allowevents="true" disabled="true">
+ <menupopup id="record_buckets_list_actions_popup">
+ <menuitem command="sel_clip2" label="Copy Field from selected row to Clipboard" disabled="true" />
<menuitem command="cmd_record_buckets_csv_to_printer" label="Print List CSV" />
<menuitem command="cmd_record_buckets_csv_to_clipboard" label="Copy List CSV to Clipboard" accesskey=""/>
<menuitem command="cmd_record_buckets_csv_to_file" label="Save List CSV to File" accesskey=""/>
+ <menuitem command="save_columns2" label="Save List Configuration" />
</menupopup>
</button>
<spacer flex="1"/>
<hbox style="background: grey">
<vbox><spacer flex="1"/><label value="Batch:" style="font-weight: bold"/><spacer flex="1"/></vbox>
<button command="cmd_sel_opac" label="Show All in Catalog" accesskey="S"/>
- <button id="record_buckets_delete_records" command="cmd_delete_records" label="Delete All Records"/>
- <button id="record_buckets_merge_records" command="cmd_merge_records" label="Merge All Records"/>
- <button id="record_buckets_export_records" label="Export All Records" type="menu" allowevents="true">
+ <button command="cmd_delete_records" label="Delete All Records"/>
+ <button command="cmd_merge_records" label="Merge All Records"/>
+ <button id="record_buckets_export_records" label="Export All Records" type="menu" allowevents="true" disabled="true">
<menupopup id="record_buckets_export_record_types" allowevents="true">
<menuitem command="cmd_export_records_usmarc" label="MARC21"/>
<menuitem command="cmd_export_records_unimarc" label="UNIMARC"/>
More information about the open-ils-commits
mailing list