diff options
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 9bbea4c9..56d9db02 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -41,14 +41,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
41 | //////////////////////////////////////////////////////////////////// | 41 | //////////////////////////////////////////////////////////////////// |
42 | // | 42 | // |
43 | exclusionList: { | 43 | exclusionList: { |
44 | value: ["HTML", "BODY"] //TODO: Update to correct list | 44 | value: ["HTML", "BODY", "NINJA-CONTENT"] //TODO: Update to correct list |
45 | }, | ||
46 | //////////////////////////////////////////////////////////////////// | ||
47 | // | ||
48 | uuid: { | ||
49 | get: function() { | ||
50 | return this._uuid; | ||
51 | } | ||
52 | }, | 45 | }, |
53 | //////////////////////////////////////////////////////////////////// | 46 | //////////////////////////////////////////////////////////////////// |
54 | // | 47 | // |
@@ -133,33 +126,37 @@ exports.HtmlDocument = Montage.create(Component, { | |||
133 | //////////////////////////////////////////////////////////////////// | 126 | //////////////////////////////////////////////////////////////////// |
134 | // | 127 | // |
135 | closeDocument: { | 128 | closeDocument: { |
136 | value: function () { | 129 | value: function (context, callback) { |
137 | // | 130 | var closed = this.model.close(null); |
138 | this.model.close(null, this.handleCloseDocument.bind(this)); | 131 | |
139 | } | 132 | callback.call(context, this); |
140 | }, | ||
141 | //////////////////////////////////////////////////////////////////// | ||
142 | // | ||
143 | handleCloseDocument: { | ||
144 | value: function (success) { | ||
145 | //TODO: Add logic for handling success or failure | ||
146 | // | ||
147 | this.application.ninja.documentController._documents.splice(this.uuid, 1); | ||
148 | // | ||
149 | NJevent("closeDocument", this.model.file.uri); | ||
150 | //TODO: Delete object here | ||
151 | } | 133 | } |
152 | }, | 134 | }, |
153 | //////////////////////////////////////////////////////////////////// | 135 | //////////////////////////////////////////////////////////////////// |
154 | // | 136 | // |
155 | saveAppState: { | 137 | serializeDocument: { |
156 | value: function () { | 138 | value: function () { |
157 | //TODO: Import functionality | 139 | // There are not needed for now ssince we cannot change them |
140 | //this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing; | ||
141 | //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; | ||
142 | |||
143 | // Serialize the current scroll position | ||
144 | // TODO: Implement | ||
145 | |||
146 | // Serialize the selection | ||
147 | this.model.selection = this.application.ninja.selectedElements.slice(0); | ||
148 | this.draw3DGrid = this.application.ninja.appModel.show3dGrid; | ||
149 | |||
150 | // Serialize the undo | ||
151 | // TODO: Save the montage undo queue | ||
152 | |||
153 | // Pause the videos | ||
154 | this.model.views.design.pauseVideos(); | ||
158 | } | 155 | } |
159 | }, | 156 | }, |
160 | //////////////////////////////////////////////////////////////////// | 157 | //////////////////////////////////////////////////////////////////// |
161 | // | 158 | // |
162 | restoreAppState: { | 159 | deserializeDocument: { |
163 | value: function () { | 160 | value: function () { |
164 | //TODO: Import functionality | 161 | //TODO: Import functionality |
165 | } | 162 | } |