Henning Snater has uploaded a new change for review.

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


Change subject: Implemented "eachchange" event using the jQuery.event.special 
API
......................................................................

Implemented "eachchange" event using the jQuery.event.special API

(bug 93736)
Adjustments to Wikibase component. (Requires change 
I8e674b825f08c656e9bb78296d074d2c73cc01e6.)

Change-Id: I8ef9e56ebe69c0451575f498a6f65bcf28a40905
---
M lib/WikibaseLib.hooks.php
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
M 
lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entitysearch.js
8 files changed, 13 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/28/93928/3

diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index ae5b10f..2bb1e44 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -139,7 +139,7 @@
                                'jquery.wikibase.toolbareditgroup',
                                'jquery.nativeEventHandler',
                                'jquery.client',
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                        )
                );
 
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 61623a6..6ae28ba 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -281,7 +281,7 @@
                                
'wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.css',
                        ),
                        'dependencies' => array(
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                                'jquery.effects.blind',
                                'jquery.inputAutoExpand',
                                'jquery.ui.widget'
@@ -331,7 +331,7 @@
                                'wikibase.ui.PropertyEditTool.css'
                        ),
                        'dependencies' => array(
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                                'jquery.nativeEventHandler',
                                'jquery.inputAutoExpand',
                                'jquery.tablesorter',
@@ -544,7 +544,7 @@
                                
'jquery.wikibase/jquery.wikibase.snakview/themes/default/snakview.SnakTypeSelector.css',
                        ),
                        'dependencies' => array(
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                                'jquery.nativeEventHandler',
                                'jquery.wikibase.entityselector',
                                'wikibase.datamodel',
@@ -684,7 +684,7 @@
                        ),
                        'dependencies' => array(
                                'jquery.autocompletestring',
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                                'jquery.ui.suggester',
                                'jquery.ui.resizable',
                                'jquery.ui.widget',
@@ -726,7 +726,7 @@
                                'jquery.valueview.experts.staticdom',
                                'jquery.valueview.experts.wikibase',
                                'wikibase.parsers',
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                                'jquery.inputAutoExpand',
                                'wikibase.utilities',
                        ),
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index dad5796..83dd7d6 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -67,7 +67,7 @@
  *                    (2) {String} Entity id
  *
  * @dependency jquery.autocompletestring
- * @dependency jquery.eachchange
+ * @dependency jquery.event.special.eachchange
  * @dependency jquery.ui.suggester
  * @dependency jquery.ui.resizable
  * @dependency jquery.util.adaptlettercase
@@ -184,7 +184,7 @@
                        var self = this;
 
                        this.element
-                       .eachchange( function( event, oldVal ) {
+                       .on( 'eachchange.' + this.widgetName, function( event, 
oldVal ) {
                                self._updateValue();
                        } )
                        .on( this.widgetName + 'refreshmenu.' + 
this.widgetName, function( event ) {
@@ -272,7 +272,6 @@
                        this.menu.element.off( '.' + this.widgetName );
 
                        this.element.off( '.' + this.widgetName );
-                       this.element.off( 'eachchange' );
 
                        this.element.removeClass( 'ui-entityselector-input' );
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
index 7863b64..dcddc9f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
@@ -193,7 +193,7 @@
                .on( 'blur', function( event ) {
                        self._tabToValueView = false;
                } )
-               .eachchange( function( oldValue ) {
+               .on( 'eachchange', function( event, oldValue ) {
                        // remove out-dated variations
                        if( self._variation ) {
                                self.propertyId( null );
diff --git 
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js 
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
index 25ffca8..05ac037 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
@@ -190,7 +190,7 @@
                // setting placeholder inside the jQuery object initialisation 
does not work as of jQuery 1.8.0
                .attr( 'placeholder', this.getOption( 'inputPlaceholder' ) )
                // on each change to this input check whether value was changed:
-               .eachchange( $.proxy( function( e, oldValue ) {
+               .on( 'eachchange', $.proxy( function( e, oldValue ) {
                        if( this.normalize( oldValue ) !== this.getValue() ) {
                                this._onInputRegistered(); // only called if 
input really changed
                        }
diff --git 
a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
 
b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
index 7358d3d..d5e74d8 100644
--- 
a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
+++ 
b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
@@ -307,7 +307,7 @@
                                                self.removeTag( $tag );
                                        }
                                } )
-                               .eachchange( function( e, oldValue ) {
+                               .on( 'eachchange', function( event, oldValue ) {
                                        // input change registered, check 
whether tag was really changed...
                                        var oldNormalValue = self._formatLabel( 
oldValue ),
                                                newNormalValue = 
self._formatLabel( input.val() );
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index 403a68d..5a396ec 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -73,7 +73,7 @@
                                'themes/default/wikibase.ui.entitysearch.css',
                        ),
                        'dependencies' => array(
-                               'jquery.eachchange',
+                               'jquery.event.special.eachchange',
                                'jquery.wikibase.entityselector',
                        ),
                        'messages' => array(
diff --git a/repo/resources/wikibase.ui.entitysearch.js 
b/repo/resources/wikibase.ui.entitysearch.js
index 5fc2367..284d7a4 100644
--- a/repo/resources/wikibase.ui.entitysearch.js
+++ b/repo/resources/wikibase.ui.entitysearch.js
@@ -69,7 +69,7 @@
                .on( 'entityselectoropen', function( event ) {
                        updateSuggestionSpecial();
                } )
-               .eachchange( function( event, oldVal ) {
+               .on( 'eachchange', function( event, oldVal ) {
                        updateSuggestionSpecial();
                } );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ef9e56ebe69c0451575f498a6f65bcf28a40905
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <henning.sna...@wikimedia.de>
Gerrit-Reviewer: Daniel Werner <daniel.a.r.wer...@gmail.com>
Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
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