Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/172698
Change subject: Introduce wikibase.experts.__namespace ...................................................................... Introduce wikibase.experts.__namespace Change-Id: I8e6437c3579eefebe712d3f6b035dffb50ae339a --- M lib/resources/experts/EntityIdInput.js A lib/resources/experts/__namespace.js M lib/resources/experts/resources.php M lib/resources/experts/wikibase.experts.js 4 files changed, 21 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/98/172698/1 diff --git a/lib/resources/experts/EntityIdInput.js b/lib/resources/experts/EntityIdInput.js index 81a1000..d2c8f1b 100644 --- a/lib/resources/experts/EntityIdInput.js +++ b/lib/resources/experts/EntityIdInput.js @@ -2,8 +2,6 @@ * @licence GNU GPL v2+ * @author Daniel Werner < daniel.wer...@wikimedia.de > */ -wikibase.experts = wikibase.experts || {}; - ( function( mw, wb, $, vv ) { 'use strict'; @@ -13,6 +11,7 @@ 'P': 'property' }; + var MODULE = wb.experts; var PARENT = vv.experts.StringValue; /** @@ -24,7 +23,7 @@ * @constructor * @extends jQuery.valueview.experts.StringValue */ - wb.experts.EntityIdInput = vv.expert( 'wikibaseentityidinput', PARENT, { + MODULE.EntityIdInput = vv.expert( 'wikibaseentityidinput', PARENT, { /** * @see Query.valueview.experts.StringValue._init diff --git a/lib/resources/experts/__namespace.js b/lib/resources/experts/__namespace.js new file mode 100644 index 0000000..b0a2f0c --- /dev/null +++ b/lib/resources/experts/__namespace.js @@ -0,0 +1,5 @@ +/** + * @license GNU GPL v2+ + * @author Daniel Werner < daniel.wer...@wikimedia.de > + */ +wikibase.experts = wikibase.experts || {}; diff --git a/lib/resources/experts/resources.php b/lib/resources/experts/resources.php index 8f68816..a8f7da8 100644 --- a/lib/resources/experts/resources.php +++ b/lib/resources/experts/resources.php @@ -20,6 +20,15 @@ return array( + 'wikibase.experts.__namespace' => $moduleTemplate + array( + 'scripts' => array( + '__namespace.js' + ), + 'dependencies' => array( + 'wikibase', + ) + ), + 'wikibase.experts.getStore' => $moduleTemplate + array( 'scripts' => array( 'wikibase.experts.js', @@ -33,8 +42,8 @@ 'jquery.valueview.experts.StringValue', 'jquery.valueview.experts.TimeInput', 'jquery.valueview.experts.UnsupportedValue', - 'wikibase', - 'wikibase.datamodel', + 'wikibase.datamodel.EntityId', + 'wikibase.experts.__namespace', 'wikibase.experts.EntityIdInput', ), ), @@ -50,7 +59,7 @@ 'jquery.wikibase.entityselector', 'mw.config.values.wbRepo', 'mediawiki.util', - 'wikibase', + 'wikibase.experts.__namespace', ), ), ); diff --git a/lib/resources/experts/wikibase.experts.js b/lib/resources/experts/wikibase.experts.js index 350da4d..02d933e 100644 --- a/lib/resources/experts/wikibase.experts.js +++ b/lib/resources/experts/wikibase.experts.js @@ -5,12 +5,12 @@ ( function( wb, vv, dv ) { 'use strict'; -wb.experts = wb.experts || {}; +var MODULE = wb.experts; /** * @param {dataTypes.DataTypeStore} dataTypeStore */ -wb.experts.getStore = function( dataTypeStore ) { +MODULE.getStore = function( dataTypeStore ) { var expertStore = new vv.ExpertStore( vv.experts.UnsupportedValue ); expertStore.registerDataValueExpert( -- To view, visit https://gerrit.wikimedia.org/r/172698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e6437c3579eefebe712d3f6b035dffb50ae339a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang <adrian.l...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits