'map_tree' : {},
'map_sdist' : {},
- //'map_sstr' : {},
+ 'map_sstr' : {},
'sel_list' : [],
'funcs' : [],
'editor_indexes' : { 'sdist' : 1, 'sstr' : 2, 'sbsum' : 3, 'sssum' : 4, 'sisum' : 5 },
//TODO: proper messages
var delete_msg;
if (list.length != 1) {
- delete_msg = document.getElementById('serialStrings').getFormattedString('staff.serial.manage_subs.delete_' + type + '.confirm.plural', [list.length]);
+ delete_msg = document.getElementById('serialStrings').getFormattedString('staff.serial.manage_dists.delete_' + type + '.confirm.plural', [list.length]);
} else {
- delete_msg = document.getElementById('serialStrings').getString('staff.serial.manage_subs.delete_' + type + '.confirm');
+ delete_msg = document.getElementById('serialStrings').getString('staff.serial.manage_dists.delete_' + type + '.confirm');
}
var r = obj.error.yns_alert(
delete_msg,
- document.getElementById('serialStrings').getString('staff.serial.manage_subs.delete_' + type + '.title'),
+ document.getElementById('serialStrings').getString('staff.serial.manage_dists.delete_' + type + '.title'),
document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.delete'),
document.getElementById('catStrings').getString('staff.cat.copy_browser.delete_items.cancel'),
null,
[ ses(), list, true ],
null,
{
- 'title' : document.getElementById('serialStrings').getString('staff.serial.manage_subs.delete_' + type + '.override'),
+ 'title' : document.getElementById('serialStrings').getString('staff.serial.manage_dists.delete_' + type + '.override'),
'overridable_events' : overridable_events
}
);
obj.refresh_list();
}
} catch(E) {
- obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_subs.delete.error'),E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_dists.delete.error'),E);
obj.refresh_list();
}
},
params.sisses = [new_siss];
obj.editor_init('siss', 'add', params);
} catch(E) {
- obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_subs.add.error'),E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_dists.add.error'),E);
}
}
],
if (edit==0) return; // no read-only view for this interface */
var new_sstr = new sstr();
- new_sstr.subscription(list[0]);//TODO: add multiple at once support?
- new_sstr.holding_lib(obj.map_sdist['sdist_' + list[0]].owning_lib());//default to sub owning lib
- new_sstr.label('Default');
+ new_sstr.distribution(list[0]);//TODO: add multiple at once support?
new_sstr.isnew(1);
var params = {};
params.sstrs = [new_sstr];
obj.editor_init('sstr', 'add', params);
} catch(E) {
- obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_subs.add.error'),E);
+ obj.error.standard_unexpected_error_alert($('serialStrings').getString('staff.serial.manage_dists.add.error'),E);
}
}
],
function() {
var overridable_events = [ //TODO: proper overrides
];
- obj.do_delete('sstr', 'open-ils.serial.distribution.fleshed.batch.update', overridable_events);
+ obj.do_delete('sstr', 'open-ils.serial.stream.batch.update', overridable_events);
}
],
'cmd_delete_siss' : [
params.sdists = [new_sdist];
obj.editor_init('sdist', 'add', params);
} catch(E) {
- obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_subs.add.error'),E);
+ obj.error.standard_unexpected_error_alert(document.getElementById('serialStrings').getString('staff.serial.manage_dists.add.error'),E);
}
}
],
for (var i = 0; i < sdist_tree_list.length; i++) {
d_count++;
obj.map_sdist[ 'sdist_' + sdist_tree_list[i].id() ] = function(r){return r;}(sdist_tree_list[i]);
- /*var streams = sdist_tree_list[i].streams();
+ var streams = sdist_tree_list[i].streams();
for (var j = 0; j < streams.length; j++) {
obj.map_sstr[ 'sstr_' + streams[j].id() ] = function(r){return r;}(streams[j]);
- }*/
+ }
}
data.row.my.distribution_count = d_count;
}
var sstr_group_node_data = {
'row' : {
'my' : {
- 'label' : dojo.byId('serialStrings').getString('serial.manage_dists.streams'),
+ 'label' : $('serialStrings').getString('serial.manage_dists.streams'),
}
},
'retrieve_id' : 'sstr-group_' + sdist_tree.id(),
obj.list.clear();
obj.map_tree = {};
obj.map_sdist = {};
- //obj.map_sstr = {};
+ obj.map_sstr = {};
obj.org_ids = obj.network.simple_request('FM_SDIST_AOU_IDS_RETRIEVE_VIA_RECORD_ID.authoritative',[ obj.docid ]);
if (typeof obj.org_ids.ilsevent != 'undefined') throw(obj.org_ids);
JSAN.use('util.functional');
<popupset>
<popup id="serial_manage_dists_popup">
+ <menuitem command="cmd_add_sstr" label="&staff.serial.manage_dists.actions.cmd_add_sstr.label;"/>
+ <menuseparator/>
+ <menuitem command="cmd_delete_sstr" label="&staff.serial.manage_dists.actions.cmd_delete_sstr.label;"/>
<!--
<menuitem command="cmd_add_sdist" label="Add Distribution"/>
<menuitem command="cmd_add_siss" label="Add Issuance"/>
<checkbox id="show_groups" label="Show Groups" />
<button id="serial_dist_add_button" label="&staff.cat.copy_browser.holdings_maintenance.refresh_button.label;" command="cmd_refresh_list" />
<spacer flex="1"/>
- <!--
<menubar>
<menu label="Actions for Selected Row">
<menupopup>
- <menuitem command="cmd_add_sdist" label="Add Distribution"/>
- <menuitem command="cmd_add_siss" label="Add Issuance"/>
- <menuitem command="cmd_add_scap" label="Add Caption/Pattern"/>
- <menuseparator/>
- <menuitem command="cmd_make_predictions" label="Make Predictions"/>
+ <menuitem command="cmd_add_sstr" label="&staff.serial.manage_dists.actions.cmd_add_sstr.label;"/>
<menuseparator/>
- <menuitem command="cmd_delete_sdist" label="Delete Distribution"/>
- <menuitem command="cmd_delete_siss" label="Delete Issuance"/>
- <menuitem command="cmd_delete_scap" label="Delete Caption/Pattern"/>
+ <menuitem command="cmd_delete_sstr" label="&staff.serial.manage_dists.actions.cmd_delete_sstr.label;"/>
</menupopup>
</menu>
</menubar>
- -->
</hbox>
- <!--<tree id="sdists_tree" flex="15" enableColumnDrag="true" context="serial_manage_dists_popup"/>-->
- <tree id="sdists_tree" flex="15" enableColumnDrag="true"/>
+ <tree id="sdists_tree" flex="15" enableColumnDrag="true" context="serial_manage_dists_popup"/>
</vbox>
<splitter state="open" collapse="before" resizebefore="closest" resizeafter="farthest" id="splitter" oils_persist="state hidden" oils_persist_peers="before_splitter serial_manage_dists_editor_deck"/>
<deck id="serial_manage_dists_editor_deck" flex="20" oils_persist="width">