<!ENTITY staff.serial.manage_dists.actions.cmd_add_sstr.label "Add Stream">
<!ENTITY staff.serial.manage_dists.actions.cmd_delete_sstr.label "Delete Stream">
<!ENTITY staff.serial.manage_items.actions.cmd_edit_items.label "Edit Item Attributes">
-<!ENTITY staff.serial.manage_items.actions.cmd_edit_items.access_key "E">
+<!ENTITY staff.serial.manage_items.actions.cmd_edit_items.accesskey "E">
<!ENTITY staff.serial.manage_items.actions.cmd_delete_items.label "Delete Items">
-<!ENTITY staff.serial.manage_items.actions.cmd_delete_items.access_key "D">
+<!ENTITY staff.serial.manage_items.actions.cmd_delete_items.accesskey "D">
<!ENTITY staff.serial.manage_items.actions.cmd_reset_items.label "Reset Items to Expected">
+<!ENTITY staff.serial.manage_items.actions.cmd_view_sdist_notes.label "View Dist. Notes">
+<!ENTITY staff.serial.manage_items.actions.cmd_view_sdist_notes.accesskey "T">
+<!ENTITY staff.serial.manage_items.actions.cmd_view_sitem_notes.label "View Item Notes">
+<!ENTITY staff.serial.manage_items.actions.cmd_view_sitem_notes.accesskey "I">
+<!ENTITY staff.serial.manage_items.actions.cmd_view_ssub_notes.label "View Sub. Notes">
+<!ENTITY staff.serial.manage_items.actions.cmd_view_ssub_notes.accesskey "S">
<!ENTITY staff.serial.manage_items.workarea_showing "Showing: ">
<!ENTITY staff.serial.manage_items.workarea_current_unit "Current Working Unit: ">
<!ENTITY staff.serial.manage_items.workarea_recently_received "Recently Received">
staff.serial.manage_dists.delete_sstr.override=Override Delete Failure? Doing so will delete all attached items as well!
staff.serial.manage_items.subscriber.label=Subscriber
staff.serial.manage_items.holder.label=Holder
+staff.serial.manage_items.notes_column.label=Notes (Item/Dist/Sub)
staff.serial.manage_subs.add.error=error adding object in manage_subs.js:
staff.serial.manage_subs.delete.error=error deleting object in manage_subs.js:
staff.serial.manage_subs.delete_scap.confirm=Are you sure you would like to delete this caption and pattern?
}
}
],
-
+ 'cmd_view_sitem_notes' : [
+ ['command'],
+ function() {
+ try {
+ obj.view_notes('sitem');
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('cmd_view_sitem_notes failed!',E);
+ }
+ }
+ ],
+ 'cmd_view_sdist_notes' : [
+ ['command'],
+ function() {
+ try {
+ obj.view_notes('sdist');
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('cmd_view_sdist_notes failed!',E);
+ }
+ }
+ ],
+ 'cmd_view_ssub_notes' : [
+ ['command'],
+ function() {
+ try {
+ obj.view_notes('ssub');
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('cmd_view_ssub_notes failed!',E);
+ }
+ }
+ ],
'cmd_items_print' : [ ['command'], function() { obj.items_print(obj.selected_list); } ],
'cmd_items_export' : [ ['command'], function() { obj.items_export(obj.selected_list); } ],
'cmd_refresh_list' : [ ['command'], function() { obj.retrieve_ssubs_and_sdists(); obj.refresh_list('main'); obj.refresh_list('workarea'); } ]
obj.refresh_list('main');
obj.refresh_list('workarea');
}
+ },
+
+ 'view_notes' : function(type) {
+ var obj = this;
+
+ if (!obj.retrieve_ids || obj.retrieve_ids.length == 0) return;
+
+ var object_id_fn;
+ var function_type;
+ var object_type;
+ var constructor;
+
+ switch(type) {
+ case 'sitem':
+ object_id_fn = function(item) { return item.id() };
+ title_fn = function(item) { return fieldmapper.IDL.fmclasses.sitem.field_map.id.label + ' ' + item.id() };
+ function_type = 'SIN';
+ object_type = 'item';
+ constructor = sin;
+ break;
+ case 'sdist':
+ object_id_fn = function(item) { return item.stream().distribution() };
+ title_fn = function(item) {
+ var sdist_id = object_id_fn(item);
+ return obj.sdist_map[sdist_id].label()
+ + ' -- ' + obj.sdist_map[sdist_id].holding_lib().shortname()
+ + ' (' + fieldmapper.IDL.fmclasses.sdist.field_map.id.label + ' ' + sdist_id + ')'
+ };
+ function_type = 'SDISTN';
+ object_type = 'distribution';
+ constructor = sdistn;
+ break;
+ case 'ssub':
+ object_id_fn = function(item) { return item.issuance().subscription().id() };
+ title_fn = function(item) {
+ var ssub_id = object_id_fn(item);
+ return obj.ssub_map[ssub_id].owning_lib().shortname()
+ + ' (' + fieldmapper.IDL.fmclasses.ssub.field_map.id.label + ' ' + ssub_id + ')'
+ };
+ function_type = 'SSUBN';
+ object_type = 'subscription';
+ constructor = ssubn;
+ break;
+ default:
+ return;
+ }
+
+ var seen_ids = {};
+ for (var i = 0; i < obj.retrieve_ids.length; i++) {
+ var item = obj.list_sitem_map[obj.retrieve_ids[i].sitem_id];
+ var obj_id = object_id_fn(item);
+ if (seen_ids[obj_id]) continue;
+ JSAN.use('util.window'); var win = new util.window();
+ win.open(
+ urls.XUL_SERIAL_NOTES,
+ '','chrome,resizable,modal',
+ { 'object_id' : obj_id, 'function_type' : function_type, 'object_type' : object_type, 'constructor' : constructor, 'title' : $('serialStrings').getString('staff.serial.'+type+'_editor.notes') + ' -- ' + title_fn(item) }
+ );
+ seen_ids[obj_id] = 1;
+ }
}
}
},
{
'id' : 'notes',
- 'label' : 'Notes',
+ 'label' : $('serialStrings').getString('staff.serial.manage_items.notes_column.label'),
'flex' : 1,
'primary' : false,
'hidden' : false,
- 'render' : function(my) { return my.sitem.notes().length; },
+ 'render' : function(my) { return my.sitem.notes().length + ' / ' + my.parent_obj.sdist_map[my.sitem.stream().distribution()].notes().length + ' / ' + my.parent_obj.ssub_map[my.sitem.issuance().subscription().id()].notes().length; },
'persist' : 'hidden width ordinal'
},
{
<menuitem command="cmd_edit_items" label="&staff.serial.manage_items.actions.cmd_edit_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_edit_items.accesskey;"/>
<menuitem command="cmd_reset_items" label="&staff.serial.manage_items.actions.cmd_reset_items.label;" />
<menuitem command="cmd_delete_items" label="&staff.serial.manage_items.actions.cmd_delete_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_delete_items.accesskey;"/>
+ <menuitem command="cmd_view_sitem_notes" label="&staff.serial.manage_items.actions.cmd_view_sitem_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sitem_notes.accesskey;"/>
+ <menuitem command="cmd_view_sdist_notes" label="&staff.serial.manage_items.actions.cmd_view_sdist_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sdist_notes.accesskey;"/>
+ <menuitem command="cmd_view_ssub_notes" label="&staff.serial.manage_items.actions.cmd_view_ssub_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_ssub_notes.accesskey;"/>
</popup>
</popupset>
<tabpanel id="serial_manage_items" orient="vertical" flex="1">
<menuitem command="cmd_edit_items" label="&staff.serial.manage_items.actions.cmd_edit_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_edit_items.accesskey;"/>
<menuitem command="cmd_reset_items" label="&staff.serial.manage_items.actions.cmd_reset_items.label;" />
<menuitem command="cmd_delete_items" label="&staff.serial.manage_items.actions.cmd_delete_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_delete_items.accesskey;"/>
+ <menuitem command="cmd_view_sitem_notes" label="&staff.serial.manage_items.actions.cmd_view_sitem_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sitem_notes.accesskey;"/>
+ <menuitem command="cmd_view_sdist_notes" label="&staff.serial.manage_items.actions.cmd_view_sdist_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sdist_notes.accesskey;"/>
+ <menuitem command="cmd_view_ssub_notes" label="&staff.serial.manage_items.actions.cmd_view_ssub_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_ssub_notes.accesskey;"/>
<menuseparator/>
<menuitem command="cmd_refresh_list" label="&staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_refresh_list.accesskey;"/>
<menuitem command="save_columns" label="&staff.cat.copy_browser.holdings_maintenance.save_columns.label;"/>
g.function_type = xul_param('function_type',{'modal_xulG':true});
g.constructor = xul_param('constructor',{'modal_xulG':true});
+ var window_title = xul_param('title',{'modal_xulG':true});
+ if (window_title) {
+ try { document.title = window_title; } catch(E) {}
+ }
+
refresh();
} catch(E) {
<command id="cmd_transfer_sdists"/>
<command id="cmd_transfer_sstrs"/>
<command id="cmd_transfer_subscription"/>
+ <command id="cmd_view_sdist_notes"/>
+ <command id="cmd_view_sitem_notes"/>
+ <command id="cmd_view_ssub_notes"/>
<command id="save_columns" />
<command id="sel_clip" />
<command id="sel_mark_items_damaged" />