From ebbfa3305c551b91a2cb967c60c5446aaa93e16e Mon Sep 17 00:00:00 2001 From: Taka Date: Wed, 24 Jul 2019 06:30:21 +0000 Subject: [PATCH] Exclude parameters from extras templates for all control types. --- vasl_templates/webapp/static/snippets.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vasl_templates/webapp/static/snippets.js b/vasl_templates/webapp/static/snippets.js index adce42b..71e57b0 100644 --- a/vasl_templates/webapp/static/snippets.js +++ b/vasl_templates/webapp/static/snippets.js @@ -718,17 +718,17 @@ function unload_snippet_params( unpack_scenario_date, template_id ) } // collect all the template parameters - add_param = function($elem) { params[ $elem.attr("name") ] = $elem.val() ; } ; - $("input[type='text'].param").each( function() { + add_param = function( $elem ) { // NOTE: We only unload parameters on the EXTRAS tab if we're processing an extras template. - if ( $.contains( $("#tabs-extras")[0], $(this)[0] ) ) { + if ( $.contains( $("#tabs-extras")[0], $elem[0] ) ) { if ( template_id === null || template_id.substr(0,7) !== "extras/" ) return ; } - add_param( $(this) ) ; - } ) ; - $("textarea.param").each( function() { add_param($(this)) ; } ) ; - $("select.param").each( function() { add_param($(this)) ; } ) ; + params[ $elem.attr("name") ] = $elem.val() ; + } ; + $("input[type='text'].param").each( function() { add_param( $(this) ) ; } ) ; + $("textarea.param").each( function() { add_param( $(this) ) ; } ) ; + $("select.param").each( function() { add_param( $(this) ) ; } ) ; // collect the SSR's params.SSR = [] ;