From: phasefx Date: Tue, 8 Aug 2006 15:28:48 +0000 (+0000) Subject: don't apply stat cats from a template if the stat cats are not visible in the editor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1e2689231565bdfcc6298f0f7b669931183660b4;p=evergreen%2Fpines.git don't apply stat cats from a template if the stat cats are not visible in the editor git-svn-id: svn://svn.open-ils.org/ILS/trunk@5367 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 8db1308cec..9c0bd963e0 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -100,7 +100,7 @@ function my_init() { /******************************************************************************************************/ /* Add stat cats to the panes_and_field_names.right_pane4 */ - var stat_cat_seen = {}; + g.stat_cat_seen = {}; function add_stat_cat(sc) { @@ -113,9 +113,9 @@ function my_init() { sc_id = sc.id(); } - if (typeof stat_cat_seen[sc_id] != 'undefined') { return; } + if (typeof g.stat_cat_seen[sc_id] != 'undefined') { return; } - stat_cat_seen[ sc_id ] = 1; + g.stat_cat_seen[ sc_id ] = 1; if (typeof sc != 'object') { @@ -218,7 +218,7 @@ g.apply_template = function() { g.apply(template[i].field,template[i].value); break; case 'stat_cat' : - g.apply_stat_cat(template[i].field,template[i].value); + if (g.stat_cat_seen[ template[i].field ]) g.apply_stat_cat(template[i].field,template[i].value); break; } }