diff options
author | Valerio Virgillito | 2012-05-15 23:34:52 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-15 23:34:52 -0700 |
commit | 2b21e91a3343229bb87179e08be1e532fcf9b8f9 (patch) | |
tree | 5ae1e660d0e307fda84c3be6a66c243904d75225 /js/document/document-html.js | |
parent | 012a6e8fa8bfb56e1a50f3b2fc6058f3651701a2 (diff) | |
parent | 9db5c446337e266fd604eac79ec39c840ffebbbe (diff) | |
download | ninja-2b21e91a3343229bb87179e08be1e532fcf9b8f9.tar.gz |
Merge pull request #237 from mencio/dom-architecture
Dom architecture - Fixed closing and opening a document
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 9bbea4c9..87c776d5 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -43,13 +43,6 @@ exports.HtmlDocument = Montage.create(Component, { | |||
43 | exclusionList: { | 43 | exclusionList: { |
44 | value: ["HTML", "BODY"] //TODO: Update to correct list | 44 | value: ["HTML", "BODY"] //TODO: Update to correct list |
45 | }, | 45 | }, |
46 | //////////////////////////////////////////////////////////////////// | ||
47 | // | ||
48 | uuid: { | ||
49 | get: function() { | ||
50 | return this._uuid; | ||
51 | } | ||
52 | }, | ||
53 | //////////////////////////////////////////////////////////////////// | 46 | //////////////////////////////////////////////////////////////////// |
54 | // | 47 | // |
55 | inExclusion: { | 48 | inExclusion: { |
@@ -133,21 +126,10 @@ 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 | //////////////////////////////////////////////////////////////////// |