From c58dc96130c7eb5d964af53e9ad6e80bba5e647f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 17:24:40 -0700 Subject: initial stage web template Signed-off-by: Valerio Virgillito --- js/document/templates/montage-web/default_html.css | 30 ++++++++++++++ js/document/templates/montage-web/index.html | 41 ++++++++++++++++++ .../templates/montage-web/main.reel/main.js | 48 ++++++++++++++++++++++ js/document/templates/montage-web/package.json | 8 ++++ 4 files changed, 127 insertions(+) create mode 100755 js/document/templates/montage-web/default_html.css create mode 100755 js/document/templates/montage-web/index.html create mode 100644 js/document/templates/montage-web/main.reel/main.js create mode 100755 js/document/templates/montage-web/package.json (limited to 'js/document/templates/montage-web') diff --git a/js/document/templates/montage-web/default_html.css b/js/document/templates/montage-web/default_html.css new file mode 100755 index 00000000..05165898 --- /dev/null +++ b/js/document/templates/montage-web/default_html.css @@ -0,0 +1,30 @@ +/* +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. +
*/ + +* { + -webkit-transition-duration: 0s !important; + -webkit-animation-duration: 0s !important; + -webkit-animation-name: none !important; +} + +html{ + /*overflow:hidden;*/ +} + +body +{ + width: 100%; + height: 100%; + background: pink; +} + +.active-element-outline { + outline: #adff2f solid 2px; +} + +.nj-preset-transition { + -webkit-transition: all 450ms linear !important; +} \ No newline at end of file diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html new file mode 100755 index 00000000..60946aac --- /dev/null +++ b/js/document/templates/montage-web/index.html @@ -0,0 +1,41 @@ + + + + + + + + Ninja Prototype + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/document/templates/montage-web/main.reel/main.js b/js/document/templates/montage-web/main.reel/main.js new file mode 100644 index 00000000..019c675e --- /dev/null +++ b/js/document/templates/montage-web/main.reel/main.js @@ -0,0 +1,48 @@ +/* + 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; + +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(); + + }; + + // 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 diff --git a/js/document/templates/montage-web/package.json b/js/document/templates/montage-web/package.json new file mode 100755 index 00000000..c8bc02fb --- /dev/null +++ b/js/document/templates/montage-web/package.json @@ -0,0 +1,8 @@ +{ + "directories": { + "lib": "" + }, + "mappings": { + "montage": "../../../../node_modules/montage/" + } +} \ No newline at end of file -- cgit v1.2.3 From c62273126004f057de40ce91ecda5606643f4c92 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:37:47 -0700 Subject: reverting old template to current working status. New template work. Signed-off-by: Valerio Virgillito --- js/document/templates/montage-web/default_html.css | 11 ----------- js/document/templates/montage-web/index.html | 10 +++++++++- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'js/document/templates/montage-web') diff --git a/js/document/templates/montage-web/default_html.css b/js/document/templates/montage-web/default_html.css index 05165898..db069d4e 100755 --- a/js/document/templates/montage-web/default_html.css +++ b/js/document/templates/montage-web/default_html.css @@ -10,17 +10,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot -webkit-animation-name: none !important; } -html{ - /*overflow:hidden;*/ -} - -body -{ - width: 100%; - height: 100%; - background: pink; -} - .active-element-outline { outline: #adff2f solid 2px; } diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html index 60946aac..90b0f7fd 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -30,11 +30,19 @@ } + + - +
IPSUM
-- cgit v1.2.3 From d0af21d80441cb7ffe3a92ed00f8dc9b90867098 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 23 Apr 2012 13:41:16 -0700 Subject: adjusting the bread crumb to work with the new template Initial container get setup in ninja now. Signed-off-by: Valerio Virgillito --- js/document/templates/montage-web/main.reel/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/document/templates/montage-web') diff --git a/js/document/templates/montage-web/main.reel/main.js b/js/document/templates/montage-web/main.reel/main.js index 019c675e..d5ac88d5 100644 --- a/js/document/templates/montage-web/main.reel/main.js +++ b/js/document/templates/montage-web/main.reel/main.js @@ -38,10 +38,11 @@ exports.Main = Montage.create(Component, { }; // Dispatch event when this template has loaded. + /* var newEvent = document.createEvent( "CustomEvent" ); newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); - document.body.dispatchEvent( newEvent ); + */ } } -- cgit v1.2.3