jenkins-bot has submitted this change and it was merged.
Change subject: Use postEdit mw.hook for save notifications
......................................................................
Use postEdit mw.hook for save notifications
The core changes to postedit in I778b18b that this depends on were
deployed to the cluster as part of 1.22wmf11.
Bug: 39632
Change-Id: Id4a8bc22c09a552ef79670b0d4fc4a70df07ec33
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 12 insertions(+), 10 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index a198ed8..d880256 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -151,11 +151,12 @@
// 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 );
@@ -453,11 +454,12 @@
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()
+ )
+ } );
}
};
--
To view, visit https://gerrit.wikimedia.org/r/69856
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id4a8bc22c09a552ef79670b0d4fc4a70df07ec33
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits