diff options
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 9b412576..f397ace7 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -9,8 +9,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
9 | var Montage = require("montage/core/core").Montage, | 9 | var Montage = require("montage/core/core").Montage, |
10 | Component = require("montage/ui/component").Component, | 10 | Component = require("montage/ui/component").Component, |
11 | Uuid = require("montage/core/uuid").Uuid, | 11 | Uuid = require("montage/core/uuid").Uuid, |
12 | HTMLDocument = require("js/document/models/html-document").HTMLDocument, | 12 | HTMLDocument = require("js/document/html-document").HTMLDocument, |
13 | TextDocument = require("js/document/models/text-document").TextDocument, | 13 | TextDocument = require("js/document/text-document").TextDocument, |
14 | DocumentController; | 14 | DocumentController; |
15 | //////////////////////////////////////////////////////////////////////// | 15 | //////////////////////////////////////////////////////////////////////// |
16 | // | 16 | // |
@@ -28,13 +28,7 @@ DocumentController = exports.DocumentController = Montage.create(Component, { | |||
28 | _iframeHolder: { value: null, enumerable: false }, | 28 | _iframeHolder: { value: null, enumerable: false }, |
29 | _textHolder: { value: null, enumerable: false }, | 29 | _textHolder: { value: null, enumerable: false }, |
30 | _codeMirrorCounter: {value: 1, enumerable: false}, | 30 | _codeMirrorCounter: {value: 1, enumerable: false}, |
31 | 31 | ||
32 | tmpSourceForTesting: { | ||
33 | value: "function CodeMirror(place, givenOptions) {" + | ||
34 | "// Determine effective options based on given values and defaults." + | ||
35 | "var options = {}, defaults = CodeMirror.defaults; }" | ||
36 | }, | ||
37 | |||
38 | activeDocument: { | 32 | activeDocument: { |
39 | get: function() { | 33 | get: function() { |
40 | return this._activeDocument; | 34 | return this._activeDocument; |
@@ -62,21 +56,12 @@ DocumentController = exports.DocumentController = Montage.create(Component, { | |||
62 | this.eventManager.addEventListener("executeSave", this, false); | 56 | this.eventManager.addEventListener("executeSave", this, false); |
63 | 57 | ||
64 | this.eventManager.addEventListener("recordStyleChanged", this, false); | 58 | this.eventManager.addEventListener("recordStyleChanged", this, false); |
65 | |||
66 | // Temporary testing opening a new file after Ninja has loaded | ||
67 | this.eventManager.addEventListener("executeNewProject", this, false); | ||
68 | } | 59 | } |
69 | }, | 60 | }, |
70 | 61 | ||
71 | handleAppLoaded: { | 62 | handleAppLoaded: { |
72 | value: function() { | 63 | value: function() { |
73 | //this.openDocument({"type": "html"}); | 64 | // |
74 | } | ||
75 | }, | ||
76 | |||
77 | handleExecuteNewProject: { | ||
78 | value: function() { | ||
79 | this.openDocument({"type": "html"}); | ||
80 | } | 65 | } |
81 | }, | 66 | }, |
82 | 67 | ||