Changeset 30307
- Timestamp:
- 11/11/2014 10:36:51 PM (10 years ago)
- Location:
- trunk/src/wp-admin/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r30306 r30307 132 132 */ 133 133 Container = api.Class.extend({ 134 defaultActiveArguments: { duration: 'fast' },135 defaultExpandedArguments: { duration: 'fast' },134 defaultActiveArguments: { duration: 'fast', completeCallback: $.noop }, 135 defaultExpandedArguments: { duration: 'fast', completeCallback: $.noop }, 136 136 137 137 initialize: function ( id, options ) { … … 218 218 onChangeActive: function ( active, args ) { 219 219 var duration = ( 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 ); 220 if ( active ) { 220 if ( ! $.contains( document, this.container ) ) { 221 // jQuery.fn.slideUp is not hiding an element if it is not in the DOM 222 this.container.toggle( active ); 223 args.completeCallback(); 224 } else if ( active ) { 221 225 this.container.stop( true, true ).slideDown( duration, args.completeCallback ); 222 226 } else { … … 641 645 */ 642 646 api.Control = api.Class.extend({ 643 defaultActiveArguments: { duration: 'fast' },647 defaultActiveArguments: { duration: 'fast', completeCallback: $.noop }, 644 648 645 649 initialize: function( id, options ) { … … 782 786 */ 783 787 onChangeActive: function ( active, args ) { 784 if ( active ) { 788 if ( ! $.contains( document, this.container ) ) { 789 // jQuery.fn.slideUp is not hiding an element if it is not in the DOM 790 this.container.toggle( active ); 791 args.completeCallback(); 792 } else if ( active ) { 785 793 this.container.slideDown( args.duration, args.completeCallback ); 786 794 } else { -
trunk/src/wp-admin/js/customize-widgets.js
r30104 r30307 406 406 api.Widgets.WidgetControl = api.Control.extend({ 407 407 defaultExpandedArguments: { 408 duration: 'fast' 408 duration: 'fast', 409 completeCallback: $.noop 409 410 }, 410 411
Note: See TracChangeset
for help on using the changeset viewer.