mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Use postEdit mw.hook for save notifications"
This commit is contained in:
commit
d0a6e70b1e
|
@ -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()
|
||||
)
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue