Load module 'mediawiki.diff.styles' on show changes

The loading of the diff styles get lost in 6627f2cd.

In MediaWiki 1.28 the name of the module was renamed from
'mediawiki.action.history.diff' to 'mediawiki.diff.styles'.

Bug: T142845
Change-Id: I86ed2a0568c6bc4e81819633a295cec2e8924215
This commit is contained in:
Fomafix 2016-09-06 17:51:13 +02:00 committed by Derk-Jan Hartman
parent 81d487b2ca
commit fe7e2a790c

View file

@ -118,11 +118,12 @@ $.wikiEditor.modules.preview = {
rvprop: '',
rvsection: section === '' ? undefined : section
};
var postPromise = api.post( postdata );
api.post( postdata )
.done( function ( data ) {
$.when( postPromise, mw.loader.using( 'mediawiki.diff.styles' ) )
.done( function ( postResult ) {
try {
var diff = data.query.pages[ 0 ]
var diff = postResult[ 0 ].query.pages[ 0 ]
.revisions[ 0 ].diff.body;
context.$changesTab.find( 'table.diff tbody' )