~canonical-sysadmins/wordpress/4.2.4

« back to all changes in this revision

Viewing changes to wp-includes/js/autosave.js

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
                                };
346
346
 
347
347
                                $notice = $( '#local-storage-notice' );
348
 
                                $('.wrap h2').first().after( $notice.addClass( 'updated' ).show() );
 
348
                                $('.wrap h2').first().after( $notice.addClass( 'notice-warning' ).show() );
349
349
 
350
350
                                $notice.on( 'click.autosave-local', function( event ) {
351
351
                                        var $target = $( event.target );
354
354
                                                restorePost( restorePostData );
355
355
                                                $target.parent().hide();
356
356
                                                $(this).find( 'p.undo-restore' ).show();
 
357
                                                $notice.removeClass( 'notice-warning' ).addClass( 'notice-success' );
357
358
                                        } else if ( $target.hasClass( 'undo-restore-backup' ) ) {
358
359
                                                restorePost( undoPostData );
359
360
                                                $target.parent().hide();
360
361
                                                $(this).find( 'p.local-restore' ).show();
 
362
                                                $notice.removeClass( 'notice-success' ).addClass( 'notice-warning' );
361
363
                                        }
362
364
 
363
365
                                        event.preventDefault();