diff options
author | John Mayhew | 2012-07-09 17:28:24 -0700 |
---|---|---|
committer | John Mayhew | 2012-07-09 17:28:24 -0700 |
commit | 770bcb52422742ff741a88a75ecefbeb90bc9247 (patch) | |
tree | 64cb3e09a8daeb340261dd7f3869c73f7b90b643 /js/document/templates/preview/banner.html | |
parent | 8c5ecaf90062f9e030386f338bdc19fd62b826c8 (diff) | |
parent | 2b2b5fbb4b6a786daa4e9d4ee9eba9ac78924842 (diff) | |
download | ninja-770bcb52422742ff741a88a75ecefbeb90bc9247.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Conflicts:
manifest.json
Diffstat (limited to 'js/document/templates/preview/banner.html')
-rwxr-xr-x | js/document/templates/preview/banner.html | 123 |
1 files changed, 62 insertions, 61 deletions
diff --git a/js/document/templates/preview/banner.html b/js/document/templates/preview/banner.html index 1860e314..7035ee3c 100755 --- a/js/document/templates/preview/banner.html +++ b/js/document/templates/preview/banner.html | |||
@@ -1,25 +1,26 @@ | |||
1 | <!DOCTYPE html> | 1 | <!doctype html> |
2 | <!-- <copyright> | 2 | <!-- <copyright> |
3 | Copyright (c) 2012, Motorola Mobility, Inc | 3 | Copyright (c) 2012, Motorola Mobility LLC. |
4 | All Rights Reserved. | 4 | All Rights Reserved. |
5 | BSD License. | ||
6 | 5 | ||
7 | Redistribution and use in source and binary forms, with or without | 6 | Redistribution and use in source and binary forms, with or without |
8 | modification, are permitted provided that the following conditions are met: | 7 | modification, are permitted provided that the following conditions are met: |
9 | 8 | ||
10 | - Redistributions of source code must retain the above copyright notice, | 9 | * Redistributions of source code must retain the above copyright notice, |
11 | this list of conditions and the following disclaimer. | 10 | this list of conditions and the following disclaimer. |
12 | - Redistributions in binary form must reproduce the above copyright | 11 | |
13 | notice, this list of conditions and the following disclaimer in the | 12 | * Redistributions in binary form must reproduce the above copyright notice, |
14 | documentation and/or other materials provided with the distribution. | 13 | this list of conditions and the following disclaimer in the documentation |
15 | - Neither the name of Motorola Mobility nor the names of its contributors | 14 | and/or other materials provided with the distribution. |
16 | may be used to endorse or promote products derived from this software | 15 | |
17 | without specific prior written permission. | 16 | * Neither the name of Motorola Mobility LLC nor the names of its |
17 | contributors may be used to endorse or promote products derived from this | ||
18 | software without specific prior written permission. | ||
18 | 19 | ||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
@@ -28,61 +29,61 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | POSSIBILITY OF SUCH DAMAGE. | 30 | POSSIBILITY OF SUCH DAMAGE. |
30 | </copyright> --> | 31 | </copyright> --> |
31 | 32 | ||
32 | <html> | 33 | <html> |
33 | 34 | ||
34 | <head> | 35 | <head> |
35 | 36 | ||
36 | <style type="text/css"> | 37 | <style type="text/css"> |
37 | 38 | ||
38 | html, body { | 39 | html, body { |
39 | width: 100%; | 40 | width: 100%; |
40 | height: 100%; | 41 | height: 100%; |
41 | margin: 0; | 42 | margin: 0; |
42 | padding: 0; | 43 | padding: 0; |
43 | background: #333; | 44 | background: #333; |
44 | } | 45 | } |
45 | 46 | ||
46 | .preview { | 47 | .preview { |
47 | position: absolute; | 48 | position: absolute; |
48 | top: 50%; | 49 | top: 50%; |
49 | left: 50%; | 50 | left: 50%; |
50 | margin: 0; | 51 | margin: 0; |
51 | padding: 0; | 52 | padding: 0; |
52 | border: 1px solid #000; | 53 | border: 1px solid #000; |
53 | background: #FFF; | 54 | background: #FFF; |
54 | -webkit-box-shadow: 0 0 16px #000; | 55 | -webkit-box-shadow: 0 0 16px #000; |
55 | } | 56 | } |
56 | 57 | ||
57 | </style> | 58 | </style> |
58 | 59 | ||
59 | <script type="text/javascript"> | 60 | <script type="text/javascript"> |
60 | // | 61 | // |
61 | window.addEventListener('load', loadBanner, false); | 62 | window.addEventListener('load', loadBanner, false); |
62 | // | 63 | // |
63 | function loadBanner (e) { | 64 | function loadBanner (e) { |
64 | var iframe = document.getElementsByTagName('iframe')[0]; | 65 | var iframe = document.getElementsByTagName('iframe')[0]; |
65 | iframe.src = qs('url'); | 66 | iframe.src = qs('url'); |
66 | iframe.style.width = qs('width')+'px'; | 67 | iframe.style.width = qs('width')+'px'; |
67 | iframe.style.height = qs('height')+'px'; | 68 | iframe.style.height = qs('height')+'px'; |
68 | iframe.style.marginLeft = -1*qs('width')/2+'px'; | 69 | iframe.style.marginLeft = -1*qs('width')/2+'px'; |
69 | iframe.style.marginTop = -1*qs('height')/2+'px'; | 70 | iframe.style.marginTop = -1*qs('height')/2+'px'; |
70 | } | 71 | } |
71 | /* | 72 | /* |
72 | Taken from: | 73 | Taken from: |
73 | http://stackoverflow.com/questions/7731778/jquery-get-query-string-parameters | 74 | http://stackoverflow.com/questions/7731778/jquery-get-query-string-parameters |
74 | */ | 75 | */ |
75 | function qs(key) { | 76 | function qs(key) { |
76 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars | 77 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars |
77 | var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)")); | 78 | var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)")); |
78 | return match && decodeURIComponent(match[1]); | 79 | return match && decodeURIComponent(match[1]); |
79 | } | 80 | } |
80 | </script> | 81 | </script> |
81 | 82 | ||
82 | </head> | 83 | </head> |
83 | 84 | ||
84 | <body> | 85 | <body> |
85 | <iframe class="preview"></iframe> | 86 | <iframe class="preview"></iframe> |
86 | </body> | 87 | </body> |
87 | 88 | ||
88 | </html> | 89 | </html> |