fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: improving onAfterActionExecuted canvas handler - handle actions returning...
[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
42e46f8
..
8b8851a
100644
(file)
--- a/
src/editor/modules/data/data.js
+++ b/
src/editor/modules/data/data.js
@@
-1,11
+1,12
@@
define([
'libs/jquery',
define([
'libs/jquery',
- '
.
/dialog',
+ '
views/dialog
/dialog',
'wlxml/wlxml',
'wlxml/extensions/list/list',
'fnpjs/logging/logging',
'wlxml/wlxml',
'wlxml/extensions/list/list',
'fnpjs/logging/logging',
- 'fnpjs/datetime'
-], function($, Dialog, wlxml, listExtension, logging, datetime) {
+ 'fnpjs/datetime',
+ './document'
+], function($, Dialog, wlxml, listExtension, logging, datetime, Document) {
'use strict';
/* global gettext, alert, window */
'use strict';
/* global gettext, alert, window */
@@
-36,11
+37,11
@@
return function(sandbox) {
var loadDocument = function(text, isDraft, draftTimestamp) {
logger.debug('loading document');
try {
var loadDocument = function(text, isDraft, draftTimestamp) {
logger.debug('loading document');
try {
- wlxmlDocument = wlxml.WLXMLDocumentFromXML(text);
+ wlxmlDocument = wlxml.WLXMLDocumentFromXML(text
, {editorConfig: sandbox.getConfig()}, Document
);
} catch(e) {
logger.exception(e);
alert(gettext('This document contains errors and can\'t be loaded. :(')); // TODO
} catch(e) {
logger.exception(e);
alert(gettext('This document contains errors and can\'t be loaded. :(')); // TODO
- wlxmlDocument = wlxml.WLXMLDocumentFromXML(stubDocument);
+ wlxmlDocument = wlxml.WLXMLDocumentFromXML(stubDocument
, {}, Document
);
}
wlxmlDocument.registerExtension(listExtension);
}
wlxmlDocument.registerExtension(listExtension);
@@
-175,7
+176,8
@@
return function(sandbox) {
dialog = Dialog.create({
fields: documentSaveForm.fields,
title: gettext('Save Document'),
dialog = Dialog.create({
fields: documentSaveForm.fields,
title: gettext('Save Document'),
- executeButtonText: gettext('Save')
+ executeButtonText: gettext('Save'),
+ cancelButtonText: gettext('Cancel')
});
dialog.on('execute', function(event) {
});
dialog.on('execute', function(event) {
@@
-239,7
+241,8
@@
return function(sandbox) {
dialog = Dialog.create({
fields: documentRestoreForm.fields,
title: gettext('Restore Version'),
dialog = Dialog.create({
fields: documentRestoreForm.fields,
title: gettext('Restore Version'),
- executeButtonText: gettext('Restore')
+ executeButtonText: gettext('Restore'),
+ cancelButtonText: gettext('Cancel')
});
dialog.on('execute', function(event) {
});
dialog.on('execute', function(event) {