],
'cmd_items_print' : [ ['command'], function() { obj.items_print(1); } ],
'cmd_items_print2' : [ ['command'], function() { obj.items_print(2); } ],
+ 'cmd_items_print_selected' : [ ['command'], function() { obj.items_print_selected(1); } ],
+ 'cmd_items_print_selected2' : [ ['command'], function() { obj.items_print_selected(2); } ],
'cmd_items_export' : [ ['command'], function() { obj.items_export(1); } ],
'cmd_items_export2' : [ ['command'], function() { obj.items_export(2); } ],
'cmd_items_renew' : [ ['command'], function() { obj.items_renew({which_list:1}); } ],
}
},
+ 'items_print_selected': function(which) {
+
+ var obj = this;
+ JSAN.use('patron.util');
+ JSAN.use('util.functional');
+
+ var ui_list = ( which == 2 ? obj.list2 : obj.list);
+ var id_list = ( which == 2 ? obj.retrieve_ids2 : obj.retrieve_ids );
+
+ // Had to merge to make the right data for print
+ for (var i=0; i < id_list.length; i++) {
+ var x = id_list[i].circ_id;
+ var r = obj.list_circ_map[x].row.my;
+ id_list[i].title = r.mvr.title();
+ id_list[i].due_date = r.circ.due_date();
+ }
+
+ var params = {
+ 'list': id_list,
+ 'patron' : patron.util.retrieve_fleshed_au_via_id(ses(),obj.patron_id),
+ 'printer_context' : 'receipt',
+ 'template' : 'items_out'
+ };
+ ui_list.print( params );
+ },
+
'items_export' : function(which) {
var obj = this;
try {
<command id="sel_patron"/>
<command id="cmd_triggered_events"/>
<command id="cmd_items_print" />
+ <command id="cmd_items_print_selected" />
<command id="cmd_items_export" />
<command id="cmd_items_renew" />
<command id="cmd_items_renew_all" />
<command id="sel_patron2"/>
<command id="cmd_triggered_events2"/>
<command id="cmd_items_print2" />
+ <command id="cmd_items_print_selected2" />
<command id="cmd_items_export2" />
<command id="cmd_items_renew2" />
<command id="cmd_items_renew_with_date2" />
<popupset id="items_popupset">
<menupopup id="items_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;"/>
+ <menuitem command="cmd_items_print_selected" label="&staff.patron.items_overlay.print_one.label;"/>
<menuitem command="sel_bucket" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
<menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog" />
<menuitem command="sel_copy_details" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
</menupopup>
<menupopup id="items_actions2" position="at_pointer">
<menuitem command="sel_clip2" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;" />
+ <menuitem command="cmd_items_print_selected2" label="&staff.patron.items_overlay.print_one.label;"/>
<menuitem command="sel_bucket2" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
<menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog2" />
<menuitem command="sel_copy_details2" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
<menu label="&staff.patron.items_overlay.actions_for_selected_items.label;" accesskey="&staff.patron.items_overlay.actions_for_selected_items.accesskey;">
<menupopup>
<menuitem command="sel_clip" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;"/>
+ <menuitem command="cmd_items_print_selected" label="&staff.patron.items_overlay.print_one.label;" />
<menuitem command="sel_bucket" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
<menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog" />
<menuitem command="sel_copy_details" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
<menu label="&staff.patron.items_overlay.actions_for_selected_items.label;" old_accesskey="&staff.patron.items_overlay.actions_for_selected_items.accesskey;">
<menupopup>
<menuitem command="sel_clip2" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;" />
+ <menuitem command="cmd_items_print_selected2" label="&staff.patron.items_overlay.print_one.label;" />
<menuitem command="sel_bucket2" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
<menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog2" />
<menuitem command="sel_copy_details2" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
<checkbox id="checkin_auto_print_slips" oils_persist="checked"
label="&staff.circ.checkin_overlay.checkin_auto_print_slips.label;"
accesskey="&staff.circ.checkin_overlay.checkin_auto_print_slips.accesskey;"/>
+ <button id="item_print_single" label="&staff.patron.items_overlay.print_one.label;" command="cmd_items_print_selected" />
<button id="items_print" label="&staff.patron_display.items.print_receipt.label;" command="cmd_items_print" accesskey="&staff.patron_display.items.print_receipt.accesskey;" />
<button id="items_export" label="&staff.patron.items_overlay.items_export.label;" command="cmd_items_export" accesskey=""/>
</hbox>
<hbox id="items_bottom_ui2" flex="1">
<spacer flex="1"/>
+ <button id="item_print_single2" label="&staff.patron.items_overlay.print_one.label;" command="cmd_items_print_selected2" />
<button id="items_print2" label="&staff.patron_display.items.print_receipt.label;" command="cmd_items_print2" old_accesskey="&staff.patron_display.items.print_receipt.accesskey;" />
<button id="items_export2" label="&staff.patron.items_overlay.items_export.label;" command="cmd_items_export2" accesskey=""/>
</hbox>