fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fnpjs: datetime
[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
84f0af8
..
ef1c87d
100644
(file)
--- a/
src/editor/modules/data/data.js
+++ b/
src/editor/modules/data/data.js
@@
-41,11
+41,14
@@
return function(sandbox) {
});
var modificationFlag = true;
});
var modificationFlag = true;
-
wlxmlDocument.on('change',
function() {
+
var handleChange =
function() {
documentDirty = true;
draftDirty = true;
modificationFlag = true;
documentDirty = true;
draftDirty = true;
modificationFlag = true;
- });
+ };
+ wlxmlDocument.on('change', handleChange);
+ wlxmlDocument.on('contentSet', handleChange);
+
if(window.localStorage) {
window.setInterval(function() {
if(modificationFlag) {
if(window.localStorage) {
window.setInterval(function() {
if(modificationFlag) {
@@
-235,6
+238,12
@@
return function(sandbox) {
});
dialog.show();
},
});
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;
},
getDocumentId: function() {
return document_id;
},