fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smartxml: testing three available levels of transformation undo-awareness
[fnpeditor.git]
/
src
/
editor
/
modules
/
data
/
data.js
diff --git
a/src/editor/modules/data/data.js
b/src/editor/modules/data/data.js
index
a8144cb
..
f3494a0
100644
(file)
--- a/
src/editor/modules/data/data.js
+++ b/
src/editor/modules/data/data.js
@@
-1,9
+1,10
@@
define([
'libs/jquery',
'./saveDialog',
define([
'libs/jquery',
'./saveDialog',
- 'wlxml/wlxml'
+ 'wlxml/wlxml',
+ 'wlxml/extensions/list/list'
-], function($, saveDialog, wlxml) {
+], function($, saveDialog, wlxml
, listExtension
) {
'use strict';
'use strict';
@@
-15,6
+16,8
@@
return function(sandbox) {
var history = sandbox.getBootstrappedData().history;
var wlxmlDocument = wlxml.WLXMLDocumentFromXML(sandbox.getBootstrappedData().document);
var history = sandbox.getBootstrappedData().history;
var wlxmlDocument = wlxml.WLXMLDocumentFromXML(sandbox.getBootstrappedData().document);
+
+ wlxmlDocument.registerExtension(listExtension);
function readCookie(name) {
function readCookie(name) {
@@
-106,8
+109,9
@@
return function(sandbox) {
url: '/' + gettext('editor') + '/' + document_id + '/revert',
data: JSON.stringify(options),
success: function(data) {
url: '/' + gettext('editor') + '/' + document_id + '/revert',
data: JSON.stringify(options),
success: function(data) {
- document_version = data.version;
+ document_version = data.
current_
version;
reloadHistory();
reloadHistory();
+ wlxmlDocument.loadXML(data.document);
sandbox.publish('documentReverted', data);
},
});
sandbox.publish('documentReverted', data);
},
});