Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #83 from xwp/bugfix/update-button
Browse files Browse the repository at this point in the history
Fix behavior of update button
  • Loading branch information
westonruter committed Aug 27, 2016
2 parents e0e08bb + 3e26906 commit 2a1ce07
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/customize-snapshots.js
Expand Up @@ -407,10 +407,10 @@

api.state( 'saved' ).bind( function( saved ) {
if ( saved && ! _.isEmpty( component.schedule.container ) ) {
component.data.dirty = false;
component.data.publishDate = component.getCurrentTime();
component.updateSchedule();
component.scheduleContainerDisplayed.set( false );
component.data.dirty = false;
component.updateSchedule();
}
} );

Expand Down Expand Up @@ -765,9 +765,11 @@

// Change update button to schedule.
if ( component.isFutureDate() ) {
save.html( component.data.i18n.scheduleButton );
save.text( component.data.i18n.scheduleButton );
} else if ( api.state( 'snapshot-exists' ).get() ) {
save.text( component.data.i18n.updateButton );
} else {
save.html( component.data.i18n.updateButton );
save.text( component.data.i18n.saveButton );
}

if ( scheduled || component.data.dirty ) {
Expand Down

0 comments on commit 2a1ce07

Please sign in to comment.