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