[open-ils-commits] r20235 - branches/rel_2_1/Open-ILS/xul/staff_client/server/cat (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 20 04:12:12 EDT 2011
Author: phasefx
Date: 2011-04-20 04:12:07 -0400 (Wed, 20 Apr 2011)
New Revision: 20235
Modified:
branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js
Log:
remove the infinite loop that batch volume template application was causing
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2011-04-20 08:12:04 UTC (rev 20234)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2011-04-20 08:12:07 UTC (rev 20235)
@@ -177,7 +177,7 @@
g.copies = xulG.copies;
g.original_copies = js2JSON( g.copies );
for (var i = 0; i < g.applied_templates.length; i++) {
- g._apply_template( g.applied_templates[i] );
+ g._apply_template( g.applied_templates[i], false);
}
g.summarize( g.copies );
g.render();
@@ -233,7 +233,7 @@
g.copy_editor_prefs[ 'template_menu' ] = { 'value' : g.template_menu.value };
g.save_attributes();
}
- xulG.item_editor_apply_template = function() { g.apply_template(); };
+ xulG.item_editor_apply_template = function() { g.apply_template(true); };
xulG.item_editor_delete_template = function() { g.delete_template(); };
xulG.item_editor_save_template = function() { g.save_template(); };
xulG.item_editor_import_templates = function() { g.import_templates(); };
@@ -252,12 +252,12 @@
g.applied_templates = [];
-g.apply_template = function() {
+g.apply_template = function(apply_volume_editor_template_changes) {
try {
var name = g.template_menu.value;
if (g.templates[ name ] != 'undefined') {
g.applied_templates.push( name );
- g._apply_template(name);
+ g._apply_template(name,apply_volume_editor_template_changes);
g.summarize( g.copies );
g.render();
g.check_for_unmet_required_fields();
@@ -267,7 +267,7 @@
}
}
-g._apply_template = function(name) {
+g._apply_template = function(name,apply_volume_editor_template_changes) {
try {
if (g.templates[ name ] != 'undefined') {
var template = g.templates[ name ];
@@ -284,7 +284,7 @@
g.apply_owning_lib(template[i].value);
break;
case 'volume_copy_creator' :
- if (xulG.unified_interface) {
+ if (xulG.unified_interface && apply_volume_editor_template_changes) {
xulG.apply_template_to_batch(template[i].field,template[i].value);
}
break;
More information about the open-ils-commits
mailing list