Partly fix the "Report problem" button

This was broken ever since the introduction of IndexValueStore, because
the call to getDataFromDom() wasn't updated, so it crashed with a "doc
is undefined" error. Fixing part of this by passing in a new IVStore.

The data that is transmitted over the wire still has indices with no way
to find out what the corresponding annotations are. It needs to be fully
expanded but there's no way to do this in DM quite yet.

Bug: 47319
Change-Id: I761523d22e51ac560e37ae991d01a6b84224ca40
This commit is contained in:
Catrope 2013-04-17 09:34:36 -07:00 committed by Jforrester
parent 116321afe5
commit 6c1e4cfdd2

View file

@ -586,7 +586,10 @@ ve.init.mw.Target.prototype.reportProblem = function ( message ) {
'originalHtml': this.originalHtml,
'originalData':
// originalHTML only has the body's HTML for now, see TODO comment in ve.init.mw.ViewPageTarget.prototype.setUpSurface
ve.dm.converter.getDataFromDom( ve.createDocumentFromHTML( '<body>' + this.originalHtml + '</body>') ),
// FIXME: need to expand this data before sending it, see bug 47319
ve.dm.converter.getDataFromDom( store,
ve.createDocumentFromHTML( '<body>' + this.originalHtml + '</body>' )
),
'editedData': editedData,
'editedHtml': ve.dm.converter.getDomFromData( store, editedData ).body.innerHTML,
'wiki': mw.config.get( 'wgDBname' )