From: Aleksander Ɓukasz Date: Thu, 21 Nov 2013 13:22:55 +0000 (+0100) Subject: integration wip: saving document X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/46359b91eb01a6d5c43cedf477751e1ca6fea3e4?ds=sidebyside integration wip: saving document --- diff --git a/src/editor/modules/data/data.js b/src/editor/modules/data/data.js index 5e45b26..c9ecf7d 100644 --- a/src/editor/modules/data/data.js +++ b/src/editor/modules/data/data.js @@ -66,7 +66,7 @@ return function(sandbox) { $.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'); @@ -104,7 +104,6 @@ return function(sandbox) { 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); diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index 52aaa51..d4fa434 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -130,7 +130,6 @@ return function(sandbox) { views.mainLayout.setView('topPanel', sandbox.getModule('mainBar').getView()); }, 'cmd.save': function() { - synchronizeTab(views.mainTabs.getCurrentSlug()); sandbox.getModule('data').saveDocument(); } };