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

Change subject: Make child overlay hide the parent forcefully
......................................................................


Make child overlay hide the parent forcefully

So that when clicking "What does this mean?" in photo upload preview
doesn't ask the user if they want to cancel the upload.

Add JSHint configuration change so that unused parameters are okay -
describing the interface is more important here.

Change-Id: Ieb75812bb9f1eb603a6e66aa09469feb97b27a5c
---
M javascripts/common/Overlay.js
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/common/Overlay.js b/javascripts/common/Overlay.js
index 917f787..21aaa72 100644
--- a/javascripts/common/Overlay.js
+++ b/javascripts/common/Overlay.js
@@ -1,3 +1,4 @@
+/*jshint unused:vars */
 ( function( M, $ ) {
 
 var View = M.require( 'view' ),
@@ -56,7 +57,7 @@
                        // FIXME: prevent zooming within overlays but don't 
break the rendering!
                        // M.lockViewport();
                        if ( this.parent ) {
-                               this.parent.hide();
+                               this.parent.hide( true );
                        }
 
                        this.$el.appendTo( this.appendTo );
@@ -74,7 +75,13 @@
 
                        $( 'body' ).removeClass( 'navigation-enabled' );
                },
-               hide: function() {
+               /**
+                * Detach the overlay from the current view
+                *
+                * @param {boolean} force: Whether the overlay should be closed 
regardless of state (see PhotoUploadProgress)
+                * @return {boolean}: Whether the overlay was successfully 
hidden or not
+                */
+               hide: function( force ) {
                        // FIXME: allow zooming outside the overlay again
                        // M.unlockViewport();
                        this.$el.detach();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb75812bb9f1eb603a6e66aa09469feb97b27a5c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to