front_idill/src/index.html
author bastiena
Mon, 14 May 2012 17:20:35 +0200
changeset 32 4003f84cd349
parent 31 2c7fc855eba8
child 33 2d9b15f99b4e
permissions -rw-r--r--
Front IDILL : Player implemented and was mostly tested, still memory leaks.
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>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    31
        <script type="text/javascript" src="../lib/jquery.min.js"></script>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    32
        <script type="text/javascript" src="./mosaic/js/mosaic.js"></script>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    33
        <script type="text/javascript" src="./mosaic/js/localMosaic.js"></script>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    34
		<script type="text/javascript" src="./player/metadataplayer/LdtPlayer-core.js"></script>
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    35
    </head>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    36
    
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    37
    <body>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    38
        <!-- Ce div stocke la mosaïque. -->
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    39
        <div id="mainPanel"></div>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    40
		<div class="player" id="video"></div>
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    41
		<div class="LdtPlayer" id="LdtPlayer"></div>
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    42
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    43
        <!-- SET AN EMPTY DIV TO BE POPULATED WITH CONTENT VIA JQUERY -->
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    44
        <div class="test" style="color: #FFFFFF"></div>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    45
        
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    46
        <!-- Scripts principaux. -->
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    47
        <script type="text/javascript">
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    48
            //Longueur de la mosaïques et nombre d'images à afficher (seront importés des paramètres du Middleware).
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    49
            var length = 7, imagesToShow = 42;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    50
            //Temps de chargement du prezoom en ms (seront importés des paramètres du Middleware).
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    51
            var timePrezoom = 500, timePreUnzoom = 200, timeZoom = 500, timeUnzoom = 400;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    52
            var timeNeighbourGlowing = 1000, timeNeighbourUnglowing = 1000, timeMovingToNeighbour = 1000;
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    53
            var zoomPercentage = 0.80, prezoomPercentage = 0.25;
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    54
            var zoomedMargin = 42;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    55
            //On instancie la mosaïque.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    56
            var mos = new mosaic(length, imagesToShow, zoomPercentage, prezoomPercentage, zoomedMargin);
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    57
            //On spécifie les attributs de temps.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    58
            mos.zoomTime = timeZoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    59
            mos.unzoomTime = timeUnzoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    60
            mos.preZoomTime = timePrezoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    61
            mos.preUnzoomTime = timePreUnzoom;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    62
            mos.timeNeighbourGlowing = timeNeighbourGlowing;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    63
            mos.timeNeighbourUnglowing = timeNeighbourUnglowing;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    64
            mos.timeMovingToNeighbour = timeMovingToNeighbour;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    65
            //On instancie une mosaïque locale pour le zoom total (pas encore implémenté).
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    66
            var lMos = new localMosaic(length, imagesToShow, zoomedMargin);
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    67
            mos.localMos = lMos;
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    68
            //Tableau d'images de test pour peupler la mosaïque.
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    69
            /*var imgs = [];
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    70
            for(var i = 0 ; i < 42 ; i++)
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    71
			{
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    72
                imgs[i] = i + '.jpg';
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    73
			}*/
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    74
            
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    75
            //Si on a changé les dimensions de la fenêtre, on raffraichit la mosaïque.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    76
            $(window).resize(function ()
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    77
            {
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    78
                mos.loadMosaic();
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    79
            });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    80
            
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    81
            //Si la page a chargé, on raffraichit la mosaïque.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    82
            $(document).ready(function ()
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    83
            {
32
4003f84cd349 Front IDILL :
bastiena
parents: 31
diff changeset
    84
                mos.loadMosaic();
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    85
                
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    86
                $('.snapshotDivs').mouseenter(function ()
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    87
                {
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    88
                    //On effectue un prézoom dès qu'on va sur une image.
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    89
                    mos.preZoom($(this));
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    90
                });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    91
                $('body').keypress(function (event)
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    92
                {
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    93
                    //Si on a appuié sur la touche 'q' ou 'Q';
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    94
                    if(event.which == 113 || event.which == 81)
31
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    95
					{
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    96
                       mos.unzoom();
2c7fc855eba8 FRONT IDILL :
bastiena
parents: 30
diff changeset
    97
					}
30
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    98
                });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
    99
            });
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   100
        </script>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   101
    </body>
45c889eae324 Front IDILL :
bastiena
parents:
diff changeset
   102
</html>