Ero sivun ”Widget:Form enabler X” versioiden välillä
Järvi-meriwikistä
(9 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 12: | Rivi 12: | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | ||
− | console.log(' | + | |
+ | |||
+ | jQuery('label.JwLocRadiobuttons').each(function() { | ||
+ | |||
+ | var label = jQuery( this ); | ||
+ | //console.log( label ); | ||
+ | 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; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
jQuery('fieldset:visible .JwLocCheckboxes').each(function() { | jQuery('fieldset:visible .JwLocCheckboxes').each(function() { | ||
Rivi 33: | Rivi 57: | ||
}); | }); | ||
+ | |||
jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | ||
Rivi 202: | Rivi 227: | ||
Jw_FormFieldResizer(); | Jw_FormFieldResizer(); | ||
}, 3000); | }, 3000); | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
checkAgain(); | checkAgain(); |