diff options
author | Pacien TRAN-GIRARD | 2014-02-22 18:57:47 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-02-22 18:57:47 +0100 |
commit | c80a22f026af465bee8bc88fd7058693c327e216 (patch) | |
tree | a61ecd4c8ec0576bf039395b6f0d1c4dc0b138d5 | |
parent | ae9f87673c956804837abe6a3c8e7c2450c62223 (diff) | |
download | esieequest-c80a22f026af465bee8bc88fd7058693c327e216.tar.gz |
Embed applet in the website
-rw-r--r-- | website/assets/css/style.css | 69 | ||||
-rw-r--r-- | website/assets/js/deployJava.js | 1305 | ||||
-rw-r--r-- | website/assets/js/script.js | 48 | ||||
-rw-r--r-- | website/index.html | 15 |
4 files changed, 1405 insertions, 32 deletions
diff --git a/website/assets/css/style.css b/website/assets/css/style.css index 4c691fb..bc2f21f 100644 --- a/website/assets/css/style.css +++ b/website/assets/css/style.css | |||
@@ -6,6 +6,31 @@ | |||
6 | text-transform: none !important; | 6 | text-transform: none !important; |
7 | } | 7 | } |
8 | 8 | ||
9 | kbd { | ||
10 | padding: 0.1em 0.6em; | ||
11 | border: 1px solid #ccc; | ||
12 | font-size: 11px; | ||
13 | font-family: Arial, Helvetica, sans-serif; | ||
14 | background-color: #f7f7f7; | ||
15 | color: #333; | ||
16 | /*-moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset; | ||
17 | -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset; | ||
18 | box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset;*/ | ||
19 | -moz-border-radius: 3px; | ||
20 | -webkit-border-radius: 3px; | ||
21 | border-radius: 3px; | ||
22 | display: inline-block; | ||
23 | margin: 0 0.1em; | ||
24 | text-shadow: 0 1px 0 #fff; | ||
25 | line-height: 1.4; | ||
26 | white-space: nowrap; | ||
27 | vertical-align: text-top; | ||
28 | } | ||
29 | |||
30 | ul .fa { | ||
31 | margin-right: 0.25em; | ||
32 | } | ||
33 | |||
9 | .anchor { | 34 | .anchor { |
10 | position: relative; | 35 | position: relative; |
11 | margin-top: -5%; | 36 | margin-top: -5%; |
@@ -21,6 +46,15 @@ | |||
21 | z-index: 3; | 46 | z-index: 3; |
22 | overflow: hidden; | 47 | overflow: hidden; |
23 | background-color: #2d3e50; | 48 | background-color: #2d3e50; |
49 | color: #FFF; | ||
50 | } | ||
51 | |||
52 | .fullscreen p { | ||
53 | text-align: center; | ||
54 | } | ||
55 | |||
56 | .fullscreen a { | ||
57 | color: #6FBEF3; | ||
24 | } | 58 | } |
25 | 59 | ||
26 | .overbox { | 60 | .overbox { |
@@ -31,33 +65,16 @@ | |||
31 | display: block; | 65 | display: block; |
32 | } | 66 | } |
33 | 67 | ||
68 | #play > * { | ||
69 | margin-top: 120px; | ||
70 | margin-left: 120px; | ||
71 | width: calc(100% - 180px); | ||
72 | height: calc(100% - 180px); | ||
73 | } | ||
74 | |||
34 | #map-frame { | 75 | #map-frame { |
35 | width: 100%; | 76 | width: 100%; |
36 | height: 100%; | 77 | height: 100%; |
37 | border: none; | 78 | border: none; |
38 | } | 79 | overflow: hidden; |
39 | 80 | } \ No newline at end of file | |
40 | kbd { | ||
41 | padding: 0.1em 0.6em; | ||
42 | border: 1px solid #ccc; | ||
43 | font-size: 11px; | ||
44 | font-family: Arial, Helvetica, sans-serif; | ||
45 | background-color: #f7f7f7; | ||
46 | color: #333; | ||
47 | /*-moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset; | ||
48 | -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset; | ||
49 | box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset;*/ | ||
50 | -moz-border-radius: 3px; | ||
51 | -webkit-border-radius: 3px; | ||
52 | border-radius: 3px; | ||
53 | display: inline-block; | ||
54 | margin: 0 0.1em; | ||
55 | text-shadow: 0 1px 0 #fff; | ||
56 | line-height: 1.4; | ||
57 | white-space: nowrap; | ||
58 | vertical-align: text-top; | ||
59 | } | ||
60 | |||
61 | ul .fa { | ||
62 | margin-right: 0.25em; | ||
63 | } | ||
diff --git a/website/assets/js/deployJava.js b/website/assets/js/deployJava.js new file mode 100644 index 0000000..879df1c --- /dev/null +++ b/website/assets/js/deployJava.js | |||
@@ -0,0 +1,1305 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. | ||
3 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * - Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * - Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in the | ||
14 | * documentation and/or other materials provided with the distribution. | ||
15 | * | ||
16 | * - Neither the name of Oracle nor the names of its | ||
17 | * contributors may be used to endorse or promote products derived | ||
18 | * from this software without specific prior written permission. | ||
19 | * | ||
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
21 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
31 | */ | ||
32 | |||
33 | /* | ||
34 | * deployJava.js | ||
35 | * | ||
36 | * This file is part of the Deployment Toolkit. It provides functions for web | ||
37 | * pages to detect the presence of a JRE, install the latest JRE, and easily run | ||
38 | * applets or Web Start programs. More Information on usage of the | ||
39 | * Deployment Toolkit can be found in the Deployment Guide at: | ||
40 | * http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/index.html | ||
41 | * | ||
42 | * The "live" copy of this file may be found at : | ||
43 | * http://java.com/js/deployJava.js. | ||
44 | * For web pages provisioned using https, you may want to access the copy at: | ||
45 | * https://java.com/js/deployJava.js. | ||
46 | * | ||
47 | * You are encouraged to link directly to the live copies. | ||
48 | * The above files are stripped of comments and whitespace for performance, | ||
49 | * You can access this file w/o the whitespace and comments removed at: | ||
50 | * http://java.com/js/deployJava.txt. | ||
51 | * | ||
52 | */ | ||
53 | |||
54 | var deployJava = function() { | ||
55 | /** HTML attribute filter implementation */ | ||
56 | var hattrs = { | ||
57 | core: [ 'id', 'class', 'title', 'style' ], | ||
58 | i18n: [ 'lang', 'dir' ], | ||
59 | events: [ 'onclick', 'ondblclick', 'onmousedown', 'onmouseup', | ||
60 | 'onmouseover', 'onmousemove', 'onmouseout', 'onkeypress', | ||
61 | 'onkeydown', 'onkeyup' ], | ||
62 | applet: [ 'codebase', 'code', 'name', 'archive', 'object', | ||
63 | 'width', 'height', 'alt', 'align', 'hspace', 'vspace' ], | ||
64 | object: [ 'classid', 'codebase', 'codetype', 'data', 'type', | ||
65 | 'archive', 'declare', 'standby', 'height', 'width', 'usemap', | ||
66 | 'name', 'tabindex', 'align', 'border', 'hspace', 'vspace' ] | ||
67 | }; | ||
68 | |||
69 | var object_valid_attrs = hattrs.object.concat(hattrs.core, hattrs.i18n, | ||
70 | hattrs.events); | ||
71 | var applet_valid_attrs = hattrs.applet.concat(hattrs.core); | ||
72 | |||
73 | // generic log function, use console.log unless it isn't available | ||
74 | // then revert to alert() | ||
75 | function log(message) { | ||
76 | if ( ! rv.debug ) {return}; | ||
77 | |||
78 | if (console.log) { | ||
79 | console.log(message); | ||
80 | } else { | ||
81 | alert(message); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | //checks where given version string matches query | ||
86 | // | ||
87 | //NB: assume format is correct. Can add format check later if needed | ||
88 | // from dtjava.js | ||
89 | function versionCheckEx(query, version) { | ||
90 | if (query == null || query.length == 0) return true; | ||
91 | |||
92 | var c = query.charAt(query.length - 1); | ||
93 | |||
94 | //if it is not explicit pattern but does not have update version then need to append * | ||
95 | if (c != '+' && c != '*' && (query.indexOf('_') != -1 && c != '_')) { | ||
96 | query = query + "*"; | ||
97 | c = '*'; | ||
98 | } | ||
99 | |||
100 | query = query.substring(0, query.length - 1); | ||
101 | //if query ends with ".", "_" then we want to strip it to allow match of "1.6.*" to shorter form such as "1.6" | ||
102 | //TODO: add support for match of "1.7.0*" to "1.7"? | ||
103 | if (query.length > 0) { | ||
104 | var z = query.charAt(query.length - 1); | ||
105 | if (z == '.' || z == '_') { | ||
106 | query = query.substring(0, query.length - 1); | ||
107 | } | ||
108 | } | ||
109 | if (c == '*') { | ||
110 | //it is match if version starts from it | ||
111 | return (version.indexOf(query) == 0); | ||
112 | } else if (c == '+') { | ||
113 | //match if query string is lexicographically smaller | ||
114 | return query <= version; | ||
115 | } | ||
116 | return false; | ||
117 | } | ||
118 | |||
119 | function getWebStartLaunchIconURL() { | ||
120 | var imageUrl = '//java.com/js/webstart.png'; | ||
121 | try { | ||
122 | // for http/https; use protocol less url; use http for all other protocol | ||
123 | return document.location.protocol.indexOf('http') != -1 ? | ||
124 | imageUrl : 'http:' + imageUrl; | ||
125 | } catch (err) { | ||
126 | return 'http:' + imageUrl; | ||
127 | } | ||
128 | } | ||
129 | |||
130 | // GetJava page | ||
131 | function constructGetJavaURL(query) { | ||