From ac7ed91731ac1246077b16978d5e7fc5ce1c6f8d Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Sat, 23 Jun 2018 19:29:33 +0100 Subject: [PATCH] Show images/descriptions on import's title widget if possible Change-Id: Ibeb32ae3fafcabb3c5585b363496e0accab82460 --- modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js b/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js index f5574ed4b4..b435a1df6f 100644 --- a/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js +++ b/modules/ve-mw-collab/ve.init.mw.CollabTarget.init.js @@ -15,11 +15,15 @@ .concat( conf.pluginModules.filter( mw.loader.getState ) ), loadingPromise = mw.loader.using( modules ), progressBar = OO.ui.infuse( $( '.ve-init-mw-collabTarget-loading' ) ), - form = OO.ui.infuse( $( '.ve-init-mw-collabTarget-form' ) ), documentNameInput = OO.ui.infuse( $( '.ve-init-mw-collabTarget-nameInput' ) ), documentNameButton = OO.ui.infuse( $( '.ve-init-mw-collabTarget-nameButton' ) ), - importInput = OO.ui.infuse( $( '.ve-init-mw-collabTarget-importInput' ) ), - importButton = OO.ui.infuse( $( '.ve-init-mw-collabTarget-importButton' ) ); + importInput = OO.ui.infuse( $( '.ve-init-mw-collabTarget-importInput' ), { + showImages: mw.config.get( 'wgVisualEditor' ).usePageImages, + showDescriptions: mw.config.get( 'wgVisualEditor' ).usePageDescriptions + } ), + importButton = OO.ui.infuse( $( '.ve-init-mw-collabTarget-importButton' ) ), + // Infuse the form last to avoid recursive infusion with no config + form = OO.ui.infuse( $( '.ve-init-mw-collabTarget-form' ) ); if ( !VisualEditorSupportCheck() ) { // VE not supported - say something?