From e713d437a3918b9e417d1a0bc9f11275fc9e6634 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 17 May 2012 12:16:43 -0700 Subject: Sharing app data in banner and html templates Syncing the files to avoid duplicates and ensure consistency. --- js/document/templates/banner/main.js | 55 ------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 js/document/templates/banner/main.js (limited to 'js/document/templates/banner/main.js') 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 @@ -/* - This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component, - Template = require("montage/ui/template").Template, - TemplateCreator = require("tools/template/template-creator").TemplateCreator; - -exports.Main = Montage.create(Component, { - - hasTemplate: { - value: false - }, - - /** - * Adding window hooks to callback into this object from Ninja. - */ - templateDidLoad: { - value: function(){ - var self = this; - window.addComponent = function(element, data, callback) { - var component; - - component = require.async(data.path) - .then(function(component) { - var componentRequire = component[data.name]; - var componentInstance = componentRequire.create(); - - componentInstance.element = element; - - componentInstance.needsDraw = true; - componentInstance.ownerComponent = self; - - callback(componentInstance, element); - }) - .end(); - - }; - - window.mjsTemplateCreator = TemplateCreator; - // - window.mjsTemplate = Template; - - // Dispatch event when this template has loaded. - /* - var newEvent = document.createEvent( "CustomEvent" ); - newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); - document.body.dispatchEvent( newEvent ); - */ - - } - } -}); \ No newline at end of file -- cgit v1.2.3