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

Change subject: Replace .live function calls with .on
......................................................................


Replace .live function calls with .on

.live is not support by jQuery 1.11

Fixes T84996

Bug: T84996
Change-Id: I2a0601b2422bcae1a3c3b2ca66964372509d4acb
---
M modules/ext.pageTriage.views.toolbar/ext.pageTriage.mark.js
M modules/ext.pageTriage.views.toolbar/ext.pageTriage.tags.js
2 files changed, 14 insertions(+), 10 deletions(-)

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



diff --git a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.mark.js 
b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.mark.js
index 123bf65..2d320d0 100644
--- a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.mark.js
+++ b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.mark.js
@@ -167,6 +167,12 @@
                                maxLength = 250, modules = mw.config.get( 
'wgPageTriageCurationModules' ),
                                showNoteSection = true, noteTarget = '', 
noteTitle;
 
+                       function handleFocus() {
+                               $( this ).val( '' );
+                               $( this ).css( 'color', 'black' );
+                               $( this ).off( 'focus', handleFocus );
+                       }
+
                        if ( status === 'unreviewed' ) {
                                noteTitle = 'pagetriage-add-a-note-reviewer';
                                // there is no reviewer recorded or the 
reviewer is reverting their previous reviewed status
@@ -214,11 +220,7 @@
                                        } else {
                                                $( '#' + buttonId ).button( 
'enable' );
                                        }
-                               } ).live( 'focus', function(e) {
-                                       $( this ).val( '' );
-                                       $( this ).css( 'color', 'black' );
-                                       $( this ).unbind( e );
-                               } ).change( function() {
+                               } ).on( 'focus', handleFocus ).change( 
function() {
                                        _this.noteChanged = true;
                                } );
                        }
diff --git a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.tags.js 
b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.tags.js
index 3028ac0..7152c03 100644
--- a/modules/ext.pageTriage.views.toolbar/ext.pageTriage.tags.js
+++ b/modules/ext.pageTriage.views.toolbar/ext.pageTriage.tags.js
@@ -74,6 +74,12 @@
                 * Display the tag flyout, everything should be reset
                 */
                render: function() {
+                       function handleFocus() {
+                               $( this ).val( '' );
+                               $( this ).css( 'color', 'black' );
+                               $( this ).off( 'focus', handleFocus );
+                       }
+
                        var _this = this;
                        this.reset();
                        this.$tel.html( this.template( { 'tags': 
this.tagsOptions, 'warningNotice': this.model.tagWarningNotice(), 'title': 
this.title, 'maxLength': this.noteMaxLength, 'creator': this.model.get( 
'user_name' ) } ) );
@@ -91,11 +97,7 @@
                                } else {
                                        $( '#mwe-pt-tag-submit-button' 
).button( 'disable' );
                                }
-                       } ).live( 'focus', function(e) {
-                               $( this ).val( '' );
-                               $( this ).css( 'color', 'black' );
-                               $( this ).unbind( e );
-                       } ).change( function() {
+                       } ).on( 'focus', handleFocus ).change( function() {
                                _this.noteChanged = true;
                        } );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a0601b2422bcae1a3c3b2ca66964372509d4acb
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to