Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 11: | Rivi 11: | ||
setTimeout( function(){ <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:FormEnabler|escape:'html'}-->_jQueryTest() }, 300); | ||
function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { | |||
jQuery(' | console.log('xx'); | ||
jQuery( document ).on( 'click', '#pfForm', function( event ) { | |||
jQuery( 'input[type=datetime]' ).each( function() { | |||
console.log( jQuery( this ).val() ); | |||
}); | |||
}); | |||
var timer = setInterval( function() { | |||
// populate minimized fieldValuesDisplay with better content | |||
jQuery( '.fieldValuesDisplay' ).each( function() { | |||
if ( !jQuery( this ).hasClass( 'jw-minimized' ) ) { | |||
jQuery( this ).addClass( 'jw-minimized' ); | |||
var out = ''; | |||
var obsdate = new Date( jQuery( this ).closest( '.multipleTemplateInstanceTable' ).find( 'input[type=datetime]' ).first().val() ); | |||
out += '<span class="JwMinimzedItem">' + obsdate.toLocaleString() + '</span>'; | |||
jQuery( this ).closest( '.multipleTemplateInstanceTable' ).find( '.JwMinimizedValue' ).each( function() { | |||
if ( !!jQuery( this ).find( 'option:selected' ).text() ) { out += '<span class="JwMinimzedItem">' + jQuery( this ).find( 'option:selected' ).text() + '</span>'; } | |||
}); | |||
out += '<div style="float: right;"><label><input type="checkbox" class="JwMinimizedArchive" />Arkistoon</label></div>'; | |||
console.log( out ); | |||
jQuery( this ).html( out ); | |||
} | |||
}); | |||
// minimized/ | |||
jQuery( '.mw-widgets-datetime-dateTimeInputWidget-field' ).each( function() { | |||
if ( jQuery( this ).attr( 'size' ) == '2' ) { jQuery( this ).css( 'width', '3ch' ); } | |||
}); | |||
}, 250); | |||
//jQuery( document ).on( 'change', '.mw-widgets-datetime-dateTimeInputWidget-field', function() { console.log( 'change' ); } ); | |||
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 34: | Rivi 97: | ||
}); | }); | ||
jQuery('.JwLocDropdowns > option').each(function() { | |||
var classes = jQuery( this ).parent().attr('class').split(' '); | var classes = jQuery( this ).parent().attr('class').split(' '); | ||


