Ero sivun ”Widget:Form enabler X” versioiden välillä
Järvi-meriwikistä
(48 välissä olevaa versiota 2 käyttäjän tekeminä ei näytetä) | |||
Rivi 5: | Rivi 5: | ||
setTimeout( function(){ <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
− | + | <!--{$id|default:FormEnabler|escape:'html'}-->_funcX(); | |
− | + | } | |
− | |||
− | |||
} | } | ||
Rivi 14: | Rivi 12: | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | ||
+ | |||
+ | |||
+ | 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 35: | Rivi 57: | ||
}); | }); | ||
+ | |||
jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | ||
Rivi 46: | Rivi 69: | ||
if (strArr[1] == val) { | if (strArr[1] == val) { | ||
− | str = strArr[2].split('_').join(' ') | + | str = strArr[2].split('_').join(' ').split('~').join('-'); |
− | |||
jQuery( this ).html(str); | jQuery( this ).html(str); | ||
break; | break; | ||
Rivi 205: | Rivi 227: | ||
Jw_FormFieldResizer(); | Jw_FormFieldResizer(); | ||
}, 3000); | }, 3000); | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
checkAgain(); | checkAgain(); | ||