<!ENTITY staff.serial.ssub_editor.notes.label "Subscription Notes">
<!ENTITY staff.serial.ssub_editor.notes.accesskey "N">
<!ENTITY staff.serial.manage_dists.actions.cmd_add_sstr.label "Add Stream">
+<!ENTITY staff.serial.manage_items.actions.cmd_claim_items.label "Claim Item">
+<!ENTITY staff.serial.manage_items.actions.cmd_set_items_not_held.label "Set 'Not Held'">
+<!ENTITY staff.serial.manage_items.actions.cmd_set_items_not_published.label "Set 'Not Published'">
<!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.accesskey "E">
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_items.set_claimed_success=Successfully claimed %1$s item(s)
+staff.serial.manage_items.set_not_held_success=Successfully set %1$s item(s) to 'Not Held'
+staff.serial.manage_items.set_not_published_success=Successfully set %1$s item(s) to 'Not Published'
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_claim_items' : [
+ ['command'],
+ function () { obj.set_items_special_status('Claimed','staff.serial.manage_items.set_claimed_success') }
+ ],
+ 'cmd_set_items_not_published' : [
+ ['command'],
+ function () { obj.set_items_special_status('Not Published','staff.serial.manage_items.set_not_published_success') }
+ ],
+ 'cmd_set_items_not_held' : [
+ ['command'],
+ function () { obj.set_items_special_status('Not Held','staff.serial.manage_items.set_not_held_success') }
+ ],
'cmd_delete_items' : [
['command'],
function() {
if ($('serial_manage_items_show_all').checked) {
obj.lists.main.sitem_retrieve_params = {};
} else {
- obj.lists.main.sitem_retrieve_params = {'date_received' : null };
+ obj.lists.main.sitem_retrieve_params = { 'date_received' : null, 'status' : {'not in' : ['Not Held', 'Not Published']} };
}
obj.lists.main.sitem_extra_params ={'order_by' : {'sitem' : 'date_expected ASC, stream ASC'}};
row.my.parent_obj = obj;
//params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'copy_id':copy_id,'circ_id':row.my.circ.id(),'barcode':row.my.acp.barcode(),'doc_id': ( row.my.record ? row.my.record.id() : null ) }) );
params.treeitem_node.setAttribute( 'retrieve_id', js2JSON({'sitem_id':sitem.id()}) );
+ if (sitem.status() == 'Claimed') {
+ params.treeitem_node.firstChild.setAttribute( 'properties', 'makeItGray' );
+ } else if (sitem.status() == 'Not Held' || sitem.status() == 'Not Published') {
+ var treecells = params.treeitem_node.firstChild.childNodes;
+ for (i = 0; i < treecells.length; i++) {
+ treecells[i].setAttribute( 'properties', 'crossItOut' );
+ }
+ }
dump('dumping... ' + js2JSON(obj.list_sitem_map[sitem.id()]));
if (typeof params.on_retrieve == 'function') {
params.on_retrieve(row);
}
},
+ // accepts a list of ids or a list of objects
+ 'refresh_rows' : function(list) {
+ var obj = this;
+
+ var id_list;
+
+ if (typeof list[0] == 'object') {
+ id_list = util.functional.map_list(
+ list,
+ function(o) {
+ return o.id()
+ }
+ );
+ } else {
+ id_list = list;
+ }
+
+ for (var i = 0; i < id_list.length; i++) {
+ obj.lists[obj.selected_list].refresh_row(obj.row_map[id_list[i]]);
+ }
+ },
+
'retrieve' : function(list_name) {
var obj = this;
var list = obj.lists[list_name];
dump('manage_items.on_select list = ' + js2JSON(list) + '\n');
var obj = this;
+ obj.controller.view.cmd_claim_items.setAttribute('disabled','false');
+
+ for (var i = 0; i < list.length; i++) {
+ var item = obj.list_sitem_map[list[i].sitem_id];
+ if (item.status() != 'Expected') {
+ obj.controller.view.cmd_claim_items.setAttribute('disabled','true');
+ break;
+ }
+ }
/*obj.controller.view.cmd_items_claimed_returned.setAttribute('disabled','false');
obj.controller.view.sel_mark_items_missing.setAttribute('disabled','false');*/
);
seen_ids[obj_id] = 1;
}
+ },
+
+ 'set_items_special_status' : function(new_status, message) {
+ var obj = this;
+ try {
+ if (!obj.retrieve_ids || obj.retrieve_ids.length == 0) return;
+
+ JSAN.use('util.functional');
+ var list = util.functional.map_list(
+ obj.retrieve_ids,
+ function (o) {
+ var item = obj.list_sitem_map[o.sitem_id];
+ item.status(new_status);
+ obj.list_sitem_map[o.sitem_id] = item;
+ return item;
+ }
+ );
+
+ var robj = obj.network.request(
+ 'open-ils.serial',
+ 'open-ils.serial.item.fleshed.batch.update',
+ [ ses(), list ]
+ );
+ if (typeof robj.ilsevent != 'undefined') throw(robj);
+
+ alert($('serialStrings').getFormattedString(message, [list.length]));
+ obj.refresh_rows(list);
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('staff.serial.manage_items.set_items_special_status.error',E);
+ }
}
}
<menupopup id="serial_manage_items_popup">
<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_claim_items" label="&staff.serial.manage_items.actions.cmd_claim_items.label;" />
+ <menuitem command="cmd_set_items_not_published" label="&staff.serial.manage_items.actions.cmd_set_items_not_published.label;" />
+ <menuitem command="cmd_set_items_not_held" label="&staff.serial.manage_items.actions.cmd_set_items_not_held.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;"/>
<menupopup>
<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_claim_items" label="&staff.serial.manage_items.actions.cmd_claim_items.label;" />
+ <menuitem command="cmd_set_items_not_published" label="&staff.serial.manage_items.actions.cmd_set_items_not_published.label;" />
+ <menuitem command="cmd_set_items_not_held" label="&staff.serial.manage_items.actions.cmd_set_items_not_held.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;"/>
<command id="cmd_add_sstr"/>
<command id="cmd_add_subscriptions"/>
<command id="cmd_broken" />
+ <command id="cmd_claim_items"/>
<command id="cmd_clear" />
<command id="cmd_edit_items"/>
<command id="cmd_edit_sdists"/>
<command id="cmd_refresh_list"/>
<command id="cmd_replace_barcode"/>
<command id="cmd_reset_items"/>
+ <command id="cmd_set_items_not_held"/>
+ <command id="cmd_set_items_not_published"/>
<command id="cmd_set_sunit" />
<command id="cmd_set_other_sunit" />
<command id="cmd_show_all_libs" />
description#print_routing_desc { margin: 0; padding: 0 1em; }
#pattern_wizard_main > vbox { padding: 0.5em 0; }
#pattern_wizard_main { overflow: auto; }
+treechildren::-moz-tree-row(makeItGray) {
+ background-color: #CCCCCC;
+}
+treechildren::-moz-tree-row(makeItGray, selected) {
+ background-color: #AAAAAA;
+}
+treechildren::-moz-tree-cell-text(crossItOut) {
+ text-decoration: line-through;
+}