aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-17 12:23:50 -0700
committerValerio Virgillito2012-05-17 12:23:50 -0700
commitbac01dd8771d91dc227c970b3d29e72d8f079692 (patch)
treebe1754105c0f8be55e1d285e7a5b280d7cdcce4c /js/document
parentb97570f5daff9d0c40f274c2c29a457079da1c1a (diff)
parentaeb499a634bb5c9e4dd3f705f44a87c3817aa769 (diff)
downloadninja-bac01dd8771d91dc227c970b3d29e72d8f079692.tar.gz
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into dom-architecture
Diffstat (limited to 'js/document')
-rw-r--r--js/document/templates/banner/main.js8
-rwxr-xr-xjs/document/templates/banner/package.json1
-rwxr-xr-xjs/document/views/design.js4
3 files changed, 12 insertions, 1 deletions
diff --git a/js/document/templates/banner/main.js b/js/document/templates/banner/main.js
index d5ac88d5..2acbe8f3 100644
--- a/js/document/templates/banner/main.js
+++ b/js/document/templates/banner/main.js
@@ -4,7 +4,9 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6var Montage = require("montage/core/core").Montage, 6var Montage = require("montage/core/core").Montage,
7 Component = require("montage/ui/component").Component; 7 Component = require("montage/ui/component").Component,
8 Template = require("montage/ui/template").Template,
9 TemplateCreator = require("tools/template/template-creator").TemplateCreator;
8 10
9exports.Main = Montage.create(Component, { 11exports.Main = Montage.create(Component, {
10 12
@@ -37,6 +39,10 @@ exports.Main = Montage.create(Component, {
37 39
38 }; 40 };
39 41
42 window.mjsTemplateCreator = TemplateCreator;
43 //
44 window.mjsTemplate = Template;
45
40 // Dispatch event when this template has loaded. 46 // Dispatch event when this template has loaded.
41 /* 47 /*
42 var newEvent = document.createEvent( "CustomEvent" ); 48 var newEvent = document.createEvent( "CustomEvent" );
diff --git a/js/document/templates/banner/package.json b/js/document/templates/banner/package.json
index d1e839dc..4f36090a 100755
--- a/js/document/templates/banner/package.json
+++ b/js/document/templates/banner/package.json
@@ -4,6 +4,7 @@
4 }, 4 },
5 "mappings": { 5 "mappings": {
6 "montage": "../../../../node_modules/montage/", 6 "montage": "../../../../node_modules/montage/",
7 "tools": "../../../../node_modules/tools/",
7 "montage-google": "../../../../node_modules/montage-google/" 8 "montage-google": "../../../../node_modules/montage-google/"
8 } 9 }
9} \ No newline at end of file 10} \ No newline at end of file
diff --git a/js/document/views/design.js b/js/document/views/design.js
index 3b2eb11f..2ccb82d1 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -184,6 +184,10 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
184 this._bodyFragment = null; 184 this._bodyFragment = null;
185 //Calling standard method to finish opening document 185 //Calling standard method to finish opening document
186 this.bodyContentLoaded(null); 186 this.bodyContentLoaded(null);
187
188 // TODO: Clean up this code
189 this.application.ninja.stage.documentOffsetLeft = parseInt((this.document.body.scrollWidth - this._template.size.width)/2);
190 this.application.ninja.stage.documentOffsetTop = parseInt((this.document.body.scrollHeight - this._template.size.height)/2);
187 } 191 }
188 }, 192 },
189 //////////////////////////////////////////////////////////////////// 193 ////////////////////////////////////////////////////////////////////