aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-15 22:36:44 -0700
committerValerio Virgillito2012-05-15 22:36:44 -0700
commit919a0d0ed35c24b1047281723ddde2ac98fc9a3e (patch)
treea35ef0d07bf16a461543f4481a04f005ceacc160 /js/document/document-html.js
parent94855a2c1074f67f158b94ca0d61c51ee46c51b5 (diff)
downloadninja-919a0d0ed35c24b1047281723ddde2ac98fc9a3e.tar.gz
document close handler. initial working draft
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js26
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 ////////////////////////////////////////////////////////////////////