Ero sivun ”Widget:Form enabler XX” versioiden välillä
Järvi-meriwikistä
(10 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 13: | Rivi 13: | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | ||
− | console.log(' | + | console.log('xx'); |
jQuery( document ).on( 'click', '#pfForm', function( event ) { | jQuery( document ).on( 'click', '#pfForm', function( event ) { | ||
− | + | jQuery( 'input[type=datetime]' ).each( function() { | |
− | + | console.log( jQuery( this ).val() ); | |
+ | }); | ||
}); | }); | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
var timer = setInterval( function() { | var timer = setInterval( function() { | ||
Rivi 60: | Rivi 53: | ||
//jQuery( document ).on( 'change', '.mw-widgets-datetime-dateTimeInputWidget-field', function() { console.log( 'change' ); } ); | //jQuery( document ).on( 'change', '.mw-widgets-datetime-dateTimeInputWidget-field', function() { console.log( 'change' ); } ); | ||
− | jQuery(' | + | 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('.JwLocCheckboxes').each(function() { | ||
var input = jQuery( this ).children('input').first(); | var input = jQuery( this ).children('input').first(); | ||
Rivi 81: | Rivi 97: | ||
}); | }); | ||
− | jQuery(' | + | jQuery('.JwLocDropdowns > option').each(function() { |
var classes = jQuery( this ).parent().attr('class').split(' '); | var classes = jQuery( this ).parent().attr('class').split(' '); |