$.ajax({
method: 'post',
url: '/' + gettext('editor') + '/' + document_id,
- data: JSON.stringify({document:doc, description: event.data.description}),
+ data: JSON.stringify({document:wlxmlDocument.toXML(), description: event.data.description}),
success: function() {
event.success();
sandbox.publish('savingEnded', 'success');
url: '/' + gettext('editor') + '/' + document_id + '/revert',
data: JSON.stringify(options),
success: function(data) {
- doc = data.document;
document_version = data.version;
reloadHistory();
sandbox.publish('documentReverted', data);
views.mainLayout.setView('topPanel', sandbox.getModule('mainBar').getView());
},
'cmd.save': function() {
- synchronizeTab(views.mainTabs.getCurrentSlug());
sandbox.getModule('data').saveDocument();
}
};