Merge "Show signatures in NWE visual diff"

This commit is contained in:
jenkins-bot 2018-08-17 13:29:41 +00:00 committed by Gerrit Code Review
commit e6d89cd1ec

View file

@ -1208,15 +1208,16 @@ ve.init.mw.ArticleTarget.prototype.getVisualDiffGeneratorPromise = function () {
} }
if ( target.getSurface().getMode() === 'source' ) { if ( target.getSurface().getMode() === 'source' ) {
newRevPromise = mw.libs.ve.targetLoader.requestParsoidData( newRevPromise = target.getContentApi().post( {
mw.config.get( 'wgRelevantPageName' ), action: 'visualeditor',
{ paction: 'parsedoc',
oldId: target.revid, page: target.getPageName(),
targetName: 'diff', wikitext: ve.init.target.getSurface().getDom(),
modified: true, pst: true
wikitext: ve.init.target.getSurface().getDom() } ).then( function ( response ) {
} // Use anonymous function to avoid passing through API promise argument
).then( mw.libs.ve.diffLoader.getModelFromResponse ); return mw.libs.ve.diffLoader.getModelFromResponse( response );
} );
return mw.libs.ve.diffLoader.getVisualDiffGeneratorPromise( target.originalDmDocPromise, newRevPromise ); return mw.libs.ve.diffLoader.getVisualDiffGeneratorPromise( target.originalDmDocPromise, newRevPromise );
} else { } else {