editor: dropping a working draft
[fnpeditor.git] / src / editor / modules / data / data.js
index 7488390..ef1c87d 100644 (file)
@@ -238,6 +238,12 @@ return function(sandbox) {
             });
             dialog.show();
         },
+        dropDraft: function() {
+            logger.debug('Dropping a draft...');
+            wlxmlDocument.loadXML(sandbox.getBootstrappedData().document);
+            draftDirty = false;
+            logger.debug('Draft dropped');
+        },
         getDocumentId: function() {
             return document_id;
         },