|
|
| 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() {
| | function <!--{$id|default:FormEnabler|escape:'html'}-->_funcX() { |
|
| | console.log('not x'); |
| console.log( 'x' );
| |
| //jQuery( document ).on( 'click', '.JwMinimizedArchive', function( e ) {
| |
| // console.log( 'click' );
| |
| // e.stopImmediatePropagation();
| |
| // e.preventDefault();
| |
| // e.stopPropagation();
| |
| //});
| |
|
| |
| /*
| |
| 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' ); } );
| |
|
| |
|
| |
| // deal with radio buttons
| |
| jQuery( 'label.JwLocRadiobuttons' ).each(function() {
| |
| | |
| 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;
| |
| }
| |
| }
| |
|
| |
| });
| |
| // radio buttons/
| |
| | |
| // deal with checkboxes
| |
| jQuery('fieldset:visible .JwLocCheckboxes').each(function() { | | jQuery('fieldset:visible .JwLocCheckboxes').each(function() { |
| | | |
| Rivi 102: |
Rivi 34: |
| }); | | }); |
|
| |
|
| // deal with dropdowns
| | jQuery('fieldset:visible .JwLocDropdowns > option').each(function() { |
| jQuery('fieldset:visible .JwLocDropdowns > option').each(function() {
| |
|
| |
|
| var classes = jQuery( this ).parent().attr('class').split(' '); | | var classes = jQuery( this ).parent().attr('class').split(' '); |