jenkins-bot has submitted this change and it was merged.

Change subject: Initialize the save dialog correctly even if the sanity check 
failed
......................................................................


Initialize the save dialog correctly even if the sanity check failed

A very weird if statement caused pretty much all logic for displaying
the 'save' panel to be skipped if the sanity check had failed. The
result was that all buttons were displayed at the bottom of the
save dialog, even those that don't make sense in that context.

Change-Id: I628ebc05830fb25d67ff181852a1e56f0e25dee9
(cherry picked from commit f81de3e1e9025751f6a7abf2934e267594c01c88)
---
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
1 file changed, 13 insertions(+), 14 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index ceb3fec..2b30912 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -211,21 +211,20 @@
                case 'save':
                        if ( !this.sanityCheckVerified ) {
                                this.showMessage( 'dirtywarning', mw.msg( 
'visualeditor-savedialog-warning-dirty' ) );
-                       } else {
-                               this.saveButton.$.show();
-                               this.reviewButton.$.show();
-                               this.reviewGoodButton.$.hide();
-                               this.resolveConflictButton.$.hide();
-                               setTimeout( function () {
-                                       // fix input reference
-                                       var $textarea = 
dialog.editSummaryInput.$input;
-                                       $textarea.focus();
-                                       // If message has be pre-filled (e.g. 
section edit), move cursor to end
-                                       if ( $textarea.val() !== '' ) {
-                                               ve.selectEnd( $textarea[0] );
-                                       }
-                               } );
                        }
+                       this.saveButton.$.show();
+                       this.reviewButton.$.show();
+                       this.reviewGoodButton.$.hide();
+                       this.resolveConflictButton.$.hide();
+                       setTimeout( function () {
+                               // fix input reference
+                               var $textarea = dialog.editSummaryInput.$input;
+                               $textarea.focus();
+                               // If message has be pre-filled (e.g. section 
edit), move cursor to end
+                               if ( $textarea.val() !== '' ) {
+                                       ve.selectEnd( $textarea[0] );
+                               }
+                       } );
                        break;
                case 'conflict':
                        this.saveButton.$.hide();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I628ebc05830fb25d67ff181852a1e56f0e25dee9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.22wmf21
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to