Exclude parameters from extras templates for all control types.

master
Pacman Ghost 5 years ago
parent 749d543d6a
commit ebbfa3305c
  1. 14
      vasl_templates/webapp/static/snippets.js

@ -718,17 +718,17 @@ function unload_snippet_params( unpack_scenario_date, template_id )
} }
// collect all the template parameters // collect all the template parameters
add_param = function($elem) { params[ $elem.attr("name") ] = $elem.val() ; } ; add_param = function( $elem ) {
$("input[type='text'].param").each( function() {
// NOTE: We only unload parameters on the EXTRAS tab if we're processing an extras template. // 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/" ) if ( template_id === null || template_id.substr(0,7) !== "extras/" )
return ; return ;
} }
add_param( $(this) ) ; params[ $elem.attr("name") ] = $elem.val() ;
} ) ; } ;
$("textarea.param").each( function() { add_param($(this)) ; } ) ; $("input[type='text'].param").each( function() { add_param( $(this) ) ; } ) ;
$("select.param").each( function() { add_param($(this)) ; } ) ; $("textarea.param").each( function() { add_param( $(this) ) ; } ) ;
$("select.param").each( function() { add_param( $(this) ) ; } ) ;
// collect the SSR's // collect the SSR's
params.SSR = [] ; params.SSR = [] ;

Loading…
Cancel
Save