aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-19 01:03:59 -0700
committerArmen Kesablyan2012-06-19 01:03:59 -0700
commit2e13a73e4ee980a6f73f6ff48b2a195eb209a7db (patch)
treed352f5e769eae0e1b7b76ccbeafa9b174b1a9918 /js/document/document-html.js
parent244e608645778746d1a3b5aa0d4c0868f7c5c272 (diff)
parentc59eb371559a3061ce53223e249ca97daace5968 (diff)
downloadninja-2e13a73e4ee980a6f73f6ff48b2a195eb209a7db.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: js/components/layout/tools-list.reel/tools-list.html js/components/layout/tools-properties.reel/tools-properties.html js/document/document-html.js js/document/templates/app/main.js js/panels/Panel.reel/Panel.js node_modules/montage/ui/native-control.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 8b82c40f..56f4e3d3 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -36,7 +36,7 @@ exports.HtmlDocument = Montage.create(Component, {
36 //////////////////////////////////////////////////////////////////// 36 ////////////////////////////////////////////////////////////////////
37 // 37 //
38 exclusionList: { 38 exclusionList: {
39 value: ["HTML", "BODY", "NINJA-CONTENT"] 39 value: ["HTML", "BODY", "NINJA-CONTENT", "NINJA-VIEWPORT"]
40 }, 40 },
41 //////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////
42 // 42 //
@@ -108,6 +108,12 @@ exports.HtmlDocument = Montage.create(Component, {
108 handleViewReady: { 108 handleViewReady: {
109 value: function(mObjects) { 109 value: function(mObjects) {
110 this.model.mObjects = mObjects; 110 this.model.mObjects = mObjects;
111 // TODO: Find a better way to initialize this property
112 // Assign the domContainer to be the document root on open
113 if(typeof this.model.domContainer !== "undefined") {
114 this.model.domContainer = this.model.documentRoot;
115 }
116
111 //Making callback after view is loaded 117 //Making callback after view is loaded
112 this.loaded.callback.call(this.loaded.context, this); 118 this.loaded.callback.call(this.loaded.context, this);
113 } 119 }
@@ -116,10 +122,8 @@ exports.HtmlDocument = Montage.create(Component, {
116 // 122 //
117 closeDocument: { 123 closeDocument: {
118 value: function (context, callback) { 124 value: function (context, callback) {
119 //Closing document and getting outcome 125 //Closing document (sending null to close all views)
120 var closed = this.model.close(null); 126 this.model.close(null, function () {if (callback) callback.call(context, this);}.bind(this));
121 //Making callback if specified
122 if (callback) callback.call(context, this);
123 } 127 }
124 }, 128 },
125 //////////////////////////////////////////////////////////////////// 129 ////////////////////////////////////////////////////////////////////