diff options
author | Jose Antonio Marquez | 2012-05-11 14:41:20 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-11 14:41:20 -0700 |
commit | c87e538fdc337639bc4d54bb087dbf2b4f20297f (patch) | |
tree | bbbcf496841932261b21f977061fd41c01c0e0a6 /js/document/templates/montage-html | |
parent | f10bec0c594c6404eec51dc1a005f7f17570ba52 (diff) | |
download | ninja-c87e538fdc337639bc4d54bb087dbf2b4f20297f.tar.gz |
Adding support for new templates
This is supported for NEW and OPEN, SAVE is not supported yet by I/O. Saving works, but it will not be a banner template.
Diffstat (limited to 'js/document/templates/montage-html')
-rwxr-xr-x | js/document/templates/montage-html/default_html.css | 74 | ||||
-rwxr-xr-x | js/document/templates/montage-html/index.html | 48 | ||||
-rw-r--r-- | js/document/templates/montage-html/main.reel/main.js | 48 | ||||
-rwxr-xr-x | js/document/templates/montage-html/package.json | 8 |
4 files changed, 0 insertions, 178 deletions
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 @@ | |||
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> */ | ||
6 | |||
7 | * { | ||
8 | -webkit-transition-duration: 0s !important; | ||
9 | -webkit-animation-duration: 0s !important; | ||
10 | -webkit-animation-name: none !important; | ||
11 | } | ||
12 | |||
13 | html{ | ||
14 | overflow:hidden; | ||
15 | } | ||
16 | |||
17 | body | ||
18 | { | ||
19 | background: #808080; | ||
20 | } | ||
21 | |||
22 | #Viewport | ||
23 | { | ||
24 | margin: 0px; | ||
25 | padding: 0px; | ||
26 | top: 200px; | ||
27 | left: 700px; | ||
28 | /*position: absolute;*/ | ||
29 | /*height: 600px;*/ | ||
30 | /*width: 800px;*/ | ||
31 | opacity: 0.99; | ||
32 | z-index:2; | ||
33 | } | ||
34 | |||
35 | #stageBG | ||
36 | { | ||
37 | background: #ffffff; | ||
38 | top: 200px; | ||
39 | left: 700px; | ||
40 | z-index:1; | ||
41 | } | ||
42 | |||
43 | .stageDimension | ||
44 | { | ||
45 | position: absolute; | ||
46 | height: 600px; | ||
47 | width: 800px; | ||
48 | } | ||
49 | |||
50 | .stageView | ||
51 | { | ||
52 | border: 1px solid black; | ||
53 | -webkit-transform-style: preserve-3d; | ||
54 | -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); | ||
55 | } | ||
56 | |||
57 | .stageContentShadow { | ||
58 | -webkit-box-shadow: 3px 5px 4px rgba(0,0,0,.5); | ||
59 | -moz-box-shadow: 3px 5px 4px rgba(0,0,0,.5); | ||
60 | box-shadow: 3px 5px 4px rgba(0,0,0,.5); | ||
61 | } | ||
62 | |||
63 | #userHead | ||
64 | { | ||
65 | display: none; | ||
66 | } | ||
67 | |||
68 | .active-element-outline { | ||
69 | outline: #adff2f solid 2px; | ||
70 | } | ||
71 | |||
72 | .nj-preset-transition { | ||
73 | -webkit-transition: all 450ms linear !important; | ||
74 | } \ 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 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | |||
8 | <html> | ||
9 | |||
10 | <head> | ||
11 | |||
12 | <title>Ninja Prototype</title> | ||
13 | |||
14 | <link href="default_html.css" id="nj-stage-stylesheet" rel="stylesheet" type="text/css" media="screen"/> | ||
15 | |||
16 | <script type="text/javascript" data-package="." src="../../../../node_modules/montage/montage.js"></script> | ||
17 | |||
18 | <script type="text/javascript"> | ||
19 | function getElement(x,y) { | ||
20 | return document.elementFromPoint(x,y); | ||
21 | } | ||
22 | </script> | ||
23 | |||
24 | <script type="text/montage-serialization"> | ||
25 | { | ||
26 | "owner": { | ||
27 | "prototype": "main.reel" | ||
28 | } | ||
29 | } | ||
30 | </script> | ||
31 | |||
32 | </head> | ||
33 | |||
34 | <body> | ||
35 | |||
36 | <ninja-div id="userHead"></ninja-div> | ||
37 | |||
38 | <ninja-div id="stageBG" class="stageDimension stageContentShadow"></ninja-div> | ||
39 | |||
40 | <ninja-div id="Viewport" class="stageDimension"> | ||
41 | |||
42 | <ninja-div id="UserContent" class="stageView stageDimension"></ninja-div> | ||
43 | |||
44 | </ninja-div> | ||
45 | |||
46 | </body> | ||
47 | |||
48 | </html> \ 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 @@ | |||
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> */ | ||
6 | var Montage = require("montage/core/core").Montage, | ||
7 | Component = require("montage/ui/component").Component; | ||
8 | |||
9 | exports.Main = Montage.create(Component, { | ||
10 | |||
11 | hasTemplate: { | ||
12 | value: false | ||
13 | }, | ||
14 | |||
15 | /** | ||
16 | * Adding window hooks to callback into this object from Ninja. | ||
17 | */ | ||
18 | templateDidLoad: { | ||
19 | value: function(){ | ||
20 | var self = this; | ||
21 | window.addComponent = function(element, data, callback) { | ||
22 | var component; | ||
23 | |||
24 | component = require.async(data.path) | ||
25 | .then(function(component) { | ||
26 | var componentRequire = component[data.name]; | ||
27 | var componentInstance = componentRequire.create(); | ||
28 | |||
29 | componentInstance.element = element; | ||
30 | |||
31 | componentInstance.needsDraw = true; | ||
32 | componentInstance.ownerComponent = self; | ||
33 | |||
34 | callback(componentInstance, element); | ||
35 | }) | ||
36 | .end(); | ||
37 | |||
38 | }; | ||
39 | |||
40 | // Dispatch event when this template has loaded. | ||
41 | var newEvent = document.createEvent( "CustomEvent" ); | ||
42 | newEvent.initCustomEvent( "userTemplateDidLoad", false, true ); | ||
43 | |||
44 | document.body.dispatchEvent( newEvent ); | ||
45 | |||
46 | } | ||
47 | } | ||
48 | }); \ 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 @@ | |||
1 | { | ||
2 | "directories": { | ||
3 | "lib": "" | ||
4 | }, | ||
5 | "mappings": { | ||
6 | "montage": "../../../../node_modules/montage/" | ||
7 | } | ||
8 | } \ No newline at end of file | ||