[open-ils-commits] r19996 - trunk/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 6 11:28:14 EDT 2011
Author: phasefx
Date: 2011-04-06 11:28:12 -0400 (Wed, 06 Apr 2011)
New Revision: 19996
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/items.js
trunk/Open-ILS/xul/staff_client/server/patron/items_overlay.xul
Log:
add Item Attribute Editor to patron Items Out
Modified: trunk/Open-ILS/xul/staff_client/server/patron/items.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/items.js 2011-04-06 15:28:00 UTC (rev 19995)
+++ trunk/Open-ILS/xul/staff_client/server/patron/items.js 2011-04-06 15:28:12 UTC (rev 19996)
@@ -32,6 +32,8 @@
'cmd_broken' : [ ['command'], function() { alert('Not Yet Implemented'); } ],
'sel_clip' : [ ['command'], function() { obj.list.clipboard(); } ],
'sel_clip2' : [ ['command'], function() { obj.list2.clipboard(); } ],
+ 'sel_edit' : [ ['command'], function() { obj.spawn_copy_editor(1); } ],
+ 'sel_edit2' : [ ['command'], function() { obj.spawn_copy_editor(2); } ],
'sel_patron' : [ ['command'], function() { JSAN.use('circ.util'); circ.util.show_last_few_circs(obj.retrieve_ids); } ],
'cmd_triggered_events' : [
['command'],
@@ -174,6 +176,8 @@
obj.controller.view.sel_mark_items_missing2.setAttribute('disabled','true');
obj.controller.view.sel_clip.setAttribute('disabled','true');
obj.controller.view.sel_clip2.setAttribute('disabled','true');
+ obj.controller.view.sel_edit.setAttribute('disabled','true');
+ obj.controller.view.sel_edit2.setAttribute('disabled','true');
obj.controller.view.sel_bucket.setAttribute('disabled','true');
obj.controller.view.sel_bucket2.setAttribute('disabled','true');
obj.controller.view.sel_copy_details.setAttribute('disabled','true');
@@ -732,6 +736,7 @@
JSAN.use('util.functional');
var sel = obj.list.retrieve_selection();
obj.controller.view.sel_clip.setAttribute('disabled',sel.length < 1);
+ obj.controller.view.sel_edit.setAttribute('disabled',sel.length < 1);
var list = util.functional.map_list(
sel,
function(o) { return JSON2js( o.getAttribute('retrieve_id') ); }
@@ -759,6 +764,7 @@
JSAN.use('util.functional');
var sel = obj.list2.retrieve_selection();
obj.controller.view.sel_clip2.setAttribute('disabled',sel.length < 1);
+ obj.controller.view.sel_edit2.setAttribute('disabled',sel.length < 1);
var list = util.functional.map_list(
sel,
function(o) { return JSON2js( o.getAttribute('retrieve_id') ); }
@@ -916,8 +922,22 @@
obj.controller.view.sel_mark_items_missing2.setAttribute('disabled','false');
this.retrieve_ids2 = list;
- }
+ },
+ 'spawn_copy_editor' : function(which) {
+
+ var obj = this;
+
+ JSAN.use('util.functional');
+
+ var copy_ids = util.functional.map_list( which == 1 ? obj.retrieve_ids : obj.retrieve_ids2, function(o) { return o.copy_id; } );
+
+ JSAN.use('cat.util'); cat.util.spawn_copy_editor( { 'copy_ids' : copy_ids, 'edit' : 1 } );
+
+ },
+
+
+
}
dump('exiting patron.items.js\n');
Modified: trunk/Open-ILS/xul/staff_client/server/patron/items_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/items_overlay.xul 2011-04-06 15:28:00 UTC (rev 19995)
+++ trunk/Open-ILS/xul/staff_client/server/patron/items_overlay.xul 2011-04-06 15:28:12 UTC (rev 19996)
@@ -11,6 +11,7 @@
<command id="save_columns" />
<command id="sel_bucket" disabled="true"/>
<command id="sel_clip" />
+ <command id="sel_edit" />
<command id="sel_copy_details"/>
<command id="sel_patron"/>
<command id="cmd_triggered_events"/>
@@ -33,6 +34,7 @@
<command id="save_columns2" />
<command id="sel_bucket2" disabled="true"/>
<command id="sel_clip2" />
+ <command id="sel_edit2" />
<command id="sel_copy_details2"/>
<command id="sel_patron2"/>
<command id="cmd_triggered_events2"/>
@@ -61,6 +63,8 @@
<menuitem command="sel_patron" label="&staff.patron.items_overlay.sel_patron.label;" accesskey="&staff.patron.items_overlay.sel_patron.accesskey;"/>
<menuitem command="cmd_triggered_events" label="&staff.patron.items_overlay.cmd_triggered_events.label;" accesskey="&staff.patron.items_overlay.cmd_triggered_events.accesskey;"/>
<menuseparator />
+ <menuitem command="sel_edit" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+ <menuseparator />
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned" />
@@ -80,6 +84,8 @@
<menuitem command="sel_patron2" label="&staff.patron.items_overlay.sel_patron.label;" accesskey="&staff.patron.items_overlay.sel_patron.accesskey;"/>
<menuitem command="cmd_triggered_events2" label="&staff.patron.items_overlay.cmd_triggered_events.label;" accesskey="&staff.patron.items_overlay.cmd_triggered_events.accesskey;"/>
<menuseparator />
+ <menuitem command="sel_edit2" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+ <menuseparator />
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit2" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost2" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned2" />
@@ -135,6 +141,8 @@
<menuitem command="sel_patron" label="&staff.patron.items_overlay.sel_patron.label;" accesskey="&staff.patron.items_overlay.sel_patron.accesskey;"/>
<menuitem command="cmd_triggered_events" label="&staff.patron.items_overlay.cmd_triggered_events.label;" accesskey="&staff.patron.items_overlay.cmd_triggered_events.accesskey;"/>
<menuseparator />
+ <menuitem command="sel_edit" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+ <menuseparator />
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned" />
@@ -162,6 +170,8 @@
<menuitem command="sel_patron2" label="&staff.patron.items_overlay.sel_patron.label;" accesskey="&staff.patron.items_overlay.sel_patron.accesskey;"/>
<menuitem command="cmd_triggered_events2" label="&staff.patron.items_overlay.cmd_triggered_events.label;" accesskey="&staff.patron.items_overlay.cmd_triggered_events.accesskey;"/>
<menuseparator />
+ <menuitem command="sel_edit2" label="&staff.circ.copy_status_overlay.sel_edit.label;" accesskey="&staff.circ.copy_status_overlay.sel_edit.accesskey;" />
+ <menuseparator />
<menuitem label="&staff.patron.items_overlay.items_edit.label;" command="cmd_items_edit2" />
<menuitem label="&staff.patron.items_overlay.items_mark_lost.label;" command="cmd_items_mark_lost2" />
<menuitem label="&staff.patron.items_overlay.items_claimed_returned.label;" command="cmd_items_claimed_returned2" />
More information about the open-ils-commits
mailing list