diff options
author | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
commit | 84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch) | |
tree | 3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/document/templates/preview | |
parent | c0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff) | |
parent | 40c6eb2c06b34f65a74d59ef9687251952858bab (diff) | |
download | ninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz |
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts:
js/components/gradientpicker.reel/gradientpicker.js
js/components/tools-properties/text-properties.reel/text-properties.js
js/document/views/base.js
js/document/views/design.js
js/helper-classes/3D/StageLine.js
js/helper-classes/3D/draw-utils.js
js/lib/drawing/world.js
js/lib/geom/circle.js
js/lib/geom/line.js
js/lib/geom/rectangle.js
js/lib/geom/shape-primitive.js
js/lib/rdge/materials/bump-metal-material.js
js/lib/rdge/materials/flag-material.js
js/lib/rdge/materials/fly-material.js
js/lib/rdge/materials/julia-material.js
js/lib/rdge/materials/keleidoscope-material.js
js/lib/rdge/materials/mandel-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/plasma-material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/radial-gradient-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/water-material.js
js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
js/panels/Materials/materials-popup.reel/materials-popup.html
js/panels/Materials/materials-popup.reel/materials-popup.js
js/tools/LineTool.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/document/templates/preview')
-rwxr-xr-x | js/document/templates/preview/banner.html | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/js/document/templates/preview/banner.html b/js/document/templates/preview/banner.html index 1860e314..a9a54251 100755 --- a/js/document/templates/preview/banner.html +++ b/js/document/templates/preview/banner.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <!DOCTYPE html> | 1 | <!doctype html> |
2 | <!-- <copyright> | 2 | <!-- <copyright> |
3 | Copyright (c) 2012, Motorola Mobility, Inc | 3 | Copyright (c) 2012, Motorola Mobility, Inc |
4 | All Rights Reserved. | 4 | All Rights Reserved. |
@@ -28,61 +28,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 | 28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | POSSIBILITY OF SUCH DAMAGE. | 29 | POSSIBILITY OF SUCH DAMAGE. |
30 | </copyright> --> | 30 | </copyright> --> |
31 | 31 | ||
32 | <html> | 32 | <html> |
33 | 33 | ||
34 | <head> | 34 | <head> |
35 | 35 | ||
36 | <style type="text/css"> | 36 | <style type="text/css"> |
37 | 37 | ||
38 | html, body { | 38 | html, body { |
39 | width: 100%; | 39 | width: 100%; |
40 | height: 100%; | 40 | height: 100%; |
41 | margin: 0; | 41 | margin: 0; |
42 | padding: 0; | 42 | padding: 0; |
43 | background: #333; | 43 | background: #333; |
44 | } | 44 | } |
45 | 45 | ||
46 | .preview { | 46 | .preview { |
47 | position: absolute; | 47 | position: absolute; |
48 | top: 50%; | 48 | top: 50%; |
49 | left: 50%; | 49 | left: 50%; |
50 | margin: 0; | 50 | margin: 0; |
51 | padding: 0; | 51 | padding: 0; |
52 | border: 1px solid #000; | 52 | border: 1px solid #000; |
53 | background: #FFF; | 53 | background: #FFF; |
54 | -webkit-box-shadow: 0 0 16px #000; | 54 | -webkit-box-shadow: 0 0 16px #000; |
55 | } | 55 | } |
56 | 56 | ||
57 | </style> | 57 | </style> |
58 | 58 | ||
59 | <script type="text/javascript"> | 59 | <script type="text/javascript"> |
60 | // | 60 | // |
61 | window.addEventListener('load', loadBanner, false); | 61 | window.addEventListener('load', loadBanner, false); |
62 | // | 62 | // |
63 | function loadBanner (e) { | 63 | function loadBanner (e) { |
64 | var iframe = document.getElementsByTagName('iframe')[0]; | 64 | var iframe = document.getElementsByTagName('iframe')[0]; |
65 | iframe.src = qs('url'); | 65 | iframe.src = qs('url'); |
66 | iframe.style.width = qs('width')+'px'; | 66 | iframe.style.width = qs('width')+'px'; |
67 | iframe.style.height = qs('height')+'px'; | 67 | iframe.style.height = qs('height')+'px'; |
68 | iframe.style.marginLeft = -1*qs('width')/2+'px'; | 68 | iframe.style.marginLeft = -1*qs('width')/2+'px'; |
69 | iframe.style.marginTop = -1*qs('height')/2+'px'; | 69 | iframe.style.marginTop = -1*qs('height')/2+'px'; |
70 | } | 70 | } |
71 | /* | 71 | /* |
72 | Taken from: | 72 | Taken from: |
73 | http://stackoverflow.com/questions/7731778/jquery-get-query-string-parameters | 73 | http://stackoverflow.com/questions/7731778/jquery-get-query-string-parameters |
74 | */ | 74 | */ |
75 | function qs(key) { | 75 | function qs(key) { |
76 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars | 76 | key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars |
77 | var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)")); | 77 | var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)")); |
78 | return match && decodeURIComponent(match[1]); | 78 | return match && decodeURIComponent(match[1]); |
79 | } | 79 | } |
80 | </script> | 80 | </script> |
81 | 81 | ||
82 | </head> | 82 | </head> |
83 | 83 | ||
84 | <body> | 84 | <body> |
85 | <iframe class="preview"></iframe> | 85 | <iframe class="preview"></iframe> |
86 | </body> | 86 | </body> |
87 | 87 | ||
88 | </html> | 88 | </html> |