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

Change subject: Move hide.*Buttons functions to UWI
......................................................................


Move hide.*Buttons functions to UWI

Change-Id: Iad8d37df8c467dda73e9bfbee18297f7c69d899f
Phabricator: http://fab.wmflabs.org/T464
---
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardInterface.js
M resources/mw.UploadWizardUpload.js
3 files changed, 18 insertions(+), 18 deletions(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 8d33cbf..9d5133a 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -124,7 +124,7 @@
                        } )
 
                        .on( 'retry-uploads', function () {
-                               wizard.hideFileEndButtons();
+                               wizard.ui.hideFileEndButtons();
                                wizard.startUploads();
                        } )
 
@@ -171,7 +171,7 @@
 
                        .on( 'start-details', function () {
                                wizard.detailsValid( function () {
-                                       wizard.hideDetailsEndButtons();
+                                       wizard.ui.hideDetailsEndButtons();
                                        wizard.detailsSubmit( function () {
                                                wizard.detailsErrorCount();
                                                wizard.showNext( 'details', 
'complete', finalizeDetails );
@@ -532,18 +532,6 @@
                this.updateFileCounts();
        },
 
-
-       /**
-        * Hide the button choices at the end of the file step.
-        */
-       hideFileEndButtons: function() {
-               $( '#mwe-upwiz-stepdiv-file .mwe-upwiz-buttons 
.mwe-upwiz-file-endchoice' ).hide();
-       },
-
-       hideDetailsEndButtons: function() {
-               $( '#mwe-upwiz-stepdiv-details .mwe-upwiz-buttons 
.mwe-upwiz-file-endchoice' ).hide();
-       },
-
        /**
         * This is useful to clean out unused upload file inputs if the user 
hits GO.
         * We are using a second array to iterate, because we will be splicing 
the main one, _this.uploads
@@ -681,7 +669,7 @@
                var wizard = this;
                // remove the upload button, and the add file button
                $( '#mwe-upwiz-upload-ctrls' ).hide();
-               this.hideFileEndButtons();
+               this.ui.hideFileEndButtons();
                $( '#mwe-upwiz-add-file' ).hide();
 
                // reset any uploads in error state back to be shiny & new
@@ -828,7 +816,7 @@
         */
        updateFileCounts: function() {
                // First reset the wizard buttons.
-               this.hideFileEndButtons();
+               this.ui.hideFileEndButtons();
 
                if ( this.uploads.length - this.countEmpties() ) {
                        // we have uploads ready to go, so allow us to proceed
diff --git a/resources/mw.UploadWizardInterface.js 
b/resources/mw.UploadWizardInterface.js
index 7ae628a..a00871d 100644
--- a/resources/mw.UploadWizardInterface.js
+++ b/resources/mw.UploadWizardInterface.js
@@ -301,5 +301,19 @@
                        .click( startDetails );
        };
 
+       /**
+        * Hide the button choices at the end of the file step.
+        */
+       UWIP.hideFileEndButtons = function () {
+               $( '#mwe-upwiz-stepdiv-file .mwe-upwiz-buttons 
.mwe-upwiz-file-endchoice' ).hide();
+       };
+
+       /**
+        * Hide the button choices at the end of the details step.
+        */
+       UWIP.hideDetailsEndButtons = function () {
+               $( '#mwe-upwiz-stepdiv-details .mwe-upwiz-buttons 
.mwe-upwiz-file-endchoice' ).hide();
+       };
+
        mw.UploadWizardInterface = UploadWizardInterface;
 }( mediaWiki, jQuery, OO ) );
diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index de443f6..bd210b0 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -90,8 +90,6 @@
                var upload = this;
 
                if ( mw.UploadWizard.config.startImmediately === true ) {
-                       this.wizard.hideFileEndButtons();
-
                        if ( !this.wizard.progressBar || 
this.wizard.progressBar.finished === true ) {
                                this.wizard.startProgressBar();
                        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad8d37df8c467dda73e9bfbee18297f7c69d899f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <mtrac...@member.fsf.org>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to