aboutsummaryrefslogtreecommitdiff
path: root/js/document/templates/html
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-17 23:08:11 -0700
committerValerio Virgillito2012-05-17 23:08:11 -0700
commit4643e6e26925884ff48e0d5b9337d644652cf3a1 (patch)
tree5bbdae7fcc4dfdc77f7730364eafaee896a11ca4 /js/document/templates/html
parentb72c5f72ea5df4aa164350e1ba66fd1b4e23369d (diff)
parent52394cdd71bd62c8c109fd135fa146b7183fbd1f (diff)
downloadninja-4643e6e26925884ff48e0d5b9337d644652cf3a1.tar.gz
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into dom-architecture
Diffstat (limited to 'js/document/templates/html')
-rwxr-xr-xjs/document/templates/html/index.html2
-rw-r--r--js/document/templates/html/main.js57
-rwxr-xr-xjs/document/templates/html/package.json10
3 files changed, 1 insertions, 68 deletions
diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html
index 24159841..933df157 100755
--- a/js/document/templates/html/index.html
+++ b/js/document/templates/html/index.html
@@ -62,7 +62,7 @@
62 } 62 }
63 </script> 63 </script>
64 64
65 <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> 65 <script type="text/javascript" data-package="../app" src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script>
66 66
67 <script type="text/montage-serialization" data-ninja-template="true"> 67 <script type="text/montage-serialization" data-ninja-template="true">
68 { 68 {
diff --git a/js/document/templates/html/main.js b/js/document/templates/html/main.js
deleted file mode 100644
index ffa3fab2..00000000
--- a/js/document/templates/html/main.js
+++ /dev/null
@@ -1,57 +0,0 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<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.
5 </copyright> */
6var Montage = require("montage/core/core").Montage,
7 Component = require("montage/ui/component").Component,
8 Template = require("montage/ui/template").Template,
9 TemplateCreator = require("tools/template/template-creator").TemplateCreator;
10
11exports.Main = Montage.create(Component, {
12
13 hasTemplate: {
14 value: false
15 },
16
17 /**
18 * Adding window hooks to callback into this object from Ninja.
19 */
20 templateDidLoad: {
21 value: function(){
22 var self = this;
23 //
24 window.addComponent = function(element, data, callback) {
25 var component;
26
27 component = require.async(data.path)
28 .then(function(component) {
29 var componentRequire = component[data.name];
30 var componentInstance = componentRequire.create();
31
32 componentInstance.element = element;
33
34 componentInstance.needsDraw = true;
35 componentInstance.ownerComponent = self;
36
37 callback(componentInstance, element);
38 })
39 .end();
40
41 };
42 //
43 window.mjsTemplateCreator = TemplateCreator;
44 //
45 window.mjsTemplate = Template;
46
47
48 // Dispatch event when this template has loaded.
49 /*
50 var newEvent = document.createEvent( "CustomEvent" );
51 newEvent.initCustomEvent( "userTemplateDidLoad", false, true );
52 document.body.dispatchEvent( newEvent );
53 */
54
55 }
56 }
57}); \ No newline at end of file
diff --git a/js/document/templates/html/package.json b/js/document/templates/html/package.json
deleted file mode 100755
index 4f36090a..00000000
--- a/js/document/templates/html/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
1{
2 "directories": {
3 "lib": ""
4 },
5 "mappings": {
6 "montage": "../../../../node_modules/montage/",
7 "tools": "../../../../node_modules/tools/",
8 "montage-google": "../../../../node_modules/montage-google/"
9 }
10} \ No newline at end of file