mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-22 02:53:04 +00:00
Merge "Show image autocomplete for "File" parameters"
This commit is contained in:
commit
4afad48527
|
@ -249,7 +249,6 @@ ve.ui.MWParameterPage.prototype.createValueInput = function () {
|
||||||
delete valueInputConfig.validate;
|
delete valueInputConfig.validate;
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// * wiki-file-name
|
|
||||||
// * date - T100206
|
// * date - T100206
|
||||||
// * number - T124850
|
// * number - T124850
|
||||||
// * unbalanced-wikitext/content - T106242
|
// * unbalanced-wikitext/content - T106242
|
||||||
|
@ -259,6 +258,15 @@ ve.ui.MWParameterPage.prototype.createValueInput = function () {
|
||||||
( value === '' || mw.Title.newFromText( value ) )
|
( value === '' || mw.Title.newFromText( value ) )
|
||||||
) {
|
) {
|
||||||
return new mw.widgets.TitleInputWidget( valueInputConfig, { api: ve.init.target.getContentApi() } );
|
return new mw.widgets.TitleInputWidget( valueInputConfig, { api: ve.init.target.getContentApi() } );
|
||||||
|
} else if (
|
||||||
|
type === 'wiki-file-name' &&
|
||||||
|
( value === '' || mw.Title.newFromText( value ) )
|
||||||
|
) {
|
||||||
|
return new mw.widgets.TitleInputWidget( $.extend( {}, valueInputConfig, {
|
||||||
|
api: ve.init.target.getContentApi(),
|
||||||
|
namespace: 6,
|
||||||
|
showImages: true
|
||||||
|
} ) );
|
||||||
} else if (
|
} else if (
|
||||||
type === 'wiki-user-name' &&
|
type === 'wiki-user-name' &&
|
||||||
( value === '' || mw.Title.newFromText( value ) )
|
( value === '' || mw.Title.newFromText( value ) )
|
||||||
|
|
Loading…
Reference in a new issue