front_idill/src/index.html
author bastiena
Thu, 24 May 2012 10:30:05 +0200
changeset 33 2d9b15f99b4e
parent 32 4003f84cd349
child 35 4267d6d27a7d
permissions -rw-r--r--
Front IDILL : search by curves added search by type added notifications added timeline improved
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     1
<!--
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     2
/*
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     3
* This file is part of the TraKERS\Front IDILL package.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     4
*
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     5
* (c) IRI <http://www.iri.centrepompidou.fr/>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     6
*
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     7
* For the full copyright and license information, please view the LICENSE
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     8
* file that was distributed with this source code.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
     9
*/
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    10
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    11
/*
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    12
 * Projet : TraKERS
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    13
 * Module : Front IDILL
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    14
 * Fichier : index.html
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    15
 * 
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    16
 * Auteur : alexandre.bastien@iri.centrepompidou.fr
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    17
 * 
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    18
 * Fonctionnalités : Centralise les différents éléments du Front IDILL, tels que les classes javascript, les fonctions jQuery, les css.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    19
 */
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    20
-->
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    21
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    22
<!doctype html>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    23
<html>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    24
    <head>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    25
        <!-- On inclut les styles et les scripts utilisés. -->
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    26
        <title>IDILL</title>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    27
        <meta charset="UTF-8" />
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    28
        <link rel="stylesheet" type="text/css" href="./mosaic/css/reset.css" />
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    29
        <link rel="stylesheet/less" type="text/css" href="./mosaic/css/mosaic.less" />
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    30
        <script type="text/javascript" src="../lib/less-1.3.0.min.js"></script>
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    31
        <script type="text/javascript" src="../lib/underscore-min.js"></script>
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    32
        <script type="text/javascript" src="../lib/jquery.min.js"></script>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    33
        <script type="text/javascript" src="./mosaic/js/mosaic.js"></script>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    34
        <script type="text/javascript" src="./mosaic/js/localMosaic.js"></script>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    35
		<script type="text/javascript" src="./player/metadataplayer/LdtPlayer-core.js"></script>
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    36
		<script type="text/javascript" src="../lib/paper.js"></script>
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    37
		<link rel="stylesheet" type="text/css" href="./search/css/searchCanvas.css" />
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    38
		<script type="text/javascript" src="./search/js/searchCanvas.js"></script>
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    39
    </head>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    40
    
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    41
    <body>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    42
        <!-- Ce div stocke la mosaïque. -->
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    43
        <div id="mainPanel"></div>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    44
		<div class="player" id="video"></div>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    45
		<div class="LdtPlayer" id="LdtPlayer"></div>
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    46
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    47
        <!-- SET AN EMPTY DIV TO BE POPULATED WITH CONTENT VIA JQUERY -->
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    48
        <div class="test" style="color: #FFFFFF"></div>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    49
        
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    50
        <!-- Scripts principaux. -->
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    51
        <script type="text/javascript">
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    52
            //Longueur de la mosaïques et nombre d'images à afficher (seront importés des paramètres du Middleware).
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    53
            var length = 5, imagesToShow = 20, totalImages = 23;
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    54
            //Temps de chargement du prezoom en ms (seront importés des paramètres du Middleware).
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    55
            var timePrezoom = 500, timePreUnzoom = 200, timeZoom = 500, timeUnzoom = 400;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    56
            var timeNeighbourGlowing = 1000, timeNeighbourUnglowing = 1000, timeMovingToNeighbour = 1000;
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    57
			var timeSearchFade = 2000;
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    58
			var timeNotifyFade = 2000;
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    59
            var zoomPercentage = 0.80, prezoomPercentage = 0.25;
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    60
            var zoomedMargin = 42;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    61
            //On instancie la mosaïque.
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    62
            var mos = new mosaic(length, imagesToShow, totalImages, zoomPercentage, prezoomPercentage, zoomedMargin);
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    63
            //On spécifie les attributs de temps.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    64
            mos.zoomTime = timeZoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    65
            mos.unzoomTime = timeUnzoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    66
            mos.preZoomTime = timePrezoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    67
            mos.preUnzoomTime = timePreUnzoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    68
            mos.timeNeighbourGlowing = timeNeighbourGlowing;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    69
            mos.timeNeighbourUnglowing = timeNeighbourUnglowing;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    70
            mos.timeMovingToNeighbour = timeMovingToNeighbour;
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    71
			mos.timeSearchFade = timeSearchFade;
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    72
			mos.timeNotifyFade = timeNotifyFade;
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    73
            //On instancie une mosaïque locale pour le zoom total (pas encore implémenté).
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    74
            //var lMos = new localMosaic(length, imagesToShow, zoomedMargin);
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    75
            //mos.localMos = lMos;
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    76
            //Tableau d'images de test pour peupler la mosaïque.
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    77
            /*var imgs = [];
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    78
            for(var i = 0 ; i < 42 ; i++)
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    79
			{
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    80
                imgs[i] = i + '.jpg';
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    81
			}*/
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    82
            
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    83
            //Si on a changé les dimensions de la fenêtre, on raffraichit la mosaïque.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    84
            $(window).resize(function ()
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    85
            {
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    86
                mos.loadMosaic();
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    87
            });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    88
            
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    89
            //Si la page a chargé, on raffraichit la mosaïque.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    90
            $(document).ready(function ()
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    91
            {
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    92
                mos.loadMosaic();
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
    93
				//mos.newSearch();
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    94
                
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    95
                $('.snapshotDivs').mouseenter(function ()
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    96
                {
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    97
                    //On effectue un prézoom dès qu'on va sur une image.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    98
                    mos.preZoom($(this));
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    99
                });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   100
                $('body').keypress(function (event)
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   101
                {
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   102
					//Sinon si on a appuyé sur 's' ou 'S'.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   103
					if(event.which == 103 || event.which == 71)
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
   104
					{
33
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   105
						//Si on est déjà en recherche par courbes.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   106
						if(mos.currentMode == "SEARCH" || mos.currentMode == "FILTER")
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   107
						{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   108
							//On quitte cette recherche.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   109
							mos.leaveSearch();
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   110
							//Si on était en mode recherche.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   111
							if(mos.currentMode == "SEARCH")
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   112
							{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   113
								//On revient dans la vidéo.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   114
								mos.currentMode = "VIDEO";
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   115
							}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   116
							else
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   117
							{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   118
								//Sinon c'est qu'on était dans la mosaïque.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   119
								mos.currentMode = "MOSAIC";
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   120
							}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   121
						}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   122
						else
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   123
						{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   124
							//Si on est en plein écran.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   125
							if(mos.fullscreen)
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   126
							{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   127
								//On entre en mode recherche.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   128
								mos.currentMode = "SEARCH";
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   129
							}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   130
							//Sinon.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   131
							else
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   132
							{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   133
								//On entre en mode filtrage.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   134
								mos.currentMode = "FILTER";
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   135
							}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   136
							
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   137
							mos.startSearch();
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   138
						}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   139
					}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   140
					//Si c'est a ou A.
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   141
					else if(event.which == 65 || event.which == 97)
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   142
					{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   143
						if(!mos.helpDisplayed)
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   144
						{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   145
							mos.notifyHelp();
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   146
						}
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   147
						else
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   148
						{
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   149
							mos.removeHelp();
2d9b15f99b4e Front IDILL :
bastiena
parents: 32
diff changeset
   150
						}
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
   151
					}
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   152
                });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   153
            });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   154
        </script>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   155
    </body>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   156
</html>