equal
deleted
inserted
replaced
354 widgetForm = $( '.editwidget > form' ); |
354 widgetForm = $( '.editwidget > form' ); |
355 if ( 0 === widgetForm.length ) { |
355 if ( 0 === widgetForm.length ) { |
356 return; |
356 return; |
357 } |
357 } |
358 |
358 |
359 idBase = widgetForm.find( '> .widget-control-actions > .id_base' ).val(); |
359 idBase = widgetForm.find( '.id_base' ).val(); |
360 if ( -1 === component.idBases.indexOf( idBase ) ) { |
360 if ( -1 === component.idBases.indexOf( idBase ) ) { |
361 return; |
361 return; |
362 } |
362 } |
363 |
363 |
364 fieldContainer = $( '<div></div>' ); |
364 fieldContainer = $( '<div></div>' ); |
444 var widgetContainer = $( this ); |
444 var widgetContainer = $( this ); |
445 component.handleWidgetAdded( new jQuery.Event( 'widget-added' ), widgetContainer ); |
445 component.handleWidgetAdded( new jQuery.Event( 'widget-added' ), widgetContainer ); |
446 }); |
446 }); |
447 |
447 |
448 // Accessibility mode. |
448 // Accessibility mode. |
449 $( window ).on( 'load', function() { |
449 if ( document.readyState === 'complete' ) { |
|
450 // Page is fully loaded. |
450 component.setupAccessibleMode(); |
451 component.setupAccessibleMode(); |
451 }); |
452 } else { |
|
453 // Page is still loading. |
|
454 $( window ).on( 'load', function() { |
|
455 component.setupAccessibleMode(); |
|
456 }); |
|
457 } |
452 }); |
458 }); |
453 }; |
459 }; |
454 |
460 |
455 return component; |
461 return component; |
456 })( jQuery ); |
462 })( jQuery ); |