Ero sivun ”Widget:Form enabler X” versioiden välillä
Järvi-meriwikistä
(49 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 15: | Rivi 13: | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | ||
− | |||
− | jQuery('.JwLocCheckboxes').each(function() { | + | 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() { | ||
var input = jQuery( this ).children('input').first(); | var input = jQuery( this ).children('input').first(); | ||
Rivi 23: | Rivi 43: | ||
var classes = jQuery( this ).attr('class').split(' '); | var classes = jQuery( this ).attr('class').split(' '); | ||
var val = input.val(); | var val = input.val(); | ||
− | + | ||
for (var i in classes) { | for (var i in classes) { | ||
Rivi 37: | Rivi 57: | ||
}); | }); | ||
+ | |||
jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | ||
Rivi 48: | 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 207: | Rivi 227: | ||
Jw_FormFieldResizer(); | Jw_FormFieldResizer(); | ||
}, 3000); | }, 3000); | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
checkAgain(); | checkAgain(); | ||