|
62
|
1 |
<!-- |
|
|
2 |
/* |
|
|
3 |
* This file is part of the TraKERS\Front IDILL package. |
|
|
4 |
* |
|
|
5 |
* (c) IRI <http://www.iri.centrepompidou.fr/> |
|
|
6 |
* |
|
|
7 |
* For the full copyright and license information, please view the LICENSE |
|
|
8 |
* file that was distributed with this source code. |
|
|
9 |
*/ |
|
|
10 |
|
|
|
11 |
/* |
|
|
12 |
* Projet : TraKERS |
|
|
13 |
* Module : Front IDILL |
|
|
14 |
* Fichier : index.html |
|
|
15 |
* |
|
|
16 |
* Auteur : alexandre.bastien@iri.centrepompidou.fr |
|
|
17 |
* |
|
67
|
18 |
* Fonctionnalités : Permet d'accéder au Front IDILL en mode d'interaction souris/Kinect. |
|
62
|
19 |
*/ |
|
|
20 |
--> |
|
|
21 |
|
|
|
22 |
<!doctype html> |
|
|
23 |
<html> |
|
|
24 |
<head> |
|
|
25 |
<!-- On inclut les styles et les scripts utilisés. --> |
|
|
26 |
<title>IDILL</title> |
|
|
27 |
<meta charset="UTF-8" /> |
|
|
28 |
<link rel="stylesheet" type="text/css" href="./mosaic/css/reset.css" /> |
|
|
29 |
<script type="text/javascript" src="../lib/less-1.3.0.min.js"></script> |
|
|
30 |
<script type="text/javascript" src="../lib/underscore-min.js"></script> |
|
|
31 |
<script type="text/javascript" src="../lib/jquery.min.js"></script> |
|
|
32 |
</head> |
|
|
33 |
|
|
|
34 |
<body> |
|
|
35 |
<!-- Scripts principaux. --> |
|
|
36 |
<script type="text/javascript"> |
|
|
37 |
function loadMenu(textElements) |
|
|
38 |
{ |
|
77
|
39 |
//Si on est sur une tablette, on passe directement dans le mode d'interaction tablette. |
|
|
40 |
if('ontouchstart' in document.documentElement) |
|
|
41 |
{ |
|
|
42 |
window.location.replace('./index_souris.html'); |
|
|
43 |
} |
|
|
44 |
|
|
62
|
45 |
var form = "<div id='choice'><p id='caution'>" + textElements.caution + "</p><input id='MI' type='button' /><br ><input id='KI' type='button' /></div>"; |
|
|
46 |
|
|
|
47 |
$('body').css({ |
|
|
48 |
'background-image': 'url("./img/background.png")', |
|
|
49 |
'background-repeat': 'repeat' |
|
|
50 |
}); |
|
|
51 |
$('body').append(form); |
|
|
52 |
|
|
|
53 |
$('#caution').css( |
|
|
54 |
{ |
|
|
55 |
color: '#FFF', |
|
|
56 |
'font-size': '20px' |
|
|
57 |
}); |
|
|
58 |
$('#MI').attr('value', textElements.mouse); |
|
77
|
59 |
$('#MI').css( |
|
|
60 |
{ |
|
|
61 |
'padding': '30px', |
|
|
62 |
'font-size': '20px' |
|
|
63 |
|
|
|
64 |
}).click(function() |
|
62
|
65 |
{ |
|
|
66 |
window.location.replace('./index_souris.html'); |
|
|
67 |
}); |
|
|
68 |
$('#KI').attr('value', textElements.kinect); |
|
77
|
69 |
$('#KI').css( |
|
|
70 |
{ |
|
|
71 |
'padding': '30px', |
|
|
72 |
'font-size': '20px' |
|
|
73 |
}).click(function() |
|
62
|
74 |
{ |
|
|
75 |
window.location.replace('./index_kinect.html'); |
|
|
76 |
}); |
|
|
77 |
|
|
|
78 |
$('#choice').css( |
|
|
79 |
{ |
|
|
80 |
position: 'absolute', |
|
|
81 |
width: '60%' |
|
|
82 |
}); |
|
|
83 |
$('#choice').css( |
|
|
84 |
{ |
|
|
85 |
left: ($(window).width() - $('#choice').width()) / 2, |
|
|
86 |
'text-align': 'center', |
|
|
87 |
top: ($(window).height() - $('#choice').height()) / 2 |
|
|
88 |
}); |
|
|
89 |
} |
|
|
90 |
|
|
|
91 |
//Si la page a chargé, on charge le menu de sélection de mode. |
|
|
92 |
$(document).ready(function () |
|
|
93 |
{ |
|
|
94 |
//Langues gérées. |
|
|
95 |
var langs = ["fr", "en"]; |
|
|
96 |
var lang = navigator.language; |
|
|
97 |
|
|
|
98 |
//Si la langue n'est pas gérée, on met l'anglais pas défaut. |
|
|
99 |
if(langs.indexOf(lang) == -1) |
|
|
100 |
{ |
|
|
101 |
lang = "en"; |
|
|
102 |
} |
|
|
103 |
|
|
|
104 |
var path = 'lang/' + lang + '.json'; |
|
|
105 |
var textElements; |
|
|
106 |
$.getJSON(path, function(data) |
|
|
107 |
{ |
|
|
108 |
textElements = data.choice; |
|
|
109 |
console.log(textElements); |
|
|
110 |
loadMenu(textElements); |
|
|
111 |
}); |
|
|
112 |
}); |
|
|
113 |
</script> |
|
|
114 |
</body> |
|
|
115 |
</html> |