[MediaWiki-commits] [Gerrit] fingerprint*view widget sanitation - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/159988 Change subject: fingerprint*view widget sanitation .. fingerprint*view widget sanitation Change-Id: Iff5401fb8efd3a4a8c391a945e5bee60a7a92ef8 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js 3 files changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/88/159988/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js index 55b66db..5333009 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js @@ -29,7 +29,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -122,31 +122,31 @@ prefix = $.wikibase.fingerprintlistview.prototype.widgetEventPrefix; this.$fingerprintlistview - .fingerprintlistview( { - value: this.options.value, - entityId: this.options.entityId, - api: this.options.api - } ) - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setError( error ); } ) .on( [ - prefix + 'create.' + self.widgetName, - prefix + 'afterstartediting.' + self.widgetName, - prefix + 'stopediting.' + self.widgetName, - prefix + 'afterstopediting.' + self.widgetName, - prefix + 'disable.' + self.widgetName + prefix + 'create.' + this.widgetName, + prefix + 'afterstartediting.' + this.widgetName, + prefix + 'stopediting.' + this.widgetName, + prefix + 'afterstopediting.' + this.widgetName, + prefix + 'disable.' + this.widgetName ].join( ' ' ), function( event ) { event.stopPropagation(); } - ); + ) + .fingerprintlistview( { + value: this.options.value, + entityId: this.options.entityId, + api: this.options.api + } ); }, /** @@ -286,7 +286,7 @@ enableRemove: false } ); - $fingerprintgroupview.on( 'keyup', function( event ) { + $fingerprintgroupview.on( 'keyup.edittoolbar', function( event ) { if( fingerprintgroupview.option( 'disabled' ) ) { return; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js index a03a32d..bfac4d6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js @@ -26,7 +26,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -98,21 +98,21 @@ // Fully encapsulate child widgets by suppressing their events: this.element - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setErro
[MediaWiki-commits] [Gerrit] fingerprint*view widget sanitation - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: fingerprint*view widget sanitation .. fingerprint*view widget sanitation Change-Id: Iff5401fb8efd3a4a8c391a945e5bee60a7a92ef8 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js 3 files changed, 24 insertions(+), 24 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js index 55b66db..5333009 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js @@ -29,7 +29,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -122,31 +122,31 @@ prefix = $.wikibase.fingerprintlistview.prototype.widgetEventPrefix; this.$fingerprintlistview - .fingerprintlistview( { - value: this.options.value, - entityId: this.options.entityId, - api: this.options.api - } ) - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setError( error ); } ) .on( [ - prefix + 'create.' + self.widgetName, - prefix + 'afterstartediting.' + self.widgetName, - prefix + 'stopediting.' + self.widgetName, - prefix + 'afterstopediting.' + self.widgetName, - prefix + 'disable.' + self.widgetName + prefix + 'create.' + this.widgetName, + prefix + 'afterstartediting.' + this.widgetName, + prefix + 'stopediting.' + this.widgetName, + prefix + 'afterstopediting.' + this.widgetName, + prefix + 'disable.' + this.widgetName ].join( ' ' ), function( event ) { event.stopPropagation(); } - ); + ) + .fingerprintlistview( { + value: this.options.value, + entityId: this.options.entityId, + api: this.options.api + } ); }, /** @@ -286,7 +286,7 @@ enableRemove: false } ); - $fingerprintgroupview.on( 'keyup', function( event ) { + $fingerprintgroupview.on( 'keyup.edittoolbar', function( event ) { if( fingerprintgroupview.option( 'disabled' ) ) { return; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js index a03a32d..bfac4d6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js @@ -26,7 +26,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -98,21 +98,21 @@ // Fully encapsulate child widgets by suppressing their events: this.element - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setError( error ); } ) .on(