fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify
[fnpeditor.git]
/
src
/
editor
/
modules
/
rng
/
rng.js
diff --git
a/src/editor/modules/rng/rng.js
b/src/editor/modules/rng/rng.js
index
e4f5c3e
..
63bc2c2
100644
(file)
--- a/
src/editor/modules/rng/rng.js
+++ b/
src/editor/modules/rng/rng.js
@@
-167,14
+167,6
@@
return function(sandbox) {
views.visualEditing.setView('leftColumn', sandbox.getModule('documentCanvas').getView());
},
views.visualEditing.setView('leftColumn', sandbox.getModule('documentCanvas').getView());
},
- nodeHovered: function(canvasNode) {
- commands.highlightDocumentNode(canvasNode);
- },
-
- nodeBlured: function(canvasNode) {
- commands.dimDocumentNode(canvasNode);
- },
-
selectionChanged: function(selection) {
commands.refreshCanvasSelection(selection);
}
selectionChanged: function(selection) {
commands.refreshCanvasSelection(selection);
}
@@
-203,9
+195,11
@@
return function(sandbox) {
},
displayVersion: function(event) {
/* globals window */
},
displayVersion: function(event) {
/* globals window */
- var config = sandbox.getConfig();
+ var config = sandbox.getConfig(),
+ doc = sandbox.getModule('data').getDocument();
+
if(config.documentUrl) {
if(config.documentUrl) {
- window.open(config.documentUrl(
sandbox.getModule('data').getDocumentId()
, event.version), _.uniqueId());
+ window.open(config.documentUrl(
doc.properties.document_id
, event.version), _.uniqueId());
} else {
logger.error('Unable to show version ' + event.version + ' of a document - config.documentUrl missing');
}
} else {
logger.error('Unable to show version ' + event.version + ' of a document - config.documentUrl missing');
}
@@
-237,9
+231,9
@@
return function(sandbox) {
var txt = gettext('Do you really want to exit?');
if(documentIsDirty) {
txt += ' ' + gettext('Document contains unsaved changes!');
var txt = gettext('Do you really want to exit?');
if(documentIsDirty) {
txt += ' ' + gettext('Document contains unsaved changes!');
+ event.returnValue = txt; // FF
+ return txt; // Chrome
}
}
- event.returnValue = txt; // FF
- return txt; // Chrome
});
/* api */
});
/* api */