mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-24 02:48:18 +00:00
Also update 'jsconfigvars' when previewing
This fixes a warning in the API: 'Property "modules" was set but not "jsconfigvars" or "encodedjsconfigvars". Configuration variables are necessary for proper module usage.' We were already updating them when saving. Change-Id: I3e16e3fd4b43a438c27645cca90517b6b4be7db7
This commit is contained in:
parent
15e511f820
commit
9d2cb7bdd0
|
@ -205,7 +205,7 @@ ReplyWidget.prototype.onInputChange = function () {
|
|||
action: 'parse',
|
||||
text: wikitext,
|
||||
pst: true,
|
||||
prop: [ 'text', 'modules' ],
|
||||
prop: [ 'text', 'modules', 'jsconfigvars' ],
|
||||
title: mw.config.get( 'wgPageName' )
|
||||
} );
|
||||
}
|
||||
|
@ -215,6 +215,7 @@ ReplyWidget.prototype.onInputChange = function () {
|
|||
widget.$preview.html( response ? response.parse.text : '' );
|
||||
|
||||
if ( response ) {
|
||||
mw.config.set( response.parse.jsconfigvars );
|
||||
mw.loader.load( response.parse.modulestyles );
|
||||
mw.loader.load( response.parse.modules );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue