fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
documentCanvas - removing yellow "glow" around contenteditable element in Chrome
[fnpeditor.git]
/
modules
/
data.js
diff --git
a/modules/data.js
b/modules/data.js
index
7a59cfb
..
0fab1a7
100644
(file)
--- a/
modules/data.js
+++ b/
modules/data.js
@@
-1,12
+1,13
@@
-rng.modules.data = function(sandbox) {
\r
+define(function() {
\r
+
\r
+return function(sandbox) {
\r
\r
var doc = sandbox.getBootstrappedData().document;
\r
var document_id = sandbox.getBootstrappedData().document_id;
\r
\r
\r
if(doc === '') {
\r
\r
var doc = sandbox.getBootstrappedData().document;
\r
var document_id = sandbox.getBootstrappedData().document_id;
\r
\r
\r
if(doc === '') {
\r
- doc = '<document>\n\
\r
- <section\n\
\r
+ doc = '<section\n\
\r
xmlns="http://nowoczesnapolska.org.pl/sst#"\n\
\r
xmlns:xlink="http://www.w3.org/1999/xlink"\n\
\r
xmlns:dc="http://purl.org/dc/elements/1.1/"\n\
\r
xmlns="http://nowoczesnapolska.org.pl/sst#"\n\
\r
xmlns:xlink="http://www.w3.org/1999/xlink"\n\
\r
xmlns:dc="http://purl.org/dc/elements/1.1/"\n\
\r
@@
-15,8
+16,7
@@
rng.modules.data = function(sandbox) {
<metadata>\n\
\r
</metadata>\n\
\r
<div class="p"></div>\n\
\r
<metadata>\n\
\r
</metadata>\n\
\r
<div class="p"></div>\n\
\r
- </section>\n\
\r
-</document>';
\r
+ </section>';
\r
}
\r
\r
\r
}
\r
\r
\r
@@
-60,8
+60,15
@@
rng.modules.data = function(sandbox) {
success: function() {sandbox.publish('savingEnded', 'success');},
\r
error: function() {sandbox.publish('savingEnded', 'error');}
\r
});
\r
success: function() {sandbox.publish('savingEnded', 'success');},
\r
error: function() {sandbox.publish('savingEnded', 'error');}
\r
});
\r
+ },
\r
+ fakeSave: function() {
\r
+ sandbox.publish('savingStarted');
\r
+ window.setTimeout(function() {
\r
+ sandbox.publish('savingEnded', 'success')
\r
+ }, 2000);
\r
}
\r
\r
}
\r
}
\r
\r
}
\r
+};
\r
\r
\r
-};
\ No newline at end of file
+}
)
;
\ No newline at end of file