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