jenkins-bot has submitted this change and it was merged.
Change subject: Rename functions from thingBuilder to buildThing
......................................................................
Rename functions from thingBuilder to buildThing
Since they are functions, not objects, a verb is a much better name than a
noun.
Change-Id: I262dc991d126f52dfe4fc5cb546b8ab751258203
---
M view/resources/jquery/wikibase/jquery.wikibase.entityview.js
M view/resources/jquery/wikibase/jquery.wikibase.itemview.js
M view/resources/jquery/wikibase/jquery.wikibase.propertyview.js
M view/resources/wikibase/view/ViewFactory.js
M view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js
M view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js
M view/tests/qunit/wikibase/view/ViewFactory.tests.js
7 files changed, 27 insertions(+), 27 deletions(-)
Approvals:
Jonas Kress (WMDE): Looks good to me, approved
Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/view/resources/jquery/wikibase/jquery.wikibase.entityview.js
b/view/resources/jquery/wikibase/jquery.wikibase.entityview.js
index 1809ab3..8381190 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.entityview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.entityview.js
@@ -16,7 +16,7 @@
*
* @param {Object} options
* @param {wikibase.datamodel.Entity} options.value
- * @param {Function} options.entityTermsViewBuilder
+ * @param {Function} options.buildEntityTermsView
*/
/**
* @event afterstartediting
@@ -36,7 +36,7 @@
* @protected
*/
options: {
- entityTermsViewBuilder: null,
+ buildEntityTermsView: null,
template: 'wikibase-entityview',
templateParams: [
'', // entity type
@@ -84,7 +84,7 @@
* @throws {Error} if a required options is missing.
*/
_init: function() {
- if ( !this.options.value ||
!this.options.entityTermsViewBuilder ) {
+ if ( !this.options.value || !this.options.buildEntityTermsView
) {
throw new Error( 'Required option(s) missing' );
}
@@ -107,7 +107,7 @@
this.$entityTerms = $( '<div/>' ).prependTo( this.$main
);
}
- this.options.entityTermsViewBuilder(
this.options.value.getFingerprint(), this.$entityTerms );
+ this.options.buildEntityTermsView(
this.options.value.getFingerprint(), this.$entityTerms );
},
/**
diff --git a/view/resources/jquery/wikibase/jquery.wikibase.itemview.js
b/view/resources/jquery/wikibase/jquery.wikibase.itemview.js
index de17967..e937813 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.itemview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.itemview.js
@@ -13,8 +13,8 @@
* @author H. Snater < [email protected] >
*
* @param {Object} options
- * @param {Function} options.sitelinkGroupListViewBuilder
- * @param {Function} options.statementGroupListViewBuilder
+ * @param {Function} options.buildSitelinkGroupListView
+ * @param {Function} options.buildStatementGroupListView
*
* @constructor
*
@@ -25,8 +25,8 @@
* @protected
*/
options: {
- sitelinkGroupListViewBuilder: null,
- statementGroupListViewBuilder: null
+ buildSitelinkGroupListView: null,
+ buildStatementGroupListView: null
},
/**
@@ -58,8 +58,8 @@
* @protected
*/
_init: function() {
- if ( !this.options.sitelinkGroupListViewBuilder ||
- !this.options.statementGroupListViewBuilder
+ if ( !this.options.buildSitelinkGroupListView ||
+ !this.options.buildStatementGroupListView
) {
throw new Error( 'Required option(s) missing' );
}
@@ -73,7 +73,7 @@
* @protected
*/
_initStatements: function() {
- this.options.statementGroupListViewBuilder( this.options.value,
this.$statements );
+ this.options.buildStatementGroupListView( this.options.value,
this.$statements );
// This is here to be sure there is never a duplicate id:
$( '.wikibase-statementgrouplistview' )
@@ -86,7 +86,7 @@
* @protected
*/
_initSiteLinks: function() {
- this.options.sitelinkGroupListViewBuilder(
this.options.value.getSiteLinks(), this.$siteLinks );
+ this.options.buildSitelinkGroupListView(
this.options.value.getSiteLinks(), this.$siteLinks );
},
/**
diff --git a/view/resources/jquery/wikibase/jquery.wikibase.propertyview.js
b/view/resources/jquery/wikibase/jquery.wikibase.propertyview.js
index d5bf0b2..3377b16 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.propertyview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.propertyview.js
@@ -13,7 +13,7 @@
* @author H. Snater < [email protected] >
*
* @param {Object} options
- * @param {Function} options.statementGroupListViewBuilder
+ * @param {Function} options.buildStatementGroupListView
*
* @constructor
*
@@ -24,7 +24,7 @@
* @protected
*/
options: {
- statementGroupListViewBuilder: null
+ buildStatementGroupListView: null
},
/**
@@ -59,7 +59,7 @@
* @protected
*/
_init: function() {
- if ( !this.options.statementGroupListViewBuilder ) {
+ if ( !this.options.buildStatementGroupListView ) {
throw new Error( 'Required option(s) missing' );
}
@@ -91,7 +91,7 @@
* @protected
*/
_initStatements: function() {
- this.options.statementGroupListViewBuilder( this.options.value,
this.$statements );
+ this.options.buildStatementGroupListView( this.options.value,
this.$statements );
// This is here to be sure there is never a duplicate id:
$( '.wikibase-statementgrouplistview' )
diff --git a/view/resources/wikibase/view/ViewFactory.js
b/view/resources/wikibase/view/ViewFactory.js
index a8bbbb1..a1b618d 100644
--- a/view/resources/wikibase/view/ViewFactory.js
+++ b/view/resources/wikibase/view/ViewFactory.js
@@ -154,9 +154,9 @@
entity.getType() + 'view',
$dom,
{
- entityTermsViewBuilder: $.proxy(
this.getEntityTermsView, this ),
- sitelinkGroupListViewBuilder: $.proxy(
this.getSitelinkGroupListView, this ),
- statementGroupListViewBuilder: $.proxy(
this.getStatementGroupListView, this ),
+ buildEntityTermsView: $.proxy(
this.getEntityTermsView, this ),
+ buildSitelinkGroupListView: $.proxy(
this.getSitelinkGroupListView, this ),
+ buildStatementGroupListView: $.proxy(
this.getStatementGroupListView, this ),
value: entity
}
);
diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js
b/view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js
index 75f7af7..79d901b 100644
--- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js
+++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js
@@ -13,9 +13,9 @@
var createItemview = function( options, $node ) {
options = $.extend( {
value: new wb.datamodel.Item( 'Q1' ),
- entityTermsViewBuilder: function() {},
- statementGroupListViewBuilder: function() {},
- sitelinkGroupListViewBuilder: function() {}
+ buildEntityTermsView: function() {},
+ buildStatementGroupListView: function() {},
+ buildSitelinkGroupListView: function() {}
}, options || {} );
$node = $node || $( '<div/>' ).appendTo( 'body' );
diff --git
a/view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js
b/view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js
index bdf484b..e0d61e1 100644
--- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js
+++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js
@@ -13,8 +13,8 @@
var createPropertyview = function( options, $node ) {
options = $.extend( {
value: new wb.datamodel.Property( 'P1', 'someDataType' ),
- entityTermsViewBuilder: function() {},
- statementGroupListViewBuilder: function() {}
+ buildEntityTermsView: function() {},
+ buildStatementGroupListView: function() {}
}, options || {} );
$node = $node || $( '<div/>' ).appendTo( 'body' );
diff --git a/view/tests/qunit/wikibase/view/ViewFactory.tests.js
b/view/tests/qunit/wikibase/view/ViewFactory.tests.js
index cc6f955..7d9647e 100644
--- a/view/tests/qunit/wikibase/view/ViewFactory.tests.js
+++ b/view/tests/qunit/wikibase/view/ViewFactory.tests.js
@@ -50,9 +50,9 @@
viewFactory.getEntityView( entity, $dom );
sinon.assert.calledWith( FooView, sinon.match( {
- entityTermsViewBuilder: sinon.match.func,
- sitelinkGroupListViewBuilder: sinon.match.func,
- statementGroupListViewBuilder: sinon.match.func,
+ buildEntityTermsView: sinon.match.func,
+ buildSitelinkGroupListView: sinon.match.func,
+ buildStatementGroupListView: sinon.match.func,
value: entity
} ) );
} );
--
To view, visit https://gerrit.wikimedia.org/r/242840
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I262dc991d126f52dfe4fc5cb546b8ab751258203
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits