aboutsummaryrefslogtreecommitdiff
path: root/js/document/templates/banner/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/templates/banner/main.js')
-rw-r--r--js/document/templates/banner/main.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/js/document/templates/banner/main.js b/js/document/templates/banner/main.js
deleted file mode 100644
index 2acbe8f3..00000000
--- a/js/document/templates/banner/main.js
+++ /dev/null
@@ -1,55 +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 window.addComponent = function(element, data, callback) {
24 var component;
25
26 component = require.async(data.path)
27 .then(function(component) {
28 var componentRequire = component[data.name];
29 var componentInstance = componentRequire.create();
30
31 componentInstance.element = element;
32
33 componentInstance.needsDraw = true;
34 componentInstance.ownerComponent = self;
35
36 callback(componentInstance, element);
37 })
38 .end();
39
40 };
41
42 window.mjsTemplateCreator = TemplateCreator;
43 //
44 window.mjsTemplate = Template;
45
46 // Dispatch event when this template has loaded.
47 /*
48 var newEvent = document.createEvent( "CustomEvent" );
49 newEvent.initCustomEvent( "userTemplateDidLoad", false, true );
50 document.body.dispatchEvent( newEvent );
51 */
52
53 }
54 }
55}); \ No newline at end of file