obj.controller.view.sel_edit.setAttribute('disabled','true');
obj.controller.view.sel_opac.setAttribute('disabled','true');
obj.controller.view.sel_patron.setAttribute('disabled','true');
+ obj.controller.view.sel_last_patron.setAttribute('disabled','true');
obj.controller.view.sel_copy_details.setAttribute('disabled','true');
obj.controller.view.sel_bucket.setAttribute('disabled','true');
obj.controller.view.sel_spine.setAttribute('disabled','true');
obj.controller.view.sel_edit.setAttribute('disabled','false');
obj.controller.view.sel_opac.setAttribute('disabled','false');
obj.controller.view.sel_patron.setAttribute('disabled','false');
+ obj.controller.view.sel_last_patron.setAttribute('disabled','false');
obj.controller.view.sel_copy_details.setAttribute('disabled','false');
obj.controller.view.sel_bucket.setAttribute('disabled','false');
obj.controller.view.sel_spine.setAttribute('disabled','false');
circ.util.show_last_few_circs(obj.selection_list);
}
],
+ 'sel_last_patron' : [
+ ['command'],
+ function() {
+ var patrons = {};
+ for (var i = 0; i < obj.selection_list.length; i++) {
+ var circs = obj.network.simple_request('FM_CIRC_RETRIEVE_VIA_COPY',[ses(),obj.selection_list[i].copy_id,1]);
+ if (circs.length > 0) {
+ patrons[circs[0].usr()] = 1;
+ } else {
+ alert('Item ' + obj.selection_list[i].barcode + ' has never circulated');
+ }
+ }
+ for (var i in patrons) {
+ xulG.new_tab(urls.XUL_PATRON_DISPLAY,{},{'id' : i});
+ }
+ }
+ ],
'sel_copy_details' : [
['command'],
function() {
//I could override map_row_to_column here
}
);
+ obj.list.node.view.selection.select(0);
JSAN.use('util.sound'); var sound = new util.sound(); sound.circ_good();
<command id="sel_edit" disabled="true"/>
<command id="sel_opac" disabled="true"/>
<command id="sel_patron" disabled="true"/>
+ <command id="sel_last_patron" disabled="true"/>
<command id="sel_copy_details" disabled="true"/>
<command id="sel_bucket" disabled="true"/>
<command id="sel_spine" disabled="true"/>
<menuitem command="sel_opac" label="Show in Catalog" accesskey="S" />
<menuitem command="sel_copy_details" label="Show Item Details" accesskey="I" />
<menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
+ <menuitem command="sel_last_patron" label="Retrieve Last Patron who circulated item" accesskey="R"/>
<menuseparator/>
<menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
<menuseparator />
<menuitem command="sel_opac" label="Show in Catalog" accesskey="S" />
<menuitem command="sel_copy_details" label="Show Item Details" accesskey="I" />
<menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
+ <menuitem command="sel_last_patron" label="Retrieve Last Patron who circulated item" accesskey="R"/>
<menuseparator />
<menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
<menuseparator />