Changeset 41947
- Timestamp:
- 10/19/2017 05:41:05 PM (8 years ago)
- Location:
- trunk/src/wp-admin/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r41936 r41947 6987 6987 6988 6988 section.expanded.bind( function( isExpanded ) { 6989 var defaultChangesetStatus; 6989 6990 publishSettingsBtn.attr( 'aria-expanded', String( isExpanded ) ); 6990 6991 publishSettingsBtn.toggleClass( 'active', isExpanded ); … … 6992 6993 if ( isExpanded ) { 6993 6994 cancelHighlightScheduleButton(); 6994 } else if ( api.state( 'selectedChangesetStatus' ).get() !== api.state( 'changesetStatus' ).get() ) { 6995 return; 6996 } 6997 6998 defaultChangesetStatus = api.state( 'changesetStatus' ).get(); 6999 if ( '' === defaultChangesetStatus || 'auto-draft' === defaultChangesetStatus ) { 7000 defaultChangesetStatus = 'publish'; 7001 } 7002 7003 if ( api.state( 'selectedChangesetStatus' ).get() !== defaultChangesetStatus ) { 6995 7004 highlightScheduleButton(); 6996 7005 } else if ( 'future' === api.state( 'selectedChangesetStatus' ).get() && api.state( 'selectedChangesetDate' ).get() !== api.state( 'changesetDate' ).get() ) { … … 8480 8489 8481 8490 function isCleanState() { 8491 var defaultChangesetStatus; 8482 8492 8483 8493 /* … … 8489 8499 } 8490 8500 8501 // Dirty if the changeset status has been changed but not saved yet. 8502 defaultChangesetStatus = api.state( 'changesetStatus' ).get(); 8503 if ( '' === defaultChangesetStatus || 'auto-draft' === defaultChangesetStatus ) { 8504 defaultChangesetStatus = 'publish'; 8505 } 8506 if ( api.state( 'selectedChangesetStatus' ).get() !== defaultChangesetStatus ) { 8507 return false; 8508 } 8509 8510 // Dirty if scheduled but the changeset date hasn't been saved yet. 8511 if ( 'future' === api.state( 'selectedChangesetStatus' ).get() && api.state( 'selectedChangesetDate' ).get() !== api.state( 'changesetDate' ).get() ) { 8512 return false; 8513 } 8514 8491 8515 return api.state( 'saved' ).get() && 'auto-draft' !== api.state( 'changesetStatus' ).get(); 8492 8516 } … … 8502 8526 function startPromptingBeforeUnload() { 8503 8527 api.unbind( 'change', startPromptingBeforeUnload ); 8528 api.state( 'selectedChangesetStatus' ).unbind( startPromptingBeforeUnload ); 8529 api.state( 'selectedChangesetDate' ).unbind( startPromptingBeforeUnload ); 8504 8530 8505 8531 // Prompt user with AYS dialog if leaving the Customizer with unsaved changes … … 8514 8540 } 8515 8541 api.bind( 'change', startPromptingBeforeUnload ); 8542 api.state( 'selectedChangesetStatus' ).bind( startPromptingBeforeUnload ); 8543 api.state( 'selectedChangesetDate' ).bind( startPromptingBeforeUnload ); 8516 8544 8517 8545 function requestClose() { -
trunk/src/wp-admin/js/widgets/media-widgets.js
r41933 r41947 94 94 */ 95 95 initialize: function( options ) { 96 var view = this, embedController; // eslint-disable-line consistent-thi 96 var view = this, embedController; // eslint-disable-line consistent-this 97 97 wp.media.view.Embed.prototype.initialize.call( view, options ); 98 98 if ( 'image' !== view.controller.options.mimeType ) {
Note: See TracChangeset
for help on using the changeset viewer.