aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
authorEric Guzman2012-06-19 01:20:36 -0700
committerEric Guzman2012-06-19 01:20:36 -0700
commit2ef72cdf0e59fb3623a2c13251ac707522f3dc5a (patch)
treef69f4e3de7e4441311ef2b38770e0ce26067aac4 /js/document/document-html.js
parent5260d3dfd99d79924c4aaa3ab798e90c7d328d7d (diff)
parent1007cbf983ad0f2460a4122a492a96023fdb4439 (diff)
downloadninja-2ef72cdf0e59fb3623a2c13251ac707522f3dc5a.tar.gz
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Conflicts: js/stage/binding-view.reel/binding-view.js
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 ////////////////////////////////////////////////////////////////////