jenkins-bot has submitted this change and it was merged. Change subject: Fix documentation in the ve.ui.CiteFromIdReferenceWidget ......................................................................
Fix documentation in the ve.ui.CiteFromIdReferenceWidget Make the non-optional transclusionModel a parameter and document all other configuration options. Change-Id: I83c8eee0bf25142843a381ab1d99a0871a24a0a7 --- M modules/ve.ui.CiteFromIdInspector.js M modules/ve.ui.CiteFromIdReferenceWidget.js 2 files changed, 7 insertions(+), 6 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve.ui.CiteFromIdInspector.js b/modules/ve.ui.CiteFromIdInspector.js index f83e255..601c8d9 100644 --- a/modules/ve.ui.CiteFromIdInspector.js +++ b/modules/ve.ui.CiteFromIdInspector.js @@ -511,9 +511,9 @@ for ( i = 0; i < inspector.results.length; i++ ) { refWidget = new ve.ui.CiteFromIdReferenceWidget( inspector.getFragment().getSurface().getDocument(), + inspector.results[i].transclusionModel, { data: i, - transclusionModel: inspector.results[i].transclusionModel, templateName: inspector.results[i].templateName, citeTools: inspector.citeTools } ); diff --git a/modules/ve.ui.CiteFromIdReferenceWidget.js b/modules/ve.ui.CiteFromIdReferenceWidget.js index 683c02c..8ee56c8 100644 --- a/modules/ve.ui.CiteFromIdReferenceWidget.js +++ b/modules/ve.ui.CiteFromIdReferenceWidget.js @@ -6,19 +6,20 @@ * * @constructor * @param {ve.dm.Document} documentModel Document model + * @param {ve.dm.MWTransclusionModel} transclusionModel Transclusion model used for this template * @param {Object} config Configuration object * @cfg {string} [templateName] Template name - * @cfg {ve.dm.MWTransclusionModel} transclusionModel Transclusion model used for this template + * @cfg {Object[]} citeTools An array of available citation tool configuration */ -ve.ui.CiteFromIdReferenceWidget = function VeUiCiteFromIdReferenceWidget( documentModel, config ) { +ve.ui.CiteFromIdReferenceWidget = function VeUiCiteFromIdReferenceWidget( documentModel, transclusionModel, config ) { var i, len, icon, item, title, widget = this; config = config || {}; - this.allLinks = {}; + this.transclusionModel = transclusionModel; + this.templateName = config.templateName || 'Cite web'; - this.transclusionModel = config.transclusionModel; this.title = this.templateName; this.renderPromise = $.Deferred(); @@ -39,7 +40,7 @@ } } } - this.setIcon( icon ); + this.setIcon( icon || 'cite-web' ); // Add insert button this.insertButton = new OO.ui.ButtonWidget( { -- To view, visit https://gerrit.wikimedia.org/r/202956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83c8eee0bf25142843a381ab1d99a0871a24a0a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Citoid Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits