[open-ils-commits] r19299 - in branches/rel_2_0/Open-ILS: web/opac/locale/en-US xul/staff_client/server/locale/en-US xul/staff_client/server/serial (dbwells)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jan 25 18:21:40 EST 2011
Author: dbwells
Date: 2011-01-25 18:21:34 -0500 (Tue, 25 Jan 2011)
New Revision: 19299
Modified:
branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd
branches/rel_2_0/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.xul
Log:
Fix broken stream functions, re-enable commented-out menu with correct options
Modified: branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd 2011-01-25 23:20:59 UTC (rev 19298)
+++ branches/rel_2_0/Open-ILS/web/opac/locale/en-US/lang.dtd 2011-01-25 23:21:34 UTC (rev 19299)
@@ -1619,6 +1619,8 @@
<!ENTITY staff.serial.ssub_editor.create.accesskey "C">
<!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_dists.actions.cmd_delete_sstr.label "Delete Stream">
<!ENTITY staff.serial.batch_receive "Batch Receive">
<!ENTITY staff.serial.batch_receive.bib_search_term.label "Enter an identifier for a bibliographic record:">
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties 2011-01-25 23:20:59 UTC (rev 19298)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/locale/en-US/serial.properties 2011-01-25 23:21:34 UTC (rev 19299)
@@ -53,6 +53,12 @@
staff.serial.ssub_editor.modify.label=Modify Subscription(s)
staff.serial.ssub_editor.modify.accesskey=M
staff.serial.ssub_editor.notes=Subscription Notes
+staff.serial.manage_dists.add.error=error adding object in manage_dists.js:
+staff.serial.manage_dists.delete.error=error deleting object in manage_dists.js:
+staff.serial.manage_dists.delete_sstr.confirm=Are you sure you would like to delete this stream?
+staff.serial.manage_dists.delete_sstr.confirm.plural=Are you sure you would like to delete these %1$s streams?
+staff.serial.manage_dists.delete_sstr.title=Delete Streams?
+staff.serial.manage_dists.delete_sstr.override=Override Delete Failure? Doing so will delete all attached items as well!
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?
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.js 2011-01-25 23:20:59 UTC (rev 19298)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.js 2011-01-25 23:21:34 UTC (rev 19299)
@@ -15,7 +15,7 @@
'map_tree' : {},
'map_sdist' : {},
- //'map_sstr' : {},
+ 'map_sstr' : {},
'sel_list' : [],
'funcs' : [],
'editor_indexes' : { 'sdist' : 1, 'sstr' : 2, 'sbsum' : 3, 'sssum' : 4, 'sisum' : 5 },
@@ -83,13 +83,13 @@
//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,
@@ -106,7 +106,7 @@
[ 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
}
);
@@ -126,7 +126,7 @@
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();
}
},
@@ -203,7 +203,7 @@
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);
}
}
],
@@ -235,15 +235,13 @@
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);
}
}
],
@@ -252,7 +250,7 @@
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' : [
@@ -356,7 +354,7 @@
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);
}
}
],
@@ -1015,10 +1013,10 @@
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;
}
@@ -1106,7 +1104,7 @@
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(),
@@ -1326,7 +1324,7 @@
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');
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.xul 2011-01-25 23:20:59 UTC (rev 19298)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/serial/manage_dists.xul 2011-01-25 23:21:34 UTC (rev 19299)
@@ -51,6 +51,9 @@
<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"/>
@@ -73,26 +76,17 @@
<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"/>
+ <menuitem command="cmd_add_sstr" label="&staff.serial.manage_dists.actions.cmd_add_sstr.label;"/>
<menuseparator/>
- <menuitem command="cmd_make_predictions" label="Make Predictions"/>
- <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">
More information about the open-ils-commits
mailing list