Merge "Use postEdit mw.hook for save notifications"

This commit is contained in:
jenkins-bot 2013-07-29 23:23:11 +00:00 committed by Gerrit Code Review
commit d0a6e70b1e

View file

@ -124,11 +124,12 @@ ve.init.mw.ViewPageTarget = function VeInitMwViewPageTarget() {
// visualeditor-notification-saved
// visualeditor-notification-created
// visualeditor-notification-restored
mw.notify(
ve.msg( 'visualeditor-notification-' + currentUri.query.venotify,
new mw.Title( this.pageName ).toText()
)
);
mw.hook( 'postEdit' ).fire( {
'message':
ve.msg( 'visualeditor-notification-' + currentUri.query.venotify,
new mw.Title( this.pageName ).toText()
)
} );
if ( window.history.replaceState ) {
delete currentUri.query.venotify;
window.history.replaceState( null, document.title, currentUri );
@ -414,11 +415,12 @@ ve.init.mw.ViewPageTarget.prototype.onSave = function ( html, newid ) {
this.setupSectionEditLinks();
this.tearDownBeforeUnloadHandler();
this.deactivate( true );
mw.util.jsMessage(
ve.msg( 'visualeditor-notification-saved',
new mw.Title( this.pageName ).toText()
)
);
mw.hook( 'postEdit' ).fire( {
'message':
ve.msg( 'visualeditor-notification-saved',
new mw.Title( this.pageName ).toText()
)
} );
}
};