fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wip: Experimenting with new approach - dividing visualEditor module
[fnpeditor.git]
/
modules
/
visualEditor.js
diff --git
a/modules/visualEditor.js
b/modules/visualEditor.js
index
d5ff4b5
..
65de452
100644
(file)
--- a/
modules/visualEditor.js
+++ b/
modules/visualEditor.js
@@
-1,5
+1,6
@@
-rng.modules.visualEditor = function(sandbox) {
\r
- var transformations = rng.modules.visualEditor.transformations;
\r
+define(['./visualEditor.transformations'], function(transformations) {
\r
+
\r
+return function(sandbox) {
\r
\r
var view = {
\r
node: $(sandbox.getTemplate('main')()),
\r
\r
var view = {
\r
node: $(sandbox.getTemplate('main')()),
\r
@@
-277,6
+278,7
@@
rng.modules.visualEditor = function(sandbox) {
var view = this;
\r
this.node.find('#rng-visualEditor-sidebarButtons a').click(function(e) {
\r
e.preventDefault();
\r
var view = this;
\r
this.node.find('#rng-visualEditor-sidebarButtons a').click(function(e) {
\r
e.preventDefault();
\r
+ e.stopPropagation();
\r
var target = $(e.currentTarget);
\r
if(!target.attr('data-content-id'))
\r
return;
\r
var target = $(e.currentTarget);
\r
if(!target.attr('data-content-id'))
\r
return;
\r
@@
-493,4
+495,6
@@
rng.modules.visualEditor = function(sandbox) {
}
\r
\r
}
\r
}
\r
\r
}
\r
-};
\ No newline at end of file
+};
\r
+
\r
+});
\ No newline at end of file