aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-05-17 14:01:38 -0700
committerArmen Kesablyan2012-05-17 14:01:38 -0700
commit6c8f3525b839e82cf43df43700a0160ee2c5458f (patch)
tree3fb801fa54b759c5568d75bb467e02652ce77c3e /js/document/document-html.js
parente8ae5db7ce7023b638375cbc27a3f7b7a2f77b23 (diff)
parent342c97ac9b727b22a7b0bfefca4d2a168bc3055b (diff)
downloadninja-6c8f3525b839e82cf43df43700a0160ee2c5458f.tar.gz
Merge branch 'refs/heads/dom-architecture' into binding
Conflicts: css/ninja.css scss/imports/scss/_toolbar.scss Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js49
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 }