Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355650 )

Change subject: Fix more jQuery 3 deprecations
......................................................................

Fix more jQuery 3 deprecations

* JQMIGRATE: jQuery.fn.unbind() is deprecated

Follow-up to 2d08f193caa9328a2b120f66ed4a46389f40690c.

Change-Id: Icb5911b533d3fe5bd652fcc6e8c953bc82f88703
---
M resources/mw.UploadWizardUpload.js
M resources/mw.UploadWizardUploadInterface.js
M resources/ui/steps/uw.ui.Upload.js
3 files changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index 78ed335..d24b092 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -87,7 +87,7 @@
        mw.UploadWizardUpload.prototype.remove = function () {
                // remove the div that passed along the trigger
                var $div = $( this.ui.div );
-               $div.unbind(); // everything
+               $div.off(); // unbind everything
                $div.remove();
 
                this.state = 'aborted';
diff --git a/resources/mw.UploadWizardUploadInterface.js 
b/resources/mw.UploadWizardUploadInterface.js
index 8ba3d89..1520df6 100644
--- a/resources/mw.UploadWizardUploadInterface.js
+++ b/resources/mw.UploadWizardUploadInterface.js
@@ -67,7 +67,8 @@
                $( this.div ).append( this.$form );
 
                // this.progressBar = ( no progress bar for individual uploads 
yet )
-               // we bind to the ui div since unbind doesn't work for non-DOM 
objects
+               // we bind to the ui div since .off() doesn't work for non-DOM 
objects
+               // TODO Convert this to an OO.EventEmitter, and use OOjs events
                $( this.div ).on( 'transportProgressEvent', function () { 
ui.showTransportProgress(); } );
        };
 
diff --git a/resources/ui/steps/uw.ui.Upload.js 
b/resources/ui/steps/uw.ui.Upload.js
index 5c6e271..3491a0a 100644
--- a/resources/ui/steps/uw.ui.Upload.js
+++ b/resources/ui/steps/uw.ui.Upload.js
@@ -561,7 +561,7 @@
        uw.ui.Upload.prototype.flickrInterfaceDestroy = function () {
                this.$flickrInput.val( '' );
                this.$flickrSelectList.empty();
-               this.$flickrSelectListContainer.unbind();
+               this.$flickrSelectListContainer.off();
                this.$flickrSelectListContainer.hide();
                this.$flickrContainer.hide();
                this.flickrButton.setDisabled( true );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb5911b533d3fe5bd652fcc6e8c953bc82f88703
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>

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

Reply via email to