jenkins-bot has submitted this change and it was merged.

Change subject: LivePreview: Process jsconfigvars
......................................................................


LivePreview: Process jsconfigvars

Any jsconfigvars added by the new previewed content needs to added to
the context, so that it can be used by the modules.

Bug: T92944
Change-Id: Ib990f00ebe974008cea4dccbaa212ec20c846674
(cherry picked from commit 23f56a62ea76890325a2bfa85859372c884780a2)
---
M resources/src/mediawiki.action/mediawiki.action.edit.preview.js
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Manybubbles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js 
b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
index f24703a..5074d94 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.preview.js
@@ -121,12 +121,15 @@
                        $.extend( postData, {
                                pst: '',
                                preview: '',
-                               prop: 
'text|displaytitle|modules|categorieshtml|templates|langlinks|limitreporthtml',
+                               prop: 
'text|displaytitle|modules|jsconfigvars|categorieshtml|templates|langlinks|limitreporthtml',
                                disableeditsection: true
                        } );
                        request = api.post( postData );
                        request.done( function ( response ) {
                                var li, newList, $displaytitle, $content, 
$parent, $list;
+                               if ( response.parse.jsconfigvars ) {
+                                       mw.config.set( 
response.parse.jsconfigvars );
+                               }
                                if ( response.parse.modules ) {
                                        mw.loader.load( 
response.parse.modules.concat(
                                                response.parse.modulescripts,

-- 
To view, visit https://gerrit.wikimedia.org/r/210067
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib990f00ebe974008cea4dccbaa212ec20c846674
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf4
Gerrit-Owner: Yurik <yu...@wikimedia.org>
Gerrit-Reviewer: Edokter <er...@darcoury.nl>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: TheDJ <hartman.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to