aboutsummaryrefslogtreecommitdiff
path: root/js/document/templates
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/templates')
-rwxr-xr-xjs/document/templates/html/index.html5
-rw-r--r--js/document/templates/html/main.js14
-rwxr-xr-xjs/document/templates/html/package.json1
3 files changed, 15 insertions, 5 deletions
diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html
index a1b8b242..24159841 100755
--- a/js/document/templates/html/index.html
+++ b/js/document/templates/html/index.html
@@ -12,6 +12,9 @@
12 must set the 'data-ninja-template' 12 must set the 'data-ninja-template'
13 data-ninja-template="true" 13 data-ninja-template="true"
14--> 14-->
15
16<!-- TODO: Determine if loading Montage is always needed or if it could be done author-time or on file open -->
17
15<html> 18<html>
16 19
17 <head> 20 <head>
@@ -58,8 +61,6 @@
58 return document.elementFromPoint(x,y); 61 return document.elementFromPoint(x,y);
59 } 62 }
60 </script> 63 </script>
61
62 <!-- TODO: Determine if loading Montage is always needed or if it could be done author-time or on file open -->
63 64
64 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> 65 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script>
65 66
diff --git a/js/document/templates/html/main.js b/js/document/templates/html/main.js
index d5ac88d5..f45657bb 100644
--- a/js/document/templates/html/main.js
+++ b/js/document/templates/html/main.js
@@ -3,8 +3,10 @@
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> 3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
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
@@ -18,6 +20,7 @@ exports.Main = Montage.create(Component, {
18 templateDidLoad: { 20 templateDidLoad: {
19 value: function(){ 21 value: function(){
20 var self = this; 22 var self = this;
23 //
21 window.addComponent = function(element, data, callback) { 24 window.addComponent = function(element, data, callback) {
22 var component; 25 var component;
23 26
@@ -36,7 +39,12 @@ exports.Main = Montage.create(Component, {
36 .end(); 39 .end();
37 40
38 }; 41 };
39 42 //
43 window.mjsTemplateCreator = TemplateCreator.create();
44 //
45 window.mjsTemplate = Template.create();
46
47
40 // Dispatch event when this template has loaded. 48 // Dispatch event when this template has loaded.
41 /* 49 /*
42 var newEvent = document.createEvent( "CustomEvent" ); 50 var newEvent = document.createEvent( "CustomEvent" );
diff --git a/js/document/templates/html/package.json b/js/document/templates/html/package.json
index d1e839dc..4f36090a 100755
--- a/js/document/templates/html/package.json
+++ b/js/document/templates/html/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