Ero sivun ”Widget:Form enabler X” versioiden välillä
Järvi-meriwikistä
Rivi 6: | Rivi 6: | ||
} else { | } else { | ||
jQuery.getScript( "/scripts/jquery.autosize-min.js", function( data, textStatus, jqxhr ) { | jQuery.getScript( "/scripts/jquery.autosize-min.js", function( data, textStatus, jqxhr ) { | ||
− | <!--{$id|default:FormEnabler|escape:'html'}--> | + | <!--{$id|default:FormEnabler|escape:'html'}-->_funcX(); |
}); | }); | ||
} | } | ||
} | } | ||
+ | |||
setTimeout( function(){ <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() }, 300); | ||
+ | |||
+ | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | ||
+ | |||
+ | jQuery('fieldset:visible .JwLocCheckboxes').each(function() { | ||
+ | |||
+ | var input = jQuery( this ).children('input').first(); | ||
+ | |||
+ | var classes = jQuery( this ).attr('class').split(' '); | ||
+ | var val = input.val(); | ||
+ | |||
+ | for (var i in classes) { | ||
+ | |||
+ | strArr = classes[i].split('-'); | ||
+ | |||
+ | if (strArr[1] == val) { | ||
+ | old = input.parent().html(); | ||
+ | newLabel = old.substr(0, old.lastIndexOf(";")) + strArr[2].split('_').join(' '); | ||
+ | jQuery( this ).html(newLabel); | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | } | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_func() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_func() { |