diff options
author | Ananya Sen | 2012-05-18 16:57:27 -0700 |
---|---|---|
committer | Ananya Sen | 2012-05-18 16:57:27 -0700 |
commit | bddbcd15c165ac0731de204b023a1e60d71b5d79 (patch) | |
tree | 727997cc71d5e9c951c1089dfbdeb90cd3b68e6f /js/document/templates/banner | |
parent | 7a22f7b368ef549a5b30c58a0f3900685b764bdb (diff) | |
parent | e7c288fe8f5d3a9e5c9f0eb0a045c6c195a0e7b8 (diff) | |
download | ninja-bddbcd15c165ac0731de204b023a1e60d71b5d79.tar.gz |
Merge branch 'refs/heads/master-dom-architecture' into dom-architecture
Diffstat (limited to 'js/document/templates/banner')
-rwxr-xr-x | js/document/templates/banner/index.html | 2 | ||||
-rw-r--r-- | js/document/templates/banner/main.js | 49 | ||||
-rwxr-xr-x | js/document/templates/banner/package.json | 9 |
3 files changed, 1 insertions, 59 deletions
diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html index 91ef06de..f1ee3d98 100755 --- a/js/document/templates/banner/index.html +++ b/js/document/templates/banner/index.html | |||
@@ -81,7 +81,7 @@ | |||
81 | 81 | ||
82 | <!-- TODO: Determine if loading Montage is always needed or if it could be done author-time or on file open --> | 82 | <!-- TODO: Determine if loading Montage is always needed or if it could be done author-time or on file open --> |
83 | 83 | ||
84 | <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> | 84 | <script type="text/javascript" data-package="../app" src="../../../../node_modules/montage/montage.js" data-ninja-template="true"></script> |
85 | 85 | ||
86 | <script type="text/montage-serialization" data-ninja-template="true"> | 86 | <script type="text/montage-serialization" data-ninja-template="true"> |
87 | { | 87 | { |
diff --git a/js/document/templates/banner/main.js b/js/document/templates/banner/main.js deleted file mode 100644 index d5ac88d5..00000000 --- a/js/document/templates/banner/main.js +++ /dev/null | |||
@@ -1,49 +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> */ | ||
6 | var Montage = require("montage/core/core").Montage, | ||
7 | Component = require("montage/ui/component").Component; | ||
8 | |||
9 | exports.Main = Montage.create(Component, { | ||
10 | |||
11 | hasTemplate: { | ||
12 | value: false | ||
13 | }, | ||
14 | |||
15 | /** | ||
16 | * Adding window hooks to callback into this object from Ninja. | ||
17 | */ | ||
18 | templateDidLoad: { | ||
19 | value: function(){ | ||
20 | var self = this; | ||
21 | window.addComponent = function(element, data, callback) { | ||
22 | var component; | ||
23 | |||
24 | component = require.async(data.path) | ||
25 | .then(function(component) { | ||
26 | var componentRequire = component[data.name]; | ||
27 | var componentInstance = componentRequire.create(); | ||
28 | |||
29 | componentInstance.element = element; | ||
30 | |||
31 | componentInstance.needsDraw = true; | ||
32 | componentInstance.ownerComponent = self; | ||
33 | |||
34 | callback(componentInstance, element); | ||
35 | }) | ||
36 | .end(); | ||
37 | |||
38 | }; | ||
39 | |||
40 | // Dispatch event when this template has loaded. | ||
41 | /* | ||
42 | var newEvent = document.createEvent( "CustomEvent" ); | ||
43 | newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); | ||
44 | document.body.dispatchEvent( newEvent ); | ||
45 | */ | ||
46 | |||
47 | } | ||
48 | } | ||
49 | }); \ No newline at end of file | ||
diff --git a/js/document/templates/banner/package.json b/js/document/templates/banner/package.json deleted file mode 100755 index d1e839dc..00000000 --- a/js/document/templates/banner/package.json +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | { | ||
2 | "directories": { | ||
3 | "lib": "" | ||
4 | }, | ||
5 | "mappings": { | ||
6 | "montage": "../../../../node_modules/montage/", | ||
7 | "montage-google": "../../../../node_modules/montage-google/" | ||
8 | } | ||
9 | } \ No newline at end of file | ||