mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Fix post-edit notification after switching from old wikitext editor
Follow-up to 37b81b5ba4
.
Change-Id: I2e61b265822d75cd409d57a4aec7abfbbd4d3fc4
This commit is contained in:
parent
420b2a9382
commit
60b9a71f9b
|
@ -642,11 +642,16 @@ ve.init.mw.ArticleTarget.prototype.saveComplete = function ( data ) {
|
|||
if ( !this.pageExists || this.restoring || !this.isViewPage ) {
|
||||
// Teardown the target, ensuring auto-save data is cleared
|
||||
this.teardown().then( function () {
|
||||
|
||||
var newUrlParams = !target.pageExists || target.restoring ?
|
||||
( data.newrevid === undefined ? {} : { venotify: target.restoring ? 'restored' : 'created' } ) :
|
||||
{};
|
||||
|
||||
var newUrlParams = {};
|
||||
if ( data.newrevid !== undefined ) {
|
||||
if ( target.restoring ) {
|
||||
newUrlParams.venotify = 'restored';
|
||||
} else if ( !target.pageExists ) {
|
||||
newUrlParams.venotify = 'created';
|
||||
} else {
|
||||
newUrlParams.venotify = 'saved';
|
||||
}
|
||||
}
|
||||
if ( data.isRedirect ) {
|
||||
newUrlParams.redirect = 'no';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue