Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316293

Change subject: Don't show confirm dialog when switching to NWE
......................................................................

Don't show confirm dialog when switching to NWE

Bug: T148099
Change-Id: Icd756dc31ef8628795915ea972bb0ded385532ed
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/93/316293/1

diff --git 
a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
index 4cdfad2..8836380 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
@@ -105,6 +105,14 @@
 /**
  * @inheritdoc
  */
+ve.init.mw.DesktopWikitextArticleTarget.prototype.editSource = function () {
+       // Don't bother with a confirm dialog when switching to the new 
wikitext editor
+       this.switchToWikitextEditor( true, false );
+};
+
+/**
+ * @inheritdoc
+ */
 ve.init.mw.DesktopWikitextArticleTarget.prototype.onWindowPopState = function 
( e ) {
        var veaction, mode;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/316293
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd756dc31ef8628795915ea972bb0ded385532ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to