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

Change subject: Altered initialization order in entityview widgets
......................................................................


Altered initialization order in entityview widgets

The "create" event is supposed to be triggered after all sub-components have 
been created
an initialized.

Change-Id: I1ba7f97fca9e5e48eb155a829e38637ad326aef5
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.itemview.js
M lib/resources/jquery.wikibase/jquery.wikibase.propertyview.js
3 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index d889c39..bb09e47 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -129,8 +129,6 @@
 
                this.option( 'languages', this.options.languages );
 
-               PARENT.prototype._create.call( this );
-
                this.element.data( $.wikibase.entityview.prototype.widgetName, 
this );
 
                this.$toc = $( '.toc', this.element );
@@ -140,6 +138,8 @@
                this._initAliases();
                this._initFingerprints();
 
+               PARENT.prototype._create.call( this );
+
                this._attachEventHandlers();
        },
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.itemview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.itemview.js
index 56e8610..e7fa03c 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.itemview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.itemview.js
@@ -34,9 +34,9 @@
         * @protected
         */
        _create: function() {
-               this._initEntityview();
                this._initStatements();
                this._initSiteLinks();
+               this._initEntityview();
        },
 
        /**
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.propertyview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.propertyview.js
index dfaa26b..f7a6c59 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.propertyview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.propertyview.js
@@ -39,9 +39,9 @@
         * @protected
         */
        _create: function() {
-               this._initEntityview();
                this._initDataType();
                this._initStatements();
+               this._initEntityview();
        },
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ba7f97fca9e5e48eb155a829e38637ad326aef5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to