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

Change subject: Make entityselector always trigger the aftersetentity event
......................................................................


Make entityselector always trigger the aftersetentity event

This change also makes the EntityIdInput not listen on entityselectorselect, 
which
is a quite useless event because it happens before the entity actually is set.

In contrast to If62e8ea (which had the same purpose) this doesn't break setting 
qualifiers
on wikibase-item type claims.

Bug: 63057
Bug: 62868
Change-Id: I61c0f4aee14fe9c791006bd13c82f82ebe5f4f96
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Adrian Lang: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index c843948..9de45fe 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -683,6 +683,7 @@
                                        url: entity.url
                                };
                        }
+                       this._trigger( 'aftersetentity', 0, [ entity ? 
entity.id : null ] );
                },
 
                /**
@@ -706,10 +707,8 @@
                                // label field might be 
undefined/null/false/empty string!
                                var label = entity ? ( entity.label || 
entity.id ) : '';
 
-                               self._setEntity( entity );
                                self.element.val( label );
-
-                               self._trigger( 'aftersetentity', 0, [ entity ? 
entity.id : null ] );
+                               self._setEntity( entity );
                        };
 
                        if ( entity === undefined ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61c0f4aee14fe9c791006bd13c82f82ebe5f4f96
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to