[open-ils-commits] r18853 - in branches/rel_2_0/Open-ILS/xul/staff_client: chrome/content/cat chrome/content/main server/cat server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 29 12:12:30 EST 2010
Author: phasefx
Date: 2010-11-29 12:12:26 -0500 (Mon, 29 Nov 2010)
New Revision: 18853
Modified:
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/copy_browser.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/util.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/copy_status.js
Log:
merge r18841 from trunk for label interface bug https://bugs.launchpad.net/evergreen/+bug/677628
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/cat/opac.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -814,11 +814,9 @@
var title = document.getElementById('offlineStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [docid]);
- JSAN.use('util.window'); var win = new util.window();
- var w = win.open(
+ var w = xulG.new_tab(
window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
- title,
- 'chrome,resizable',
+ { 'tab_name' : title },
{ 'doc_id' : docid, 'ou_ids' : [ ses('ws_ou') ] }
);
} catch(E) {
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -1528,11 +1528,9 @@
},
'volume_item_creator' : function(params) {
var obj = this;
- JSAN.use('util.window'); var win = new util.window();
- var w = win.open(
+ var w = obj.new_tab(
obj.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
- document.getElementById('offlineStrings').getString('staff.cat.create_or_rebarcode_items'),
- 'chrome,resizable',
+ { 'tab_name' : document.getElementById('offlineStrings').getString('staff.cat.create_or_rebarcode_items') },
params
);
},
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -288,17 +288,16 @@
var title = document.getElementById('catStrings').getString('staff.cat.copy_browser.add_item.title');
- JSAN.use('util.window'); var win = new util.window();
- var w = win.open(
+ var w = xulG.new_tab(
window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
- //+'?doc_id=' + window.escape(obj.docid)
- //+'&ou_ids=' + window.escape( js2JSON(list) )
- //+'©_shortcut=' + window.escape( js2JSON(copy_shortcut) ),
- title,
- 'chrome,resizable'
+ { 'tab_name' : title },
+ {
+ 'doc_id' : obj.docid,
+ 'ou_ids' : list,
+ 'copy_shortcut' : copy_shortcut,
+ 'refresh' : function() { obj.refresh_list(); }
+ }
);
- w.refresh = function() { obj.refresh_list(); }
- w.xulG = { 'doc_id':obj.docid, 'ou_ids' : list, 'copy_shortcut' : copy_shortcut };
} catch(E) {
obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.add_item.error'),E);
}
@@ -485,12 +484,12 @@
}
);
- obj.data.temp_barcodes_for_labels = util.functional.map_list( list, function(o){return o.barcode();}) ;
- obj.data.stash('temp_barcodes_for_labels');
xulG.new_tab(
xulG.url_prefix( urls.XUL_SPINE_LABEL ),
{ 'tab_name' : document.getElementById('catStrings').getString('staff.cat.copy_browser.print_spine.tab') },
- {}
+ {
+ 'barcodes' : util.functional.map_list( list, function(o){return o.barcode();})
+ }
);
} catch(E) {
obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.print_spine.error'),E);
@@ -537,17 +536,12 @@
var title = document.getElementById('catStrings').getString('staff.cat.copy_browser.add_volume.title');
- JSAN.use('util.window'); var win = new util.window();
- var w = win.open(
+ var w = xulG.new_tab(
window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
- //+'?doc_id=' + window.escape(obj.docid)
- //+'&ou_ids=' + window.escape( js2JSON(list) ),
- title,
- 'chrome,resizable'
+ { 'tab_name' : title },
+ { 'doc_id' : obj.docid, 'ou_ids' : list, 'refresh' : function() { obj.refresh_list(); } }
);
- w.refresh = function() { obj.refresh_list() };
- w.xulG = { 'doc_id' : obj.docid, 'ou_ids' : list };
} catch(E) {
obj.error.standard_unexpected_error_alert(document.getElementById('catStrings').getString('staff.cat.copy_browser.add_volume.error'),E);
}
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -20,6 +20,9 @@
g.barcodes = g.barcodes.concat( g.data.temp_barcodes_for_labels );
g.data.temp_barcodes_for_labels = null; g.data.stash('temp_barcodes_for_labels');
}
+ if (xulG.barcodes) {
+ g.barcodes = g.barcodes.concat( xulG.barcodes );
+ }
JSAN.use('circ.util');
g.cols = circ.util.columns( {} );
@@ -579,6 +582,7 @@
var w = win.open( loc, 'spine_preview', 'chrome,resizable,width=750,height=550');
w.xulG = {
'url' : 'about:blank',
+ 'url_prefix' : function (u) { return xulG.url_prefix(u); },
'show_print_button' : 1,
'printer_context' : 'label',
'alternate_print' : 1,
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/util.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/util.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/util.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -189,13 +189,12 @@
JSAN.use('util.error'); var error = new util.error();
try {
JSAN.use('util.functional');
- JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
- data.temp_barcodes_for_labels = util.functional.map_list( selection_list, function(o){return o.barcode;}) ;
- data.stash('temp_barcodes_for_labels');
xulG.new_tab(
xulG.url_prefix( urls.XUL_SPINE_LABEL ),
{ 'tab_name' : $("catStrings").getString('staff.cat.util.spine_editor.tab_name') },
- {}
+ {
+ 'barcodes' : util.functional.map_list( selection_list, function(o){return o.barcode;})
+ }
);
} catch(E) {
error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.util.spine_editor.spine_editor_error'),E);
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -486,6 +486,7 @@
}
}
+ var dont_close = false;
JSAN.use('util.window'); var win = new util.window();
if (copies.length > 0) {
JSAN.use('cat.util');
@@ -507,13 +508,13 @@
//case 1706 /* ITEM_BARCODE_EXISTS */ :
if (copies && copies.length > 0 && $('print_labels').checked) {
JSAN.use('util.functional');
- JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
- data.temp_barcodes_for_labels = util.functional.map_list( copies, function(o){return o.barcode();}) ;
- data.stash('temp_barcodes_for_labels');
- var w = win.open(
+ dont_close = true;
+ xulG.set_tab(
urls.XUL_SPINE_LABEL,
- 'spine_labels',
- 'chrome,resizable,width=750,height=550'
+ { 'tab_name' : $("catStrings").getString('staff.cat.util.spine_editor.tab_name') },
+ {
+ 'barcodes' : util.functional.map_list( copies, function(o){return o.barcode();})
+ }
);
}
} catch(E) {
@@ -521,10 +522,10 @@
}
}
- if (typeof window.refresh == 'function') { window.refresh(); }
- if (typeof g.refresh == 'function') { g.refresh(); }
+ try { if (typeof window.refresh == 'function') { window.refresh(); } } catch(E) { dump(E+'\n'); }
+ try { if (typeof g.refresh == 'function') { g.refresh(); } } catch(E) { dump(E+'\n'); }
- window.close();
+ if (! dont_close) { xulG.close_tab(); }
} catch(E) {
g.error.standard_unexpected_error_alert($(catStrings).getString('staff.cat.volume_copy_creator.stash_and_close.tree_err3'),E);
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/copy_status.js 2010-11-29 16:44:04 UTC (rev 18852)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/copy_status.js 2010-11-29 17:12:26 UTC (rev 18853)
@@ -532,14 +532,9 @@
var title = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.add_items.title', [r]);
- JSAN.use('util.window'); var win = new util.window();
- var w = win.open(
+ var w = xulG.new_tab(
window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
- //+'?doc_id=' + window.escape(r)
- //+'&ou_ids=' + window.escape( js2JSON(list) )
- //+'©_shortcut=' + window.escape( js2JSON(copy_shortcut[r]) ),
- title,
- 'chrome,resizable',
+ { 'tab_name' : title },
{ 'doc_id' : r, 'ou_ids' : list, 'copy_shortcut' : copy_shortcut[r] }
);
}
@@ -687,13 +682,9 @@
var title = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.add_volumes.title', [r]);
- JSAN.use('util.window'); var win = new util.window();
- var w = win.open(
+ var w = xulG.new_tab(
window.xulG.url_prefix(urls.XUL_VOLUME_COPY_CREATOR),
- //+'?doc_id=' + window.escape(r)
- //+'&ou_ids=' + window.escape( js2JSON(list) ),
- title,
- 'chrome,resizable',
+ { 'tab_name' : title },
{ 'doc_id' : r, 'ou_ids' : list }
);
More information about the open-ils-commits
mailing list