mainBar: require('modules/mainBar/mainBar'),\r
indicator: require('modules/indicator/indicator'),\r
\r
- sourceEditor: require('modules/sourceEditor'),\r
+ sourceEditor: require('modules/sourceEditor/sourceEditor'),\r
visualEditor: require('modules/visualEditor'),\r
\r
documentCanvas: require('modules/documentCanvas/documentCanvas'),\r
+++ /dev/null
-define(function() {\r
-\r
-return function(sandbox) {\r
-\r
- var view = $(sandbox.getTemplate('main')());\r
- var isDirty = false;\r
- \r
- var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]);\r
- editor.setTheme("ace/theme/chrome");\r
- editor.getSession().setMode("ace/mode/xml");\r
- $('textarea', view).on('keyup', function() {\r
- isDirty = true;\r
- });\r
- \r
- editor.getSession().on('change', function() {\r
- isDirty = true;\r
- })\r
- return {\r
- start: function() {\r
- sandbox.publish('ready');\r
- },\r
- getView: function() {\r
- return view;\r
- },\r
- setDocument: function(document) {\r
- editor.setValue(document);\r
- editor.gotoLine(0)\r
- isDirty = false;\r
- },\r
- getDocument: function() {\r
- return editor.getValue();\r
- },\r
- isDirty: function() {\r
- return isDirty;\r
- },\r
- setDirty: function(dirty) {\r
- isDirty = dirty;\r
- }\r
- \r
- }\r
-};\r
-\r
-});
\ No newline at end of file
--- /dev/null
+define(function() {\r
+\r
+return function(sandbox) {\r
+\r
+ var view = $(sandbox.getTemplate('main')());\r
+ var isDirty = false;\r
+ \r
+ var editor = ace.edit(view.find('#rng-sourceEditor-editor')[0]);\r
+ editor.setTheme("ace/theme/chrome");\r
+ editor.getSession().setMode("ace/mode/xml");\r
+ $('textarea', view).on('keyup', function() {\r
+ isDirty = true;\r
+ });\r
+ \r
+ editor.getSession().on('change', function() {\r
+ isDirty = true;\r
+ })\r
+ return {\r
+ start: function() {\r
+ sandbox.publish('ready');\r
+ },\r
+ getView: function() {\r
+ return view;\r
+ },\r
+ setDocument: function(document) {\r
+ editor.setValue(document);\r
+ editor.gotoLine(0)\r
+ isDirty = false;\r
+ },\r
+ getDocument: function() {\r
+ return editor.getValue();\r
+ },\r
+ isDirty: function() {\r
+ return isDirty;\r
+ },\r
+ setDirty: function(dirty) {\r
+ isDirty = dirty;\r
+ }\r
+ \r
+ }\r
+};\r
+\r
+});
\ No newline at end of file
--- /dev/null
+#rng-sourceEditor-editor {\r
+ width: 940px;\r
+ height: 500px;\r
+}
\ No newline at end of file
\r
@import '../modules/rng/rng.less';\r
@import '../modules/documentCanvas/documentCanvas.less';\r
+@import '../modules/sourceEditor/sourceEditor.less';\r
@import '../modules/mainBar/mainBar.less';\r
@import '../modules/documentToolbar/documentToolbar.less';\r
@import '../modules/indicator/indicator.less';\r