Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (15 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 1: | Rivi 1: | ||
<includeonly><script type="text/javascript"> | <includeonly><script type="text/javascript"> | ||
if ( !window.formenabler ) { | |||
window.formenabler = true; | |||
function <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() { | ||
if ( typeof window.jQuery == 'undefined' ) { | if ( typeof window.jQuery == 'undefined' ) { | ||
| Rivi 13: | Rivi 17: | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | ||
jQuery('label.JwLocRadiobuttons').each(function() { | |||
var label = jQuery( this ); | |||
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() { | ||
var input = jQuery( this ).find('input').first(); | |||
var input = jQuery( this ). | var label = jQuery( this ).children('t').first(); | ||
var classes = jQuery( this ).attr('class').split(' '); | var classes = jQuery( this ).attr('class').split(' '); | ||
var val = | var val = input.val(); | ||
for (var i in classes) { | for (var i in classes) { | ||
| Rivi 41: | Rivi 51: | ||
if (strArr[1] == val) { | if (strArr[1] == val) { | ||
old = | old = label.html(); | ||
newLabel = old.substr(0, old.lastIndexOf(";")) + strArr[2].split('_').join(' '); | newLabel = old.substr(0, old.lastIndexOf(";")) + strArr[2].split('_').join(' '); | ||
label.html( newLabel ); | |||
break; | break; | ||
} | } | ||
| Rivi 49: | Rivi 59: | ||
}); | }); | ||
jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { | ||
| Rivi 369: | Rivi 380: | ||
} | } | ||
} | |||
</script></includeonly> | </script></includeonly> | ||


