From 46359b91eb01a6d5c43cedf477751e1ca6fea3e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 21 Nov 2013 14:22:55 +0100 Subject: [PATCH] integration wip: saving document --- src/editor/modules/data/data.js | 3 +-- src/editor/modules/rng/rng.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) 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(); } }; -- 2.20.1