From 4ba680a7e9168d0f505a81e42a287dfbc54b4d7d Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 1 May 2012 15:26:37 -0700 Subject: Preliminary IO to new DOM view --- js/document/templates/montage-web/index.html | 1 - 1 file changed, 1 deletion(-) (limited to 'js/document/templates') diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html index caebc8d0..696904b4 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -32,7 +32,6 @@ - \ No newline at end of file -- cgit v1.2.3 From d048006a619859359191cb396a05ec91a5b293ff Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 1 May 2012 15:36:38 -0700 Subject: Cleaning up template --- js/document/templates/montage-web/default_html.css | 28 ------------- js/document/templates/montage-web/index.html | 26 +++++++++++- js/document/templates/montage-web/main.js | 49 ++++++++++++++++++++++ .../templates/montage-web/main.reel/main.js | 49 ---------------------- 4 files changed, 73 insertions(+), 79 deletions(-) delete mode 100755 js/document/templates/montage-web/default_html.css create mode 100644 js/document/templates/montage-web/main.js delete mode 100644 js/document/templates/montage-web/main.reel/main.js (limited to 'js/document/templates') diff --git a/js/document/templates/montage-web/default_html.css b/js/document/templates/montage-web/default_html.css deleted file mode 100755 index e62a20a9..00000000 --- a/js/document/templates/montage-web/default_html.css +++ /dev/null @@ -1,28 +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. -
*/ - -* { - -webkit-transition-duration: 0s !important; - -webkit-animation-duration: 0s !important; - -webkit-animation-name: none !important; -} - -body { - margin: 0; - padding: 0; - - position: absolute; - -webkit-transform-style: preserve-3d; - -webkit-perspective: 1400px; -} - -.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 index 696904b4..67cfec86 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -10,8 +10,30 @@ Ninja Prototype + + @@ -24,7 +46,7 @@ diff --git a/js/document/templates/montage-web/main.js b/js/document/templates/montage-web/main.js new file mode 100644 index 00000000..d5ac88d5 --- /dev/null +++ b/js/document/templates/montage-web/main.js @@ -0,0 +1,49 @@ +/* + 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/main.reel/main.js b/js/document/templates/montage-web/main.reel/main.js deleted file mode 100644 index d5ac88d5..00000000 --- a/js/document/templates/montage-web/main.reel/main.js +++ /dev/null @@ -1,49 +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; - -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 -- cgit v1.2.3 From 0e59bc28a205292e2efd3ce1fb9a5e539086366d Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 2 May 2012 16:00:15 -0700 Subject: Adding hack to allow for blank documents to open --- js/document/templates/montage-web/index.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/document/templates') diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html index 67cfec86..1c6b6287 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -25,6 +25,10 @@ -webkit-transform-style: preserve-3d; -webkit-perspective: 1400px; } + + ninjaloadinghack { + display: none; + } .active-element-outline { outline: #adff2f solid 2px; -- cgit v1.2.3 From 3ad9024bcfce76e28816daa02bac14fc8985ca62 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 4 May 2012 15:32:25 -0700 Subject: Fixing body's default styles. Signed-off-by: Nivesh Rajbhandari --- js/document/templates/montage-web/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'js/document/templates') diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html index 1c6b6287..47964ae4 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -23,8 +23,13 @@ padding: 0; position: absolute; -webkit-transform-style: preserve-3d; - -webkit-perspective: 1400px; + -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } + + html, body { + width: 100%; + height: 100%; + } ninjaloadinghack { display: none; -- cgit v1.2.3 From c79814664f3002613b3f12106edffc64932fa4ac Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 8 May 2012 16:27:50 -0700 Subject: Get clicked element when body is scrolled. Signed-off-by: Nivesh Rajbhandari --- js/document/templates/montage-web/index.html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/document/templates') diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html index 47964ae4..6bd5ce7a 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -26,6 +26,11 @@ -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } + html { + overflow: scroll; + padding: 0 11px 11px 0; + } + html, body { width: 100%; height: 100%; -- cgit v1.2.3 From a1e8540f5656e62db6a89f3af7829be6b259b7ed Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 8 May 2012 17:33:13 -0700 Subject: Adding SAVE for I/O Adding save functionality to new template. Need to implement user UI for prompts and also clean up... --- js/document/templates/montage-web/index.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html index 47964ae4..3d550768 100755 --- a/js/document/templates/montage-web/index.html +++ b/js/document/templates/montage-web/index.html @@ -5,13 +5,20 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. --> + + - Ninja Prototype + Ninja Prototype - - + - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/document/templates/banner/main.js b/js/document/templates/banner/main.js new file mode 100644 index 00000000..d5ac88d5 --- /dev/null +++ b/js/document/templates/banner/main.js @@ -0,0 +1,49 @@ +/* + 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/banner/package.json b/js/document/templates/banner/package.json new file mode 100755 index 00000000..c8bc02fb --- /dev/null +++ b/js/document/templates/banner/package.json @@ -0,0 +1,8 @@ +{ + "directories": { + "lib": "" + }, + "mappings": { + "montage": "../../../../node_modules/montage/" + } +} \ No newline at end of file diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html new file mode 100755 index 00000000..a1b8b242 --- /dev/null +++ b/js/document/templates/html/index.html @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/document/templates/html/main.js b/js/document/templates/html/main.js new file mode 100644 index 00000000..d5ac88d5 --- /dev/null +++ b/js/document/templates/html/main.js @@ -0,0 +1,49 @@ +/* + 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/html/package.json b/js/document/templates/html/package.json new file mode 100755 index 00000000..c8bc02fb --- /dev/null +++ b/js/document/templates/html/package.json @@ -0,0 +1,8 @@ +{ + "directories": { + "lib": "" + }, + "mappings": { + "montage": "../../../../node_modules/montage/" + } +} \ No newline at end of file diff --git a/js/document/templates/montage-html/default_html.css b/js/document/templates/montage-html/default_html.css deleted file mode 100755 index 04b21c6f..00000000 --- a/js/document/templates/montage-html/default_html.css +++ /dev/null @@ -1,74 +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. -
*/ - -* { - -webkit-transition-duration: 0s !important; - -webkit-animation-duration: 0s !important; - -webkit-animation-name: none !important; -} - -html{ - overflow:hidden; -} - -body -{ - background: #808080; -} - -#Viewport -{ - margin: 0px; - padding: 0px; - top: 200px; - left: 700px; - /*position: absolute;*/ - /*height: 600px;*/ - /*width: 800px;*/ - opacity: 0.99; - z-index:2; -} - -#stageBG -{ - background: #ffffff; - top: 200px; - left: 700px; - z-index:1; -} - -.stageDimension -{ - position: absolute; - height: 600px; - width: 800px; -} - -.stageView -{ - border: 1px solid black; - -webkit-transform-style: preserve-3d; - -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -} - -.stageContentShadow { - -webkit-box-shadow: 3px 5px 4px rgba(0,0,0,.5); - -moz-box-shadow: 3px 5px 4px rgba(0,0,0,.5); - box-shadow: 3px 5px 4px rgba(0,0,0,.5); -} - -#userHead -{ - display: none; -} - -.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-html/index.html b/js/document/templates/montage-html/index.html deleted file mode 100755 index 79c6cd51..00000000 --- a/js/document/templates/montage-html/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - Ninja Prototype - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/js/document/templates/montage-html/main.reel/main.js b/js/document/templates/montage-html/main.reel/main.js deleted file mode 100644 index 019c675e..00000000 --- a/js/document/templates/montage-html/main.reel/main.js +++ /dev/null @@ -1,48 +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; - -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-html/package.json b/js/document/templates/montage-html/package.json deleted file mode 100755 index c8bc02fb..00000000 --- a/js/document/templates/montage-html/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "directories": { - "lib": "" - }, - "mappings": { - "montage": "../../../../node_modules/montage/" - } -} \ No newline at end of file diff --git a/js/document/templates/montage-web/index.html b/js/document/templates/montage-web/index.html deleted file mode 100755 index a1b8b242..00000000 --- a/js/document/templates/montage-web/index.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/js/document/templates/montage-web/main.js b/js/document/templates/montage-web/main.js deleted file mode 100644 index d5ac88d5..00000000 --- a/js/document/templates/montage-web/main.js +++ /dev/null @@ -1,49 +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; - -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 deleted file mode 100755 index c8bc02fb..00000000 --- a/js/document/templates/montage-web/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "directories": { - "lib": "" - }, - "mappings": { - "montage": "../../../../node_modules/montage/" - } -} \ No newline at end of file -- cgit v1.2.3 From d68c1ea5163c67ada54ac24f1da69695cc8dfab5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 11 May 2012 16:22:17 -0700 Subject: Fixing position issue Need to implement centering document. --- js/document/templates/banner/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html index 2cd82f51..8e8c96d6 100755 --- a/js/document/templates/banner/index.html +++ b/js/document/templates/banner/index.html @@ -60,8 +60,8 @@ border: 0; position: absolute; overflow: visible; - top: 50%; - left: 50%; + top: 0; + left: 0; background: #FFF; } -- cgit v1.2.3 From 734b6ad96d25bb67d0db4a0a75c331468e194809 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 14 May 2012 12:05:41 -0700 Subject: Fixing 3d to work in banner templates. Signed-off-by: Nivesh Rajbhandari --- js/document/templates/banner/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html index 8e8c96d6..9da6699b 100755 --- a/js/document/templates/banner/index.html +++ b/js/document/templates/banner/index.html @@ -27,8 +27,6 @@ margin: 0; padding: 0; position: absolute; - -webkit-transform-style: preserve-3d; - -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } html { @@ -63,6 +61,9 @@ top: 0; left: 0; background: #FFF; + -webkit-transform-style: preserve-3d; + -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } -- cgit v1.2.3 From cfd3a44bb7aba54c15fab59eff39ecdffcb7ac11 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 14 May 2012 14:38:35 -0700 Subject: Viewport for banner templates so content doesn't push through "body". Signed-off-by: Nivesh Rajbhandari --- js/document/templates/banner/index.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html index 9da6699b..7b29c038 100755 --- a/js/document/templates/banner/index.html +++ b/js/document/templates/banner/index.html @@ -50,6 +50,18 @@ .nj-preset-transition { -webkit-transition: all 450ms linear !important; } + + ninja-viewport { + display: block; + margin: 0; + padding: 0; + border: 0; + position: absolute; + overflow: visible; + top: 0; + left: 0; + background: #FFF; + } ninja-banner { display: block; @@ -60,7 +72,7 @@ overflow: visible; top: 0; left: 0; - background: #FFF; + background: transparent; -webkit-transform-style: preserve-3d; -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); @@ -89,7 +101,10 @@ - + + + + \ No newline at end of file -- cgit v1.2.3 From 150b6eb2be526627d588a0cf7226ddad7a399b8f Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 14 May 2012 16:35:09 -0700 Subject: Fixing banner template Need to implement save, but this cover open and new. --- js/document/templates/banner/index.html | 54 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html index 7b29c038..91ef06de 100755 --- a/js/document/templates/banner/index.html +++ b/js/document/templates/banner/index.html @@ -38,10 +38,6 @@ height: 100%; background: #666; } - - ninjaloadinghack { - display: none; - } .active-element-outline { outline: #adff2f solid 2px; @@ -50,32 +46,30 @@ .nj-preset-transition { -webkit-transition: all 450ms linear !important; } - - ninja-viewport { - display: block; - margin: 0; - padding: 0; - border: 0; - position: absolute; - overflow: visible; - top: 0; - left: 0; - background: #FFF; - } - ninja-banner { + ninjaloadinghack { + display: none; + } + + ninja-viewport, ninja-content { display: block; - margin: 0; - padding: 0; - border: 0; - position: absolute; - overflow: visible; - top: 0; - left: 0; - background: transparent; + margin: 0; + padding: 0; + border: 0; + position: absolute; + overflow: visible; + top: 0; + left: 0; + background: transparent; + } + + ninja-viewport { + background: #FFF; + } + + ninja-content { -webkit-transform-style: preserve-3d; -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - } @@ -100,11 +94,15 @@ + + - - + + + + \ No newline at end of file -- cgit v1.2.3 From 620ae8f53d4da25c65adb675c0b0ee187e5754fc Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 15 May 2012 16:49:32 -0700 Subject: Adding special preview for templates --- js/document/templates/preview/banner.html | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 js/document/templates/preview/banner.html (limited to 'js/document/templates') diff --git a/js/document/templates/preview/banner.html b/js/document/templates/preview/banner.html new file mode 100755 index 00000000..5838ec91 --- /dev/null +++ b/js/document/templates/preview/banner.html @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From f9f8fdc3000042ba5b4504d91870dc9a32ef25eb Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 01:00:22 -0700 Subject: Squashed master into dom-architecture Signed-off-by: Valerio Virgillito --- js/document/templates/banner/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/document/templates') diff --git a/js/document/templates/banner/package.json b/js/document/templates/banner/package.json index c8bc02fb..d1e839dc 100755 --- a/js/document/templates/banner/package.json +++ b/js/document/templates/banner/package.json @@ -3,6 +3,7 @@ "lib": "" }, "mappings": { - "montage": "../../../../node_modules/montage/" + "montage": "../../../../node_modules/montage/", + "montage-google": "../../../../node_modules/montage-google/" } } \ No newline at end of file -- cgit v1.2.3 From b2c8041058ab8d16ca49d70ed24ddd29e79f51d2 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 01:06:05 -0700 Subject: Fixing the package file for the new dom template Signed-off-by: Valerio Virgillito --- js/document/templates/html/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/document/templates') diff --git a/js/document/templates/html/package.json b/js/document/templates/html/package.json index c8bc02fb..d1e839dc 100755 --- a/js/document/templates/html/package.json +++ b/js/document/templates/html/package.json @@ -3,6 +3,7 @@ "lib": "" }, "mappings": { - "montage": "../../../../node_modules/montage/" + "montage": "../../../../node_modules/montage/", + "montage-google": "../../../../node_modules/montage-google/" } } \ No newline at end of file -- cgit v1.2.3 From 5de553a1b3bdd8783ab6ce017ae70369ad92a890 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 16 May 2012 11:37:05 -0700 Subject: Fixing preview bug Also setting up for Montage component serialization. --- js/document/templates/html/index.html | 5 +++-- js/document/templates/html/main.js | 14 +++++++++++--- js/document/templates/html/package.json | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html index a1b8b242..24159841 100755 --- a/js/document/templates/html/index.html +++ b/js/document/templates/html/index.html @@ -12,6 +12,9 @@ must set the 'data-ninja-template' data-ninja-template="true" --> + + + @@ -58,8 +61,6 @@ return document.elementFromPoint(x,y); } - - diff --git a/js/document/templates/html/main.js b/js/document/templates/html/main.js index d5ac88d5..f45657bb 100644 --- a/js/document/templates/html/main.js +++ b/js/document/templates/html/main.js @@ -3,8 +3,10 @@ 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; +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, { @@ -18,6 +20,7 @@ exports.Main = Montage.create(Component, { templateDidLoad: { value: function(){ var self = this; + // window.addComponent = function(element, data, callback) { var component; @@ -36,7 +39,12 @@ exports.Main = Montage.create(Component, { .end(); }; - + // + window.mjsTemplateCreator = TemplateCreator.create(); + // + window.mjsTemplate = Template.create(); + + // Dispatch event when this template has loaded. /* var newEvent = document.createEvent( "CustomEvent" ); diff --git a/js/document/templates/html/package.json b/js/document/templates/html/package.json index d1e839dc..4f36090a 100755 --- a/js/document/templates/html/package.json +++ b/js/document/templates/html/package.json @@ -4,6 +4,7 @@ }, "mappings": { "montage": "../../../../node_modules/montage/", + "tools": "../../../../node_modules/tools/", "montage-google": "../../../../node_modules/montage-google/" } } \ No newline at end of file -- cgit v1.2.3 From ac750fd9b9c311dcd48c6ee309607edc6fa048e1 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 16 May 2012 14:22:18 -0700 Subject: Adding basic montage components I/O Only for saving basic components without a reel. --- js/document/templates/html/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/document/templates') diff --git a/js/document/templates/html/main.js b/js/document/templates/html/main.js index f45657bb..2696dfa0 100644 --- a/js/document/templates/html/main.js +++ b/js/document/templates/html/main.js @@ -42,7 +42,7 @@ exports.Main = Montage.create(Component, { // window.mjsTemplateCreator = TemplateCreator.create(); // - window.mjsTemplate = Template.create(); + window.mjsTemplate = Template.create(); // Dispatch event when this template has loaded. -- cgit v1.2.3 From 5cc5d29736d8bf253e3a168cdd6443e839ffb23c Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 16 May 2012 15:42:09 -0700 Subject: Fixing serialization referencing (new object per save) --- js/document/templates/html/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/document/templates') diff --git a/js/document/templates/html/main.js b/js/document/templates/html/main.js index 2696dfa0..ffa3fab2 100644 --- a/js/document/templates/html/main.js +++ b/js/document/templates/html/main.js @@ -40,9 +40,9 @@ exports.Main = Montage.create(Component, { }; // - window.mjsTemplateCreator = TemplateCreator.create(); + window.mjsTemplateCreator = TemplateCreator; // - window.mjsTemplate = Template.create(); + window.mjsTemplate = Template; // Dispatch event when this template has loaded. -- cgit v1.2.3 From 6ce2f2a5af1bc66d8dbec04abfae2e07f43afcfe Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 17 May 2012 11:22:03 -0700 Subject: Fixed chrome preview for banner templates. Signed-off-by: Nivesh Rajbhandari --- js/document/templates/banner/main.js | 8 +++++++- js/document/templates/banner/package.json | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'js/document/templates') diff --git a/js/document/templates/banner/main.js b/js/document/templates/banner/main.js index d5ac88d5..2acbe8f3 100644 --- a/js/document/templates/banner/main.js +++ b/js/document/templates/banner/main.js @@ -4,7 +4,9 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; + Component = require("montage/ui/component").Component, + Template = require("montage/ui/template").Template, + TemplateCreator = require("tools/template/template-creator").TemplateCreator; exports.Main = Montage.create(Component, { @@ -37,6 +39,10 @@ exports.Main = Montage.create(Component, { }; + window.mjsTemplateCreator = TemplateCreator; + // + window.mjsTemplate = Template; + // Dispatch event when this template has loaded. /* var newEvent = document.createEvent( "CustomEvent" ); diff --git a/js/document/templates/banner/package.json b/js/document/templates/banner/package.json index d1e839dc..4f36090a 100755 --- a/js/document/templates/banner/package.json +++ b/js/document/templates/banner/package.json @@ -4,6 +4,7 @@ }, "mappings": { "montage": "../../../../node_modules/montage/", + "tools": "../../../../node_modules/tools/", "montage-google": "../../../../node_modules/montage-google/" } } \ No newline at end of file -- cgit v1.2.3 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/app/main.js | 61 +++++++++++++++++++++++++ js/document/templates/app/package.json | 10 ++++ js/document/templates/banner/index.html | 2 +- js/document/templates/banner/main.js | 55 ---------------------- js/document/templates/banner/package.json | 10 ---- js/document/templates/html/index.html | 2 +- js/document/templates/html/main.js | 57 ----------------------- js/document/templates/html/package.json | 10 ---- js/document/templates/montage-html/package.json | 9 ---- 9 files changed, 73 insertions(+), 143 deletions(-) create mode 100644 js/document/templates/app/main.js create mode 100755 js/document/templates/app/package.json delete mode 100644 js/document/templates/banner/main.js delete mode 100755 js/document/templates/banner/package.json delete mode 100644 js/document/templates/html/main.js delete mode 100755 js/document/templates/html/package.json delete mode 100755 js/document/templates/montage-html/package.json (limited to 'js/document/templates') diff --git a/js/document/templates/app/main.js b/js/document/templates/app/main.js new file mode 100644 index 00000000..a406abdb --- /dev/null +++ b/js/document/templates/app/main.js @@ -0,0 +1,61 @@ +/* + 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; + // + var templateEvent = document.createEvent("CustomEvent"); + templateEvent.initCustomEvent("mjsTemplateReady", false, true); + document.body.dispatchEvent(templateEvent); + + + // 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/app/package.json b/js/document/templates/app/package.json new file mode 100755 index 00000000..4f36090a --- /dev/null +++ b/js/document/templates/app/package.json @@ -0,0 +1,10 @@ +{ + "directories": { + "lib": "" + }, + "mappings": { + "montage": "../../../../node_modules/montage/", + "tools": "../../../../node_modules/tools/", + "montage-google": "../../../../node_modules/montage-google/" + } +} \ No newline at end of file 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 @@ - + - +