aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/io/templates/descriptor.json17
-rwxr-xr-xjs/io/templates/files/animation.txt18
-rw-r--r--js/mediators/io-mediator.js2
3 files changed, 32 insertions, 5 deletions
diff --git a/js/io/templates/descriptor.json b/js/io/templates/descriptor.json
index 0b2b70e5..9c9c4ac8 100644
--- a/js/io/templates/descriptor.json
+++ b/js/io/templates/descriptor.json
@@ -13,7 +13,7 @@
13 "name":"Template", 13 "name":"Template",
14 "uri":"/template", 14 "uri":"/template",
15 "type":"directory", 15 "type":"directory",
16 "children":["js/io/templates/files/banner.txt"] 16 "children":["js/io/templates/files/banner.txt", "js/io/templates/files/animation.txt"]
17 }, 17 },
18 18
19 "js/io/templates/files/html.txt":{ 19 "js/io/templates/files/html.txt":{
@@ -90,7 +90,7 @@
90 "uri":"js/io/templates/files/banner.txt", 90 "uri":"js/io/templates/files/banner.txt",
91 "type":"file", 91 "type":"file",
92 "fileExtension":".html", 92 "fileExtension":".html",
93 "children":["120x600", "160x600", "200x200", "250x250", "300x250", "336x280", "550x400"] 93 "children":["120x600", "160x600", "200x200", "250x250", "300x250", "336x280"]
94 }, 94 },
95 95
96 "120x600":{ 96 "120x600":{
@@ -123,8 +123,17 @@
123 "uri": "336x280", 123 "uri": "336x280",
124 "type":"file" 124 "type":"file"
125 }, 125 },
126 "550x400":{ 126
127 "name": "Animation Default", 127 "js/io/templates/files/animation.txt":{
128 "name":"Animation",
129 "uri":"js/io/templates/files/animation.txt",
130 "type":"file",
131 "fileExtension":".html",
132 "children":["550x400"]
133 },
134
135 "550x400":{
136 "name": "Default",
128 "uri": "550x400", 137 "uri": "550x400",
129 "type":"file" 138 "type":"file"
130 } 139 }
diff --git a/js/io/templates/files/animation.txt b/js/io/templates/files/animation.txt
new file mode 100755
index 00000000..33b45e53
--- /dev/null
+++ b/js/io/templates/files/animation.txt
@@ -0,0 +1,18 @@
1<!DOCTYPE html>
2
3<div class="ninja-content-wrapper">
4
5 <!-- Created with Motorola Mobility Ninja -->
6
7 <!-- Ninja-Banner Dimensions@@@ -->
8
9 <div class="ninja-banner">
10
11 <style type="text/css">
12 .ninja-content-wrapper {}
13 .ninja-banner {}
14 </style>
15
16 </div>
17
18</div> \ No newline at end of file
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index 7a905fc6..696a69dc 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -77,7 +77,7 @@ exports.IoMediator = Montage.create(Component, {
77 //TODO: Improve template data injection 77 //TODO: Improve template data injection
78 function parseTemplate (content, template) { 78 function parseTemplate (content, template) {
79 // 79 //
80 if (template.name.toLowerCase() === 'banner') { 80 if (template.name.toLowerCase() === 'banner' || template.name.toLowerCase() === 'animation') {
81 //Getting dimensions of banner 81 //Getting dimensions of banner
82 var dimensions = template.id.split('x'); 82 var dimensions = template.id.split('x');
83 dimensions = {width: String(dimensions[0])+'px', height: String(dimensions[1])+'px'}; 83 dimensions = {width: String(dimensions[0])+'px', height: String(dimensions[1])+'px'};