Changeset 41932
- Timestamp:
- 10/18/2017 11:05:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r41930 r41932 6890 6890 // Set up publish settings section and its controls. 6891 6891 api.section( 'publish_settings', function( section ) { 6892 var updateButtonsState, trashControl, updateSectionActive, isSectionActive, statusControl, dateControl, toggleDateControl, publishWhenTime, pollInterval, updateTimeArrivedPoller, timeArrivedPollingInterval = 1000;6892 var updateButtonsState, trashControl, updateSectionActive, isSectionActive, statusControl, dateControl, toggleDateControl, publishWhenTime, pollInterval, updateTimeArrivedPoller, cancelScheduleButtonReminder, timeArrivedPollingInterval = 1000; 6893 6893 6894 6894 trashControl = new api.Control( 'trash_changeset', { … … 6952 6952 section.active.bind( updateButtonsState ); 6953 6953 6954 function highlightScheduleButton() { 6955 if ( ! cancelScheduleButtonReminder ) { 6956 cancelScheduleButtonReminder = api.utils.highlightButton( btnWrapper, { 6957 delay: 1000, 6958 6959 // Only abort the reminder when the save button is focused. 6960 // If the user clicks the settings button to toggle the 6961 // settings closed, we'll still remind them. 6962 focusTarget: saveBtn 6963 } ); 6964 } 6965 } 6966 function cancelHighlightScheduleButton() { 6967 if ( cancelScheduleButtonReminder ) { 6968 cancelScheduleButtonReminder(); 6969 cancelScheduleButtonReminder = null; 6970 } 6971 } 6972 api.state( 'selectedChangesetStatus' ).bind( cancelHighlightScheduleButton ); 6973 6954 6974 section.contentContainer.find( '.customize-action' ).text( api.l10n.updating ); 6955 6975 section.contentContainer.find( '.customize-section-back' ).removeAttr( 'tabindex' ); … … 6964 6984 publishSettingsBtn.attr( 'aria-expanded', String( isExpanded ) ); 6965 6985 publishSettingsBtn.toggleClass( 'active', isExpanded ); 6986 6987 if ( isExpanded ) { 6988 cancelHighlightScheduleButton(); 6989 } else if ( api.state( 'selectedChangesetStatus' ).get() !== api.state( 'changesetStatus' ).get() ) { 6990 highlightScheduleButton(); 6991 } else if ( 'future' === api.state( 'selectedChangesetStatus' ).get() && api.state( 'selectedChangesetDate' ).get() !== api.state( 'changesetDate' ).get() ) { 6992 highlightScheduleButton(); 6993 } 6966 6994 } ); 6967 6995 … … 7621 7649 var canSave; 7622 7650 7623 btnWrapper.removeClass( 'button-see-me' );7624 7625 7651 if ( ! activated() ) { 7626 7652 saveBtn.val( api.l10n.activate ); … … 7646 7672 if ( changesetDate.get() !== selectedChangesetDate.get() ) { 7647 7673 saveBtn.val( api.l10n.schedule ); 7648 btnWrapper.addClass( 'button-see-me' );7649 7674 } else { 7650 7675 saveBtn.val( api.l10n.scheduled ); 7651 7676 } 7652 7677 } else { 7653 btnWrapper.addClass( 'button-see-me' );7654 7678 saveBtn.val( api.l10n.schedule ); 7655 7679 }
Note: See TracChangeset
for help on using the changeset viewer.