Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Remove lightbox image preview dialogs
......................................................................

Remove lightbox image preview dialogs

They were deemed to be basically useless.

https://commons.wikimedia.org/wiki/Commons:Village_pump/Proposals?oldid=172754494#Removing_lightbox_previews_in_UploadWizard

(Split off from Id3f2642b50d380fba77d6362564930ec08402b76.)

Bug: T112907
Change-Id: I039f755e3d22849a1686a0fd3956a9719f39e4f4
---
M UploadWizardHooks.php
M i18n/en.json
M i18n/qqq.json
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardUpload.js
M resources/mw.UploadWizardUploadInterface.js
M resources/ui/uw.ui.DeedPreview.js
M resources/ui/uw.ui.Thanks.js
M resources/uploadWizard.css
9 files changed, 5 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/38/239838/1

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index bf039e4..f011d47 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -423,7 +423,6 @@
                                'mwe-upwiz-thumbnail-failed',
                                'mwe-upwiz-unparseable-filename',
                                'mwe-upwiz-unparseable-title',
-                               'mwe-upwiz-image-preview',
                                'mwe-upwiz-subhead-bugs',
                                'mwe-upwiz-subhead-alt-upload',
                                'mwe-upwiz-feedback-prompt',
diff --git a/i18n/en.json b/i18n/en.json
index cf22fb3..8e444b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -304,7 +304,6 @@
        "mwe-upwiz-thumbnail-failed": "The upload succeeded, but the server 
could not get a preview thumbnail.",
        "mwe-upwiz-unparseable-filename": "Could not understand the filename 
\"$1\".",
        "mwe-upwiz-unparseable-title": "This title is invalid. Make sure to 
remove characters like square brackets, colons, comparison operators, pipes and 
curly brackets.",
-       "mwe-upwiz-image-preview": "File preview",
        "mwe-upwiz-subhead-bugs": "[$1 Known issues]",
        "mwe-upwiz-subhead-alt-upload": "Back to the old form",
        "mwe-upwiz-feedback-prompt": "Leave feedback",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 202afba..b082944 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -328,7 +328,6 @@
        "mwe-upwiz-thumbnail-failed": "Error shown when no upload preview could 
be fetched from the server.",
        "mwe-upwiz-unparseable-filename": "Used as error message. 
Parameters:\n* $1 - filename",
        "mwe-upwiz-unparseable-title": "Used as error message. More information 
about page titles [[:mw:Manual:Page title|at MediaWiki.org]].",
-       "mwe-upwiz-image-preview": "Used as title for the preview of the image 
file.",
        "mwe-upwiz-subhead-bugs": "Unused at this time. Parameters:\n* $1 - 
full URL\n{{Identical|Known issue}}",
        "mwe-upwiz-subhead-alt-upload": "Used as a link in the sub-header. Will 
go to an alternate upload form.",
        "mwe-upwiz-feedback-prompt": "Used as a link in the 
sub-header.\n{{Identical|Leave feedback}}",
diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index e3cddfa..21116fd 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -1146,8 +1146,7 @@
                        this.upload.setThumbnail(
                                this.thumbnailDiv,
                                mw.UploadWizard.config.thumbnailWidth,
-                               mw.UploadWizard.config.thumbnailMaxHeight,
-                               true
+                               mw.UploadWizard.config.thumbnailMaxHeight
                        );
                        this.prefillDate();
                        this.prefillAuthor();
diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index 7d38300..602c5fc 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -1072,9 +1072,8 @@
         * @param selector
         * @param width  Width constraint
         * @param height Height constraint (optional)
-        * @param boolean add lightbox large preview when ready
         */
-       mw.UploadWizardUpload.prototype.setThumbnail = function ( selector, 
width, height, isLightBox ) {
+       mw.UploadWizardUpload.prototype.setThumbnail = function ( selector, 
width, height ) {
                var upload = this,
                        placed = false;
 
@@ -1109,9 +1108,6 @@
                $.subscribeReady(
                        'thumbnails.' + this.index,
                        function ( x ) {
-                               if ( isLightBox ) {
-                                       upload.setLightBox( selector );
-                               }
                                if ( !placed ) {
                                        if ( x === 'api' ) {
                                                // get the thumbnail via API. 
Queries are cached, so if this thumbnail was already
@@ -1127,40 +1123,6 @@
                                }
                        }
                );
-       };
-
-       /**
-        * set up lightbox behavior for non-complete thumbnails
-        * TODO center this
-        * @param selector
-        */
-       mw.UploadWizardUpload.prototype.setLightBox = function ( selector ) {
-               var upload = this,
-                       $imgDiv = $( '<div></div>' ).css( 'text-align', 
'center' );
-
-               $( selector )
-                       .addClass( 'mwe-upwiz-lightbox-link' )
-                       .click( function () {
-                               // get large preview image
-                               // open large preview in modal dialog box
-                               $( '<div class="mwe-upwiz-lightbox"></div>' )
-                                       .append( $imgDiv )
-                                       .dialog( {
-                                               
minWidth:mw.UploadWizard.config.largeThumbnailWidth,
-                                               
minHeight:mw.UploadWizard.config.largeThumbnailMaxHeight,
-                                               autoOpen:true,
-                                               title:mw.message( 
'mwe-upwiz-image-preview' ).escaped(),
-                                               modal:true,
-                                               resizable:false
-                                       } );
-                               upload.setThumbnail(
-                                       $imgDiv,
-                                       
mw.UploadWizard.config.largeThumbnailWidth,
-                                       
mw.UploadWizard.config.largeThumbnailMaxHeight,
-                                       false /* obviously the largeThumbnail 
doesn't have a lightbox itself! */
-                               );
-                               return false;
-                       } ); // close thumbnail click function
        };
 
        mw.UploadWizardUpload.prototype.createDetails = function () {
diff --git a/resources/mw.UploadWizardUploadInterface.js 
b/resources/mw.UploadWizardUploadInterface.js
index b26976b..5c305c1 100644
--- a/resources/mw.UploadWizardUploadInterface.js
+++ b/resources/mw.UploadWizardUploadInterface.js
@@ -121,8 +121,7 @@
                this.upload.setThumbnail(
                        $preview,
                        mw.UploadWizard.config.thumbnailWidth,
-                       mw.UploadWizard.config.thumbnailMaxHeight,
-                       true
+                       mw.UploadWizard.config.thumbnailMaxHeight
                );
        };
 
diff --git a/resources/ui/uw.ui.DeedPreview.js 
b/resources/ui/uw.ui.DeedPreview.js
index fb4b977..1386edb 100644
--- a/resources/ui/uw.ui.DeedPreview.js
+++ b/resources/ui/uw.ui.DeedPreview.js
@@ -28,8 +28,7 @@
                upload.setThumbnail(
                        this.$thumbnailDiv,
                        config.thumbnailWidth,
-                       config.thumbnailMaxHeight,
-                       true
+                       config.thumbnailMaxHeight
                );
                $( '#mwe-upwiz-deeds-thumbnails' ).append( this.$thumbnailDiv );
        };
diff --git a/resources/ui/uw.ui.Thanks.js b/resources/ui/uw.ui.Thanks.js
index ac2cdf6..d9b0f67 100644
--- a/resources/ui/uw.ui.Thanks.js
+++ b/resources/ui/uw.ui.Thanks.js
@@ -138,8 +138,7 @@
                upload.setThumbnail(
                        $thumbnailDiv,
                        mw.UploadWizard.config.thumbnailWidth,
-                       mw.UploadWizard.config.thumbnailMaxHeight,
-                       false
+                       mw.UploadWizard.config.thumbnailMaxHeight
                );
 
                // Set the thumbnail links so that they point to the image 
description page
diff --git a/resources/uploadWizard.css b/resources/uploadWizard.css
index 49e7ad1..52153af 100644
--- a/resources/uploadWizard.css
+++ b/resources/uploadWizard.css
@@ -763,10 +763,6 @@
        margin-bottom: 0;
 }
 
-.ui-dialog .mwe-upwiz-lightbox {
-       padding: 0;
-}
-
 .mwe-upwiz-details-texts {
        padding: 0.5em;
 }
@@ -789,10 +785,6 @@
        font-style:italic;
        color:gray;
        padding-left:0.5em;
-}
-
-.mwe-upwiz-lightbox-link a {
-       cursor: pointer;
 }
 
 .mwe-upwiz-other-textarea {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I039f755e3d22849a1686a0fd3956a9719f39e4f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

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

Reply via email to