front_idill/src/mosaic/js/notifications.js
author bastiena
Fri, 14 Sep 2012 11:06:53 +0200
changeset 93 417d4b573bc8
parent 85 b244a7bc0844
child 95 63aaf895ea3a
permissions -rw-r--r--
Front IDILL: credits updated with a second footer part
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     1
/*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     2
* This file is part of the TraKERS\Front IDILL package.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     3
*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     4
* (c) IRI <http://www.iri.centrepompidou.fr/>
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     5
*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     6
* For the full copyright and license information, please view the LICENSE
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     7
* file that was distributed with this source code.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     8
*/
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     9
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    10
/*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    11
 * Projet : TraKERS
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    12
 * Module : Front IDILL
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    13
 * Fichier : notifications.js
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    14
 * 
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    15
 * Auteur : alexandre.bastien@iri.centrepompidou.fr
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    16
 * 
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    17
 * Fonctionnalités : Définit les fonctions de notification (images apparaissant en haut de la fenêtre).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    18
 */
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    19
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    20
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    21
 * Affiche l'aide.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    22
 * Est appelé dans les fichiers :
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    23
 * mosaic > fonctions manageControlEvents et onMouseDown.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    24
 * curvesDetector > fonction updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    25
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    26
Mosaic.prototype.notifyHelp = function(inMosaic)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    27
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    28
    //Si elle est déjà affichée on quitte.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    29
    if(this.helpDisplayed)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    30
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    31
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    32
    }
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    33
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    34
    //On enlève les autres notifications.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    35
    this.removeNotifications();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    36
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    37
    //On indique qu'elle est affiché.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    38
    this.helpDisplayed = true;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    39
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    40
    //Section des courbes de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    41
    var search_2hands_tab;
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    42
    var search_2hands_tab_text;
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    43
    //Section des recherches corporelles.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    44
    var search_body_tab;
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    45
    var search_body_tab_text;
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    46
    //Section des actions de contrôle sur l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    47
    var controls_1hand_tab;
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    48
    var controls_1hand_tab_text;
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    49
    //Opacités (indique si elles sont actuellement implémentées).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    50
    var search_2hands_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    51
    var search_body_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    52
    var controls_1hand_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    53
    var controls_1hand_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    54
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    55
    //Dossier contenant les images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    56
    var img_directory = './pictos/help/';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    57
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    58
    //Si on est en mode d'intéraction souris, la recherche corporelle se fait par des courbes. On les regroupes donc dans la section des courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    59
    if(this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    60
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    61
        search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave', 'chute', 'knee_up', 'jump', 'bend'];
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    62
        search_2hands_tab_text = ['no-motion', 'contact', 'grand-jete', 'screw', 'arc', 'circle', 'up-down', 'wave', 'fall', 'knee-up', 'jump', 'bend'];
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    63
        search_2hands_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    64
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    65
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    66
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    67
        search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave'];
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    68
        search_2hands_tab_text = ['no-motion', 'contact', 'grand-jete', 'screw', 'arc', 'circle', 'up-down', 'wave'];
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    69
        search_body_tab = ['chute', 'knee_up', 'jump', 'bend'];
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    70
        search_body_tab_text = ['fall', 'knee-up', 'jump', 'bend'];
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
    71
        search_2hands_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1];
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    72
        search_body_tab_opacities = [1, 1, 1, 1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    73
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    74
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    75
    //Dans la mosaique, on ne peut que sélectionner un snapshot.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    76
    if(inMosaic)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    77
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    78
        controls_1hand_tab = ['selection'];
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    79
        controls_1hand_tab_text = ['controls_selection'];
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    80
        controls_1hand_tab_opacities = [1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    81
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    82
    //Dans une vidéo, on peut aller d'un voisin à l'autre, bouger dans la timeline, dézoomer et swiper d'un marqueur à l'autre.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    83
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    84
    {
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    85
		if(this.config.mouseInteractions)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    86
		{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    87
			controls_1hand_tab = ['deplacer', 'move_down', 'move_up', 'move_right', 'move_left'];
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    88
			controls_1hand_tab_text = ['controls_timeline', 'controls_move_down', 'controls_move_up', 'controls_move_right', 'controls_move_left'];
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    89
			controls_1hand_tab_opacities = [1, 1, 1, 1, 1];
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    90
		}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    91
		else
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    92
		{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    93
			controls_1hand_tab = ['deplacer', 'precedent', 'suivant', 'mosaique_horizontal', 'mosaique_vertical', 'move_down', 'move_up', 'move_right', 'move_left'];
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
    94
			controls_1hand_tab_text = ['controls_timeline', 'controls_previous', 'controls_next', 'controls_mos_horizontal', 'controls_mos_vertical', 'controls_move_down', 'controls_move_up', 'controls_move_right', 'controls_move_left'];
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    95
			controls_1hand_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1];
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
    96
		}
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    97
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    98
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    99
    //Colonne de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   100
    //Titre de la colonne de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   101
    var search_title = "<div id='search_title'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   102
    //Image de la colonne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   103
    var search_img = "<div id='search_img' class='notify_imgs'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   104
    //Sous-titre.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   105
    var search_2hands_text = "<div id='search_2hands_text'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   106
    //Images de recherche par courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   107
    var search_2hands_imgs = "<div id='search_2hands_imgs' class='notify_imgs_big'>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   108
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   109
    //On crée les images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   110
    for(var i = 0 ; i < search_2hands_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   111
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   112
        search_2hands_imgs += "<div id='2hands_" + search_2hands_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_2hands_tab_opacities[i] + ";'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   113
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   114
    search_2hands_imgs += "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   115
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   116
    //Sous-titre de la zone de recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   117
    var search_body_text;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   118
    //Images de recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   119
    var search_body_imgs;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   120
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   121
    //Si on est en mode Kinect.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   122
    if(!this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   123
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   124
        //On crée le texte et les images de la recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   125
        search_body_text = "<div id='search_body_text'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   126
        search_body_imgs = "<div id='search_body_imgs' class='notify_imgs'>"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   127
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   128
        for(var i = 0 ; i < search_body_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   129
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   130
            search_body_imgs += "<div id='body_" + search_body_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_body_tab_opacities[i] + ";'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   131
        }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   132
        search_body_imgs += "</div>";
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   133
		
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   134
		//On ajoute ce qu'il faut pour quitter l'aide.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   135
		
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   136
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   137
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   138
    //Titre de la colonne des actions de contrôle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   139
    var controls_title = "<div id='controls_title'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   140
    //Image de la colonne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   141
    var controls_img = "<div id='controls_img' class='notify_imgs'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   142
    //Sous-titre de la zone de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   143
    var controls_1hand_text = "<div id='controls_1hand_text'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   144
    //Images des actions de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   145
    var controls_1hand_imgs;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   146
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   147
    controls_1hand_imgs = "<div id='controls_1hand_imgs' class='notify_imgs'>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   148
    for(var i = 0 ; i < controls_1hand_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   149
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   150
        controls_1hand_imgs += "<div id='1hand_" + controls_1hand_tab[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities[i] + ";'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   151
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   152
    controls_1hand_imgs += "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   153
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   154
    //Colonne de recherche du panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   155
    var help_search;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   156
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   157
    //Dans le mode d'intéraction souris, les gestures de recherche corporelles ont été intégrées aux courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   158
    if(this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   159
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   160
        help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   161
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   162
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   163
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   164
        help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + search_body_text + search_body_imgs + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   165
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   166
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   167
    //Colonne de contrôle du panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   168
    var help_controls;
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   169
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   170
    help_controls = "<div id='help_controls'>" + controls_title + controls_img + controls_1hand_text + controls_1hand_imgs + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   171
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   172
    //Panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   173
    var notification_help = "<div id='notify_help'>" + help_search + "<div id='help_sep'></div>" + help_controls + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   174
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   175
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   176
    $('body').append(notification_help);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   177
    
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   178
	var notify_imgs_width = $('#notify_imgs_small').css('margin-leftf')
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   179
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   180
	$('.notify_imgs').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   181
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   182
		width: $('#notify_imgs_small')
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   183
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   184
	
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   185
	if(this.isTablet)
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   186
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   187
		//On rétrécit certaines images si on est sur une tablette.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   188
		$('#search_img, #controls_img').css(
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   189
		{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   190
			height: 150,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   191
			'background-size': '150px 150px'
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   192
		});
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   193
		
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   194
		$('.notify_imgs_small').css(
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   195
		{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   196
			height: 80,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   197
			width: 80,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   198
			'background-size': '80px 80px'
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   199
		});
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   200
		
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   201
		//On ajoute l'icone de sortie.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   202
		this.exitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   203
	}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   204
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   205
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   206
    var notify_width = $(window).width(), notify_height = $(window).height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   207
    var notify_margin = parseInt($('#notify_help').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   208
    var notify_ = 10;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   209
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   210
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   211
    $('#notify_help').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   212
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   213
        left: "0px",
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   214
        top: "0px",
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   215
        width: notify_width - notify_margin * 2,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   216
        height: notify_height - notify_margin * 2,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   217
        'z-index': 1000
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   218
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   219
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   220
    //Position horizontale du séparateur de colonnes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   221
    var sep_left = $('#help_sep').position().left;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   222
    //Marge du panneau d'aide.
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   223
    var help_margin = parseInt($('#notify_help').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   224
    //On calcule la taille d'une zone de recherche (une des deux parties).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   225
    var help_column_width = sep_left - help_margin;
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   226
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   227
    //Taille des marges des images.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   228
    var margins = parseInt($('.notify_imgs_small').css('margin-left'));
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   229
    //Largeur des images.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   230
    var widths = help_column_width / 5 - 4 * margins * 2;// $('.notify_imgs_small').width();
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   231
    //Hauteur des images.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   232
    var heights = widths;//$('.notify_imgs_small').height();
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   233
    
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   234
	$('.notify_imgs_small').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   235
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   236
		width: widths,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   237
		height: heights,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   238
		'background-size': widths + 'px ' + heights + 'px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   239
		'font-size': widths / 5 + 'px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   240
		'padding-left': '0px'
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   241
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   242
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   243
    //Longueur d'une image.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   244
    var img_width = (margins * 2 + widths);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   245
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   246
    //On récupère le nombre d'images affichables horizontalement pour les gestures de recherche à deux mains dans une des parties de l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   247
    var search_2hands_n_imgs = Math.floor(help_column_width / img_width);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   248
    //Calcul du padding-left de cette section.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   249
    var search_2hands_padding_left = (help_column_width - search_2hands_n_imgs * img_width) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   250
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   251
    //On positionne la section de recherche par courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   252
    $('#search_2hands_imgs').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   253
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   254
        'padding-left': search_2hands_padding_left,
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   255
        'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin-left')))
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   256
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   257
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   258
    //On récupère le nombre d'images affichables horizontalement pour les gestures de recherche corporelles dans une des parties de l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   259
    var search_body_n_imgs = Math.floor(help_column_width / img_width);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   260
    //Calcul du padding-left de cette section.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   261
    var search_body_padding_left = (help_column_width - search_body_n_imgs * img_width) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   262
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   263
    //On positionne la section de recherche par gestures corporelles.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   264
    $('#search_body_imgs').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   265
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   266
        'padding-left': search_body_padding_left,
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   267
        'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin-left')))
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   268
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   269
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   270
    //On récupère le nombre d'images affichables horizontalement pour les gestures de controle dans une des parties de l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   271
    var controls_1hand_n_imgs = Math.floor(help_column_width / img_width);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   272
    //Calcul du padding-left de cette section.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   273
    var controls_1hand_padding_left = (help_column_width - controls_1hand_n_imgs * img_width) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   274
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   275
    //On potisionne la section des actions de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   276
    $('#controls_1hand_imgs').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   277
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   278
        'padding-left': controls_1hand_padding_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   279
        'height': ($('.notify_imgs_small').height())
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   280
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   281
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   282
    //Longueur de la colonne de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   283
    var search_width = $('#help_search').width();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   284
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   285
    $('#search_title').html(this.helpText.search_title);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   286
    var MI = '';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   287
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   288
    //Le texte de recherche et les images changent en fonction du mode d'intéraction (souris/Kinect).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   289
    if(this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   290
    {
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   291
		if(this.isTablet)
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   292
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   293
			$('#search_2hands_text').html(this.helpText.search_touch_text);
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   294
		}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   295
		else
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   296
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   297
			$('#search_2hands_text').html(this.helpText.search_mouse_text);
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   298
		}
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   299
        MI = 'MI/';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   300
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   301
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   302
    {
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   303
        $('#search_2hands_text').html(this.helpText.search_2hands_text);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   304
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   305
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   306
    //On affecte les images pour la recherche par courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   307
    for(var i = 0 ; i < search_2hands_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   308
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   309
        $("#2hands_" + search_2hands_tab[i]).css("background-image", "url('" + img_directory + MI + search_2hands_tab[i] + ".png')");
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   310
		$("#2hands_" + search_2hands_tab[i]).html(this.notificationStrings[search_2hands_tab_text[i]]);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   311
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   312
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   313
    //Si on est en mode Kinect, on affecte les images de recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   314
    if(!this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   315
    {
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   316
        $('#search_body_text').html(this.helpText.search_body_text);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   317
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   318
        for(var i = 0 ; i < search_body_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   319
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   320
            $("#body_" + search_body_tab[i]).css("background-image", "url('" + img_directory + search_body_tab[i] + ".png')");
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   321
			$("#body_" + search_body_tab[i]).html(this.notificationStrings[search_body_tab_text[i]]);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   322
        }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   323
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   324
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   325
    //Actions de contrôle de l'interface.
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   326
    $('#controls_title').html(this.helpText.controls_title);
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   327
	
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   328
	if(this.config.mouseInteractions)
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   329
	{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   330
		if(this.isTablet)
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   331
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   332
			$('#controls_1hand_text').html(this.helpText.controls_touch_text);
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   333
		}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   334
		else
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   335
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   336
			$('#controls_1hand_text').html(this.helpText.controls_mouse_text);
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   337
		}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   338
	}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   339
	else
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   340
	{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   341
		$('#controls_1hand_text').html(this.helpText.controls_1hand_text);
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   342
	}
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   343
    
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   344
	//On affecte les images des actions de contrôle de l'interface.
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   345
	for(var i = 0 ; i < controls_1hand_tab.length ; i++)
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   346
	{
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   347
		$("#1hand_" + controls_1hand_tab[i]).css("background-image", "url('" + img_directory + controls_1hand_tab[i] + ".png')");
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   348
		$("#1hand_" + controls_1hand_tab[i]).html(this.helpText[controls_1hand_tab_text[i]]);
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   349
	}
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   350
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   351
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   352
    $('#notify_help').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   353
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   354
        opacity: "1"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   355
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   356
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   357
    $('.notify_imgs_big').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   358
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   359
        opacity: "1"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   360
    });
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   361
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   362
	//Si on est en mode d'interaction souris, on rajoute les détails.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   363
	/*if(this.mouseInteractions)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   364
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   365
		//Dimensions des flèches.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   366
		var arrowWidth = 50, arrowHeight = 50;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   367
		
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   368
		//On ajoute les flèches pour accéder aux détails du panneau d'aide.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   369
		var help_details_arrows = "<div id='help_details_upArrow' class='help_details_arrows'></div><div id='help_details_downArrow' class='help_details_arrows'></div>";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   370
		
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   371
		notify_help.append(help_details_arrows);
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   372
		
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   373
		$('#help_details_upArrow').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   374
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   375
			top: 0,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   376
			left: notify_help.width() / 2 - arrowWidth / 2
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   377
		});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   378
		$('#help_details_downArrow').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   379
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   380
			top: $('#notify_help').height() - arrowHeight,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   381
			left: notify_help.width() / 2 - arrowWidth / 2
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   382
		});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
   383
	}*/
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   384
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   385
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   386
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   387
 * Supprime l'aide.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   388
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   389
 * pointers > fonction detectIdlePointers.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   390
 * mosaic > fonction manageControlEvents et onClick.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   391
 * curvesDetector > fonction updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   392
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   393
Mosaic.prototype.removeHelp = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   394
{
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   395
	// console.trace();
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   396
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   397
    //Si l'aide n'est pas affichée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   398
    if(!this.helpDisplayed)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   399
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   400
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   401
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   402
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   403
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   404
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   405
    //On fait disparaître l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   406
    $('#notify_help').fadeOut(this.timeNotifyFade, function()
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   407
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   408
        //On indique que l'aide n'est plus affichée, et on détruit le panneau.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   409
        _this.helpDisplayed = false;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   410
        _this.canNotifyHelp = true;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   411
        $('#notify_help').remove();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   412
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   413
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   414
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   415
/*
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   416
 * Affichage de la notification de sélection & recherche dans la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   417
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   418
 * zoomInteractions > fonctions preUnzoom et unzoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   419
 * mosaic > fonction showNImages.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   420
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   421
Mosaic.prototype.mosaicSelectionAndSearch = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   422
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   423
    //Si on n'est pas en mode mosaic, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   424
    if(this.currentMode != 'MOSAIC')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   425
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   426
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   427
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   428
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   429
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   430
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   431
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   432
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   433
	//On calcule leurs dimensions.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   434
	var notify_width, notify_height, notify_margin;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   435
	var selection_left, search_left;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   436
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   437
	if(this.config.mouseInteractions)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   438
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   439
		//On ajoute à la mosaïque seulement la recherche.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   440
		$('body').append(notification_search);
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   441
		notify_margin = parseInt($('.notifications').css('margin-left'));
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   442
		notify_width = $('.notifications').width();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   443
		notify_height = $('.notifications').height();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   444
		//On calcule leurs coordonnées.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   445
		search_left = ($(window).width() / 2 - notify_width / 2 - notify_margin);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   446
		var img = $('#notify_search').css('background-image');
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   447
		if(this.isTablet)
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   448
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   449
			$('#notify_search').css('background-image', img.replace('notifications/', 'notifications/TI/'));
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   450
		}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   451
		else
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   452
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   453
			$('#notify_search').css('background-image', img.replace('notifications/', 'notifications/MI/'));
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   454
		}
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   455
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   456
	else
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   457
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   458
		//On les ajoute à la mosaïque.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   459
		$('body').append(notification_selection + notification_search);
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   460
		notify_margin = parseInt($('.notifications').css('margin-left'));
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   461
		notify_width = $('.notifications').width();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   462
		notify_height = $('.notifications').height();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   463
		//On calcule leurs coordonnées.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   464
		selection_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   465
		search_left = selection_left + notify_width + notify_margin;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   466
		
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   467
		this.putText($('#notify_selection'), this.notificationStrings.select);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   468
		
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   469
		$('#notify_selection').css(
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   470
		{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   471
			left: selection_left
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   472
		});
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   473
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   474
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   475
	this.putText($('#notify_search'), this.notificationStrings.search);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   476
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   477
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   478
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   479
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   480
        left: search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   481
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   482
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   483
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   484
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   485
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   486
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   487
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   488
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   489
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   490
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   491
 * Affichage de la notification de sélection dans la mosaïque.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   492
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   493
 * zoomInteractions > fonction preZoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   494
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   495
Mosaic.prototype.mosaicSelection = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   496
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   497
    //Si on n'est pas en mode mosaic, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   498
    if(this.currentMode != 'MOSAIC')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   499
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   500
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   501
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   502
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   503
    //On spécifie la notification en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   504
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   505
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   506
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   507
    $('body').append(notification_selection);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   508
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   509
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   510
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   511
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   512
    var selection_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   513
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   514
	if(this.config.mouseInteractions)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   515
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   516
		var img = $('#notify_selection').css('background-image');
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   517
		$('#notify_selection').css('background-image', img.replace('notifications/', 'notifications/MI/'));
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   518
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   519
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   520
	this.putText($('#notify_selection'), this.notificationStrings.confirm);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   521
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   522
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   523
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   524
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   525
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   526
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   527
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   528
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   529
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   530
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   531
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   532
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   533
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   534
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   535
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   536
 * Affichage de la notification de recherche dans une demande de filtrage de la mosaïque.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   537
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   538
 * pointers > fonction launchIdlePointers.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   539
 * zoomInteractions > fonction preUnzoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   540
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   541
Mosaic.prototype.filterSearch = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   542
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   543
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   544
    if(this.currentMode != 'FILTER' || this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   545
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   546
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   547
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   548
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   549
    //On spécifie la notification en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   550
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   551
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   552
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   553
    $('body').append(notification_search);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   554
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   555
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   556
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   557
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   558
    var search_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   559
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   560
	if(this.config.mouseInteractions)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   561
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   562
		var img = $('#notify_search').css('background-image');
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   563
		
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   564
		if(this.isTablet)
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   565
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   566
			$('#notify_search').css('background-image', img.replace('notifications/', 'notifications/TI/'));
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   567
		}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   568
		else
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   569
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   570
			$('#notify_search').css('background-image', img.replace('notifications/', 'notifications/MI/'));
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   571
		}
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   572
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   573
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   574
	this.putText($('#notify_search'), this.notificationStrings.search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   575
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   576
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   577
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   578
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   579
        left: search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   580
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   581
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   582
    //On la fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   583
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   584
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   585
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   586
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   587
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   588
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   589
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   590
 * Affichage de la notification de recherche & sélection dans une demande de filtrage de la mosaïque.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   591
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   592
 * zoomInteractions > fonction preZoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   593
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   594
Mosaic.prototype.filterSearchAndSelection = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   595
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   596
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   597
    if(this.currentMode != 'FILTER' || this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   598
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   599
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   600
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   601
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   602
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   603
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   604
    var notification_search = "<div id='notify_search' class='notifications'></div>";
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   605
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   606
	//On les ajoute à la mosaïque.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   607
	$('body').append(notification_selection + notification_search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   608
	
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   609
	var notify_width = $('.notifications').width(), notify_height = $('.notifications').height(), notify_margin = parseInt($('.notifications').css('margin-left'));
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   610
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   611
	//On calcule leurs coordonnées.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   612
	var selection_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   613
	var search_left = selection_left + notify_width + notify_margin;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   614
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   615
	if(this.config.mouseInteractions)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   616
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   617
		var imgSel = $('#notify_selection').css('background-image');
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   618
		$('#notify_selection').css('background-image', imgSel.replace('notifications/', 'notifications/MI/'));
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   619
		
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   620
		var imgSearch = $('#notify_search').css('background-image');
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   621
		
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   622
		if(this.isTablet)
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   623
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   624
			$('#notify_search').css('background-image', imgSearch.replace('notifications/', 'notifications/TI/'));
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   625
		}
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   626
		else
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   627
		{
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   628
			$('#notify_search').css('background-image', imgSearch.replace('notifications/', 'notifications/MI/'));
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
   629
		}
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   630
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   631
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   632
	this.putText($('#notify_selection'), this.notificationStrings.confirm);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   633
	this.putText($('#notify_search'), this.notificationStrings.search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   634
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   635
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   636
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   637
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   638
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   639
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   640
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   641
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   642
        left: search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   643
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   644
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   645
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   646
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   647
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   648
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   649
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   650
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   651
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   652
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   653
 * Affichage de la notification de résultat de gesture dans la mosaïque filtrée.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   654
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   655
 * zoomInteractions > fonction preUnzoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   656
 * mosaic > onMouseUp et manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   657
 * curvesDetector > updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   658
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   659
Mosaic.prototype.filterGesture = function(gestureName, mode)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   660
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   661
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   662
    if(this.currentMode != 'FILTER' || !this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   663
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   664
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   665
    }
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   666
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   667
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   668
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   669
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   670
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   671
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   672
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   673
    $('body').append(notification_search_1gesture);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   674
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   675
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   676
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   677
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   678
    var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   679
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   680
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   681
    {
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   682
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + (this.gestureDelRequested ? 'hover' : 'valid') + '/' + gestureName + '.png")');
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   683
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   684
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   685
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   686
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   687
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   688
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   689
	this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   690
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   691
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   692
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   693
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   694
        top: 0,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   695
        left: ($(window).width() - notify_width) / 2
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   696
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   697
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   698
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   699
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   700
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   701
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   702
    });
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   703
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   704
	if(this.isTablet)
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   705
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   706
		this.searchExitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   707
	}
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   708
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   709
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   710
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   711
 * Affichage de la notification de résultat de gesture & de sélection dans la mosaïque filtrée.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   712
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   713
 * zoomInteractions > fonction preZoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   714
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   715
Mosaic.prototype.filterGestureAndSelection = function(gestureName, mode)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   716
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   717
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   718
    if(this.currentMode != 'FILTER' || !this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   719
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   720
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   721
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   722
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   723
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   724
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   725
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   726
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   727
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   728
    $('body').append(notification_search_1gesture + notification_selection);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   729
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   730
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   731
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   732
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   733
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   734
    var selection_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   735
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   736
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   737
    {
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   738
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   739
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   740
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   741
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   742
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   743
    }
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   744
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   745
	if(this.config.mouseInteractions)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   746
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   747
		var img = $('#notify_selection').css('background-image');
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   748
		$('#notify_selection').css('background-image', img.replace('notifications/', 'notifications/MI/'));
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   749
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   750
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   751
	this.putText($('#notify_selection'), this.notificationStrings.confirm);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   752
    this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   753
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   754
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   755
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   756
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   757
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   758
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   759
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   760
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   761
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   762
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   763
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   764
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   765
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   766
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   767
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   768
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   769
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   770
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   771
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   772
 * Affiche la notification de dezoom.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   773
 * Direction vaut left ou right.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   774
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   775
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   776
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   777
Mosaic.prototype.videoSwipe = function(direction)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   778
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   779
    //Si on n'est pas en mode video ou qu'on n'est pas en train d'effectuer un swipe, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   780
    if(this.currentMode != 'VIDEO' || !this.isSwipe)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   781
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   782
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   783
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   784
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   785
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   786
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   787
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   788
    var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   789
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   790
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   791
    $('body').append(notification_swipe);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   792
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   793
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   794
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   795
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   796
    var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   797
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   798
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   799
    
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
   800
	if(direction == "left")
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   801
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   802
		this.putText($('#notify_swipe'), this.notificationStrings.next);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   803
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   804
	else
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   805
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   806
		this.putText($('#notify_swipe'), this.notificationStrings.previous);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   807
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   808
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   809
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   810
    $('#notify_swipe').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   811
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   812
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   813
        left: -notifyLeft + ($(window).width() - notify_width - notify_margin) / 2,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   814
        'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   815
    });
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   816
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   817
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   818
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   819
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   820
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   821
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   822
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   823
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   824
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   825
 * Affichage de la notification de résultat de move vers un voisin.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   826
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   827
 * neighbours > fonction selectNeighbour.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   828
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   829
Mosaic.prototype.videoMove = function(targetId)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   830
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   831
    //Si on n'est pas en mode video, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   832
    if(this.currentMode != 'VIDEO')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   833
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   834
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   835
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   836
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   837
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   838
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   839
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   840
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   841
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   842
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   843
    $('body').append(notification_move);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   844
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   845
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   846
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   847
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   848
    var move_left = $(window).width() / 2 - (notify_width) / 2 + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   849
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   850
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   851
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   852
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   853
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   854
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   855
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   856
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   857
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   858
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   859
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   860
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   861
	this.putText($('#notify_move'), this.notificationStrings.move);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   862
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   863
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   864
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   865
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   866
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   867
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   868
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   869
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   870
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   871
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   872
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   873
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   874
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   875
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   876
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   877
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   878
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   879
 * Affichage de la notification de résultat de move vers un voisin & de dézoom dans une vidéo.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   880
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   881
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   882
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   883
Mosaic.prototype.videoMoveAndUnzoom = function(targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   884
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   885
    //Si on n'est pas en mode video, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   886
    if(this.currentMode != 'VIDEO')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   887
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   888
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   889
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   890
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   891
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   892
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   893
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   894
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   895
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   896
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   897
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   898
    $('body').append(notification_move + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   899
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   900
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   901
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   902
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   903
    var move_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   904
    var unzoom_left = move_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   905
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   906
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   907
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   908
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   909
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   910
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   911
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   912
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   913
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   914
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   915
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   916
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   917
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   918
	this.putText($('#notify_move'), this.notificationStrings.move);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   919
	this.putText($('#notify_unzoom'), this.notificationStrings.unzoom);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   920
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   921
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   922
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   923
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   924
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   925
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   926
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   927
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   928
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   929
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   930
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   931
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   932
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   933
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   934
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   935
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   936
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   937
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   938
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   939
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   940
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   941
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   942
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   943
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   944
 * Affichage de la notification de résultat de dézoom dans une vidéo.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   945
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   946
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   947
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   948
Mosaic.prototype.videoUnzoom = function(targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   949
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   950
    //Si on n'est pas en mode video, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   951
    if(this.currentMode != 'VIDEO')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   952
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   953
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   954
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   955
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   956
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   957
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   958
    //On spécifie la notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   959
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   960
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   961
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   962
    $('body').append(notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   963
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   964
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   965
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
   966
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   967
    var unzoom_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   968
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   969
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   970
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   971
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   972
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   973
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   974
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   975
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   976
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   977
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   978
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   979
	this.putText($('#notify_unzoom'), this.notificationStrings.unzoom);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
   980
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   981
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   982
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   983
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   984
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   985
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   986
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   987
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   988
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   989
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   990
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   991
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   992
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   993
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   994
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   995
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   996
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   997
 * Affichage de la notification de timeline dans une vidéo/recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   998
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   999
 * pointers > fonction pointersTimelineSelection.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1000
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1001
Mosaic.prototype.timelineTimeline = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1002
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1003
    //Si on n'est pas en mode timeline, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1004
    if(this.currentMode != 'TIMELINE')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1005
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1006
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1007
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1008
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1009
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1010
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1011
    //On spécifie la notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1012
    var notification_timeline = "<div id='notify_timeline' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1013
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1014
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1015
    $('body').append(notification_timeline);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1016
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1017
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1018
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1019
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1020
    var timeline_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1021
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1022
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1023
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1024
	this.putText($('#notify_timeline'), this.notificationStrings.timeline);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1025
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1026
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1027
    $('#notify_timeline').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1028
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1029
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1030
        left: -notifyLeft + timeline_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1031
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1032
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1033
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1034
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1035
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1036
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1037
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1038
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1039
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1040
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1041
 * Affichage de la notification de recherche dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1042
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1043
 * neighbours > fonction deselectNeighbour.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1044
 * pointers > fonction launchIdlePointers.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1045
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1046
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1047
Mosaic.prototype.searchSearch = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1048
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1049
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1050
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1051
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1052
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1053
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1054
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1055
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1056
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1057
    //On spécifie la notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1058
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1059
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1060
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1061
    $('body').append(notification_search);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1062
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1063
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1064
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1065
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1066
    var search_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1067
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1068
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1069
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1070
	this.putText($('#notify_search'), this.notificationStrings.search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1071
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1072
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1073
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1074
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1075
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1076
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1077
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1078
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1079
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1080
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1081
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1082
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1083
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1084
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1085
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1086
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1087
 * Affichage de la notification de recherche & de swipe dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1088
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1089
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1090
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1091
Mosaic.prototype.searchSearchAndSwipe = function(direction)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1092
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1093
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée ou qu'on n'est pas en train de faire un swipe, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1094
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture || !this.isSwipe)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1095
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1096
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1097
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1098
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1099
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1100
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1101
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1102
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1103
    var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1104
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1105
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1106
    $('body').append(notification_search + notification_swipe);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1107
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1108
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1109
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1110
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1111
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1112
    var swipe_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1113
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1114
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1115
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1116
	this.putText($('#notify_search'), this.notificationStrings.search);
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
  1117
	if(direction == "left")
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1118
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1119
		this.putText($('#notify_swipe'), this.notificationStrings.next);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1120
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1121
	else
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1122
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1123
		this.putText($('#notify_swipe'), this.notificationStrings.previous);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1124
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1125
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1126
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1127
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1128
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1129
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1130
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1131
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1132
    $('#notify_swipe').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1133
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1134
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1135
        left: -notifyLeft + swipe_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1136
        'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1137
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1138
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1139
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1140
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1141
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1142
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1143
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1144
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1145
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1146
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1147
 * Affichage de la notification de recherche, de move vers un voisin.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1148
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1149
 * neighbours > fonction selectNeighbour.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1150
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1151
Mosaic.prototype.searchSearchAndMove = function(targetId)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1152
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1153
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1154
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1155
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1156
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1157
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1158
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1159
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1160
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1161
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1162
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1163
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1164
    $('body').append(notification_search + notification_move);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1165
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1166
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1167
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1168
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1169
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1170
    var move_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1171
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1172
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1173
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1174
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1175
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1176
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1177
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1178
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1179
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1180
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1181
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1182
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1183
	this.putText($('#notify_search'), this.notificationStrings.search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1184
	this.putText($('#notify_move'), this.notificationStrings.move);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1185
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1186
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1187
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1188
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1189
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1190
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1191
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1192
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1193
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1194
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1195
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1196
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1197
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1198
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1199
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1200
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1201
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1202
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1203
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1204
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1205
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1206
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1207
 * Affichage de la notification de recherche, de move vers un voisin & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1208
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1209
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1210
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1211
Mosaic.prototype.searchSearchAndMoveAndUnzoom = function(targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1212
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1213
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1214
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1215
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1216
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1217
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1218
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1219
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1220
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1221
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1222
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1223
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1224
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1225
    $('body').append(notification_search + notification_move + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1226
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1227
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1228
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1229
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1230
    var search_left = $(window).width() / 2 - (notify_width * 3 + notify_margin * 4) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1231
    var move_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1232
    var unzoom_left = move_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1233
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1234
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1235
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1236
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1237
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1238
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1239
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1240
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1241
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1242
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1243
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1244
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1245
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1246
	this.putText($('#notify_search'), this.notificationStrings.search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1247
	this.putText($('#notify_move'), this.notificationStrings.move);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1248
	this.putText($('#notify_unzoom'), this.notificationStrings.unzoom);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1249
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1250
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1251
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1252
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1253
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1254
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1255
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1256
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1257
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1258
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1259
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1260
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1261
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1262
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1263
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1264
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1265
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1266
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1267
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1268
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1269
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1270
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1271
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1272
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1273
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1274
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1275
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1276
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1277
 * Affichage de la notification de recherche & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1278
 * Est appelé dans le fichier :
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1279
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1280
Mosaic.prototype.searchSearchAndUnzoom = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1281
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1282
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1283
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1284
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1285
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1286
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1287
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1288
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1289
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1290
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1291
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1292
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1293
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1294
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1295
    $('body').append(notification_search + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1296
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1297
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1298
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1299
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1300
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1301
    var unzoom_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1302
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1303
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1304
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1305
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1306
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1307
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1308
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1309
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1310
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1311
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1312
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1313
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1314
	this.putText($('#notify_search'), this.notificationStrings.search);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1315
	this.putText($('#notify_unzoom'), this.notificationStrings.unzoom);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1316
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1317
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1318
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1319
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1320
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1321
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1322
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1323
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1324
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1325
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1326
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1327
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1328
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1329
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1330
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1331
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1332
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1333
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1334
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1335
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1336
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1337
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1338
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1339
 * Affichage de la notification de résultat dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1340
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1341
 * neighbours > fonctions deselectNeighbour et moveToNeighbour.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1342
 * playerControl > fonction exitTimeline.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1343
 * zoomInteractions > fonction zoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1344
 * mosaic > fonctions onMouseUp et manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1345
 * curvesDetector > fonction updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1346
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1347
Mosaic.prototype.searchGesture = function(gestureName, mode)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1348
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1349
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1350
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1351
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1352
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1353
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1354
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1355
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1356
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1357
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1358
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1359
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1360
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1361
    $('body').append(notification_search_1gesture);
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1362
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1363
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1364
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1365
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1366
    var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1367
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1368
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1369
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1370
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1371
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1372
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1373
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1374
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1375
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1376
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1377
	this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1378
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1379
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1380
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1381
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1382
        top: 0,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1383
        left: ($(window).width() - notify_width) / 2
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1384
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1385
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1386
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1387
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1388
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1389
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1390
    });
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1391
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1392
	if(this.isTablet)
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1393
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1394
		this.searchExitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1395
	}
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1396
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1397
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1398
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1399
 * Affichage de la notification de résultat & de swipe dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1400
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1401
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1402
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1403
Mosaic.prototype.searchGestureAndSwipe = function(gestureName, mode, direction)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1404
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1405
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue ou on ne fait pas de swipe, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1406
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '' || !this.isSwipe)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1407
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1408
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1409
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1410
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1411
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1412
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1413
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1414
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1415
    var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1416
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1417
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1418
    $('body').append(notification_search_1gesture + notification_swipe);
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1419
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1420
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1421
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1422
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1423
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1424
    var swipe_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1425
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1426
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1427
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1428
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1429
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1430
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1431
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1432
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1433
    }
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1434
	
58
a28488078053 Front IDILL:
bastiena
parents: 55
diff changeset
  1435
	if(direction == "left")
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1436
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1437
		this.putText($('#notify_swipe'), this.notificationStrings.next);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1438
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1439
	else
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1440
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1441
		this.putText($('#notify_swipe'), this.notificationStrings.previous);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1442
	}
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1443
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1444
	this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1445
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1446
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1447
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1448
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1449
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1450
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1451
    $('#notify_swipe').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1452
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1453
        left: swipe_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1454
        'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1455
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1456
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1457
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1458
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1459
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1460
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1461
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1462
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1463
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1464
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1465
 * Affichage de la notification de résultat, de move vers un voisin.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1466
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1467
 * neighbours > fonction selectNeighbour.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1468
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1469
Mosaic.prototype.searchGestureAndMove = function(gestureName, mode, targetId)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1470
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1471
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1472
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1473
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1474
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1475
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1476
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1477
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1478
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1479
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1480
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1481
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1482
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1483
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1484
    $('body').append(notification_search_1gesture + notification_move);
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1485
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1486
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1487
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1488
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1489
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1490
    var move_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1491
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1492
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1493
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1494
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1495
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1496
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1497
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1498
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1499
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1500
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1501
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1502
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1503
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1504
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1505
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1506
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1507
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1508
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1509
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1510
	this.putText($('#notify_move'), this.notificationStrings.move);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1511
	this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1512
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1513
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1514
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1515
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1516
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1517
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1518
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1519
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1520
        left: move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1521
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1522
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1523
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1524
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1525
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1526
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1527
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1528
    });
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1529
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1530
	if(this.isTablet)
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1531
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1532
		this.searchExitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1533
	}
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1534
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1535
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1536
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1537
 * Affichage de la notification de résultat, de move vers un voisin & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1538
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1539
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1540
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1541
Mosaic.prototype.searchGestureAndMoveAndUnzoom = function(gestureName, mode, targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1542
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1543
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1544
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1545
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1546
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1547
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1548
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1549
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1550
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1551
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1552
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1553
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1554
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1555
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1556
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1557
    $('body').append(notification_search_1gesture + notification_move + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1558
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1559
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1560
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1561
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1562
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 3 + notify_margin * 4) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1563
    var move_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1564
    var unzoom_left = move_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1565
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1566
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1567
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1568
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1569
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1570
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1571
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1572
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1573
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1574
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1575
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1576
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1577
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1578
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1579
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1580
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1581
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1582
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1583
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1584
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1585
	this.putText($('#notify_move'), this.notificationStrings.move);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1586
	this.putText($('#notify_unzoom'), this.notificationStrings.unzoom);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1587
	this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1588
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1589
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1590
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1591
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1592
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1593
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1594
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1595
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1596
        left: move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1597
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1598
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1599
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1600
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1601
        left: unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1602
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1603
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1604
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1605
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1606
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1607
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1608
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1609
    });
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1610
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1611
	if(this.isTablet)
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1612
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1613
		this.searchExitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1614
	}
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1615
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1616
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1617
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1618
 * Affichage de la notification de résultat & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1619
 * Est appelé dans le fichier :
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1620
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1621
Mosaic.prototype.searchGestureAndUnzoom = function(gestureName, mode, targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1622
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1623
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1624
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1625
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1626
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1627
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1628
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1629
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1630
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1631
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1632
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1633
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1634
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1635
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1636
    $('body').append(notification_search_1gesture + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1637
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1638
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1639
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1640
    var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1641
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1642
    var unzoom_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1643
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1644
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1645
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1646
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1647
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1648
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1649
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1650
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1651
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1652
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1653
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1654
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1655
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1656
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1657
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1658
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1659
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1660
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1661
    
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1662
	this.putText($('#notify_unzoom'), this.notificationStrings.unzoom);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1663
	this.putText($('#notify_search_1gesture'), this.notificationStrings[gestureName]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1664
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1665
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1666
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1667
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1668
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1669
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1670
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1671
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1672
        left: unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1673
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1674
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1675
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1676
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1677
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1678
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1679
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1680
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1681
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1682
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1683
/*
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1684
 * Affichage des notifications de gestures trouvées dans une recherche par courbes.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1685
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1686
 * curvesDetector > fonction updateDists.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1687
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1688
Mosaic.prototype.curvesGestures = function(gestures)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1689
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1690
    //S'il n'y a pas de gestures à afficher.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1691
    if(gestures.length == 0)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1692
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1693
        //On ajoute une seule notification.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1694
        var notification_curves = "<div class='notifications' id='notify_curves'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1695
        $('body').append(notification_curves);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1696
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1697
        //On calcule leurs dimensions et coordonnées.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1698
        var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1699
        var notify_margin = parseInt($('.notifications').css('margin-left'));
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1700
        var curves_left = $(window).width() / 2 - (notify_width + notify_margin * 2) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1701
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1702
        $('#notify_curves').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1703
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1704
            left: curves_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1705
            'background-image': 'url("./pictos/big/normal/inconnu.png")',
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1706
            opacity: '0.9'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1707
        });
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1708
		
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1709
		this.putText($('#notify_curves'), this.notificationStrings["unknown"]);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1710
		
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1711
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1712
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1713
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1714
    //Sinon, on les met dans un tableau.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1715
    var gestures_tab = gestures.split(';');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1716
    
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1717
    var notifications_curves_gestures = "<div id='notify_curves_container'>";
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1718
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1719
    //On crée autant de notifications qu'il y a de gestures.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1720
    for(var i = 0 ; i < gestures_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1721
    {
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1722
        notifications_curves_gestures += "<div class='notification_curves' id='notify_curves_" + gestures_tab[i] + "'></div>";
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1723
    }
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1724
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1725
	notifications_curves_gestures += "</div>";
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1726
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1727
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1728
    $('body').append(notifications_curves_gestures);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1729
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1730
    //On calcule leurs dimensions.
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1731
    var notify_width = $('.notification_curves').width(), notify_height = $('.notification_curves').height();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1732
    var notify_margin = parseInt($('.notification_curves').css('margin-left'));
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1733
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1734
	//Nombre de notifications dans une ligne.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1735
	var notify_in_a_row = Math.floor($(window).width() / (+notify_width + 2 * notify_margin));
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
  1736
	//Notifications sur la première ligne.
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
  1737
	var notify_in_first_row = (gestures_tab.length > notify_in_a_row) ? notify_in_a_row : gestures_tab.length;
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1738
	//Espace libre restant sur la ligne.
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
  1739
	var free_space = $(window).width() - notify_in_first_row * (+notify_width + 2 * notify_margin);
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1740
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1741
	//On met à jour le container.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1742
	$('#notify_curves_container').css(
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1743
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1744
		height: Math.ceil(gestures_tab.length * (+notify_width + 2 * notify_margin) / $(window).width()),
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1745
		'margin-left': free_space / 2,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1746
		'margin-right': free_space / 2
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1747
	});
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1748
	
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1749
    //On calcule leurs dimensions et leur backgrounds.
79
9eff85166868 Front IDILL :
bastiena
parents: 77
diff changeset
  1750
	for(var i = 0 ; i < gestures_tab.length ; i++)
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1751
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1752
        //On va chercher leurs backgrounds.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1753
        $('#notify_curves_' + gestures_tab[i]).css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + 'normal/' + gestures_tab[i] + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1754
        
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1755
		this.putText($('#notify_curves_' + gestures_tab[i]), this.notificationStrings[gestures_tab[i]]);
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1756
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1757
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1758
    //On les fait apparaître.
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1759
    $('.notification_curves').css(
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1760
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1761
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1762
    });
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1763
}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1764
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1765
/*
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1766
 * Efface les notifications. Précède chaque notification.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1767
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1768
 * neighbours > fonctions listenToNeighbours, selectNeighbour, deselectNeighbour et moveToNeighbour.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1769
 * notifications > fonction notifyHelp.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1770
 * playerControl > fonction exitTimeline.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1771
 * pointers > fonctions pointersTimelineSelection, launchIdlePointers et removeSearchNotificationIfOnIt.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1772
 * search > fonction removeFilter.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1773
 * zoomInteractions > fonctions preZoom, preUnzoom, zoom et unzoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1774
 * mosaic > fonctions onMouseUp, showNImages et manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1775
 * curvesDetector > fonction updateDists.
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1776
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1777
Mosaic.prototype.removeNotifications = function()
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1778
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1779
    $('.notifications').remove();
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1780
    $('#notify_curves_container').remove();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1781
    $('.notification_curves').remove();
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1782
}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1783
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1784
/*
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1785
 * Place un texte sur la notification.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1786
 * Est appelé dans chaque fonction servant à notifier dans le fichier de notification.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1787
*/
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1788
Mosaic.prototype.putText = function(notification, text)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1789
{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1790
	notification.html(text);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1791
}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1792
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1793
/*
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1794
 * Affiche l'icone d'aide.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1795
 * Est appelé dans les fichiers :
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1796
 * mosaic > fonction loadMosaic.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1797
 * zoomInteractions > fonctions zoom et unzoom.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1798
*/
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1799
Mosaic.prototype.helpIcon = function()
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1800
{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1801
	this.removeHelpIcon();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1802
	//On construit le div.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1803
	var helpIcon = "<img id='helpIcon' src='./img/helpIcon.png' />";
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1804
	//On l'ajoute.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1805
	$('body').append(helpIcon);
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1806
	//On spécifie ses coordonnées.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1807
	$('#helpIcon').css(
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1808
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1809
		top: 0,
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1810
		left: $(window).width() - $('#helpIcon').width() - 2 * parseInt($('#helpIcon').css('margin-left'))
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1811
	});
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1812
}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1813
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1814
/*
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1815
 * Supprime l'icone d'aide.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1816
 * Est appelé dans les fichiers :
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1817
 * zoomInteractions > fonctions zoom et unzoom.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1818
 * notifications > fonction helpIcon.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1819
*/
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1820
Mosaic.prototype.removeHelpIcon = function()
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1821
{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1822
	this.isHelpIconZooming = false;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1823
	this.isHelpIconZoomed = false;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1824
	$('#helpIcon').remove();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1825
}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1826
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1827
/*
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1828
 * Agrandit l'icone d'aide.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1829
 * Est appelé dans le fichier :
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1830
 * mosaic > fonction onMouseMove.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1831
*/
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1832
Mosaic.prototype.showBigHelp = function()
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1833
{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1834
	//Si on a déjà zoomé on quitte.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1835
	if(this.isHelpIconZoomed || this.isHelpIconZooming)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1836
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1837
		return;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1838
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1839
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1840
	this.isHelpIconZooming = true;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1841
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1842
	var _this = this;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1843
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1844
	$('#helpIcon').animate(
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1845
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1846
		width: 100,
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1847
		height: 100,
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1848
		left: $(window).width() - 100 - 2 * parseInt($('#helpIcon').css('margin-left'))
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1849
	}, this.config.timeShowBigHelp, function()
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1850
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1851
		_this.isHelpIconZoomed = true;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1852
		_this.isHelpIconZooming = false;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1853
	});
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1854
}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1855
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1856
/*
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1857
 * Rétrecit l'icone d'aide.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1858
 * Est appelé dans le fichier :
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1859
 * mosaic > fonction onMouseMove.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1860
*/
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1861
Mosaic.prototype.showSmallHelp = function()
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1862
{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1863
	//Si on n'a pas zoomé on quitte.
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1864
	if(!this.isHelpIconZoomed || this.isHelpIconZooming)
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1865
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1866
		return;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1867
	}
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1868
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1869
	this.isHelpIconZooming = true;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1870
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1871
	var _this = this;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1872
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1873
	var helpIconWidth = $('#helpIcon').width();
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1874
	
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1875
	$('#helpIcon').animate(
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1876
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1877
		width: 50,
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1878
		height: 50,
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1879
		left: $(window).width() - 50 - 2 * parseInt($('#helpIcon').css('margin-left'))
55
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1880
	}, this.config.timeShowBigHelp, function()
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1881
	{
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1882
		_this.isHelpIconZoomed = false;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1883
		_this.isHelpIconZooming = false;
afd60399a7b5 Front IDILL :
bastiena
parents: 52
diff changeset
  1884
	});
77
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1885
}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1886
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1887
/*
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1888
 * Affiche l'icone de sortie pour tablettes.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1889
*/
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1890
Mosaic.prototype.exitIcon = function()
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1891
{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1892
	this.removeExitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1893
	//On construit le div.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1894
	var exitIcon = "<img id='exitIcon' src='./img/exitIcon.png' />";
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1895
	//On l'ajoute.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1896
	$('body').append(exitIcon);
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1897
	//On spécifie ses coordonnées.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1898
	$('#exitIcon').css(
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1899
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1900
		top: 0,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1901
		left: $(window).width() - $('#exitIcon').width() - 2 * parseInt($('#exitIcon').css('margin-left')),
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1902
		'z-index': 1000
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1903
	});
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1904
}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1905
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1906
/*
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1907
 * Supprime l'icone de sortie pour tablettes.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1908
*/
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1909
Mosaic.prototype.removeExitIcon = function()
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1910
{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1911
	$('#exitIcon').remove();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1912
}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1913
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1914
/*
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1915
 * Affiche l'icone de retour à la mosaïque pour tablettes.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1916
*/
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1917
Mosaic.prototype.homeIcon = function()
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1918
{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1919
	this.removeHomeIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1920
	//On construit le div.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1921
	var homeIcon = "<img id='homeIcon' src='./img/homeIcon.png' />";
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1922
	//On l'ajoute.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1923
	$('body').append(homeIcon);
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1924
	//On spécifie ses coordonnées.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1925
	$('#homeIcon').css(
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1926
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1927
		top: 0,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1928
		left: 0,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1929
		'z-index': 900
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1930
	});
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1931
}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1932
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1933
/*
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1934
 * Supprime l'icone de sortie pour tablettes.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1935
*/
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1936
Mosaic.prototype.removeHomeIcon = function()
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1937
{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1938
	$('#homeIcon').remove();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1939
}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1940
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1941
/*
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1942
 * Affiche l'icone de sortie de recherche pour tablettes.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1943
*/
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1944
Mosaic.prototype.searchExitIcon = function()
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1945
{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1946
	//S'il n'y a pas de notification de recherche, on s'en va.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1947
	if($('#notify_search_1gesture').length == 0)
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1948
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1949
		return;
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1950
	}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1951
	
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1952
	this.removeSearchExitIcon();
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1953
	//On construit le div.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1954
	var searchExitIcon = "<img id='searchExitIcon' src='./img/exitIcon.png' />";
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1955
	//On l'ajoute.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1956
	$('body').append(searchExitIcon);
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1957
	//On spécifie ses coordonnées.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1958
	$('#searchExitIcon').css(
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1959
	{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1960
		top: 0,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1961
		left: +$('#notify_search_1gesture').position().left + $('#notify_search_1gesture').width() - $('#searchExitIcon').width() - parseInt($('#searchExitIcon').css('margin-left')) / 2,
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1962
		'z-index': 900
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1963
	});
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1964
}
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1965
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1966
/*
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1967
 * Supprime l'icone de sortie de recherche pour tablettes.
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1968
*/
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1969
Mosaic.prototype.removeSearchExitIcon = function()
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1970
{
205409da0f32 Front IDILL:
bastiena
parents: 58
diff changeset
  1971
	$('#searchExitIcon').remove();
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1972
}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1973
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1974
/*
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1975
 * Affiche l'icone des credits.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1976
 * Est appelé dans les fichiers :
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1977
 * mosaic > fonction loadMosaic.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1978
 * zoomInteractions > fonctions zoom et unzoom.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1979
*/
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1980
Mosaic.prototype.creditsIcon = function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1981
{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1982
	this.removeCreditsIcon();
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1983
	//On construit le div.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1984
	var creditsIcon = "<img id='creditsIcon' src='./img/creditsIcon.png' />";
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1985
	//On l'ajoute.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1986
	$('body').append(creditsIcon);
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1987
	//On spécifie ses coordonnées.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1988
	$('#creditsIcon').css(
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1989
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1990
		top: $(window).height() - $('#creditsIcon').height() - 2 * parseInt($('#creditsIcon').css('margin-left')),
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1991
		left: $(window).width() - $('#creditsIcon').width() - 2 * parseInt($('#creditsIcon').css('margin-left'))
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1992
	});
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1993
}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1994
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1995
/*
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1996
 * Supprime l'icone des credits.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1997
 * Est appelé dans les fichiers :
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1998
 * zoomInteractions > fonctions zoom et unzoom.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  1999
 * notifications > fonction helpIcon.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2000
*/
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2001
Mosaic.prototype.removeCreditsIcon = function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2002
{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2003
	this.isCreditsIconZooming = false;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2004
	this.isCreditsIconZoomed = false;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2005
	$('#creditsIcon').remove();
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2006
}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2007
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2008
/*
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2009
 * Agrandit l'icone des credits.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2010
 * Est appelé dans le fichier :
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2011
 * mosaic > fonction onMouseMove.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2012
*/
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2013
Mosaic.prototype.showBigCredits = function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2014
{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2015
	//Si on a déjà zoomé on quitte.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2016
	if(this.isCreditsIconZoomed || this.isCreditsIconZooming)
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2017
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2018
		return;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2019
	}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2020
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2021
	this.isCreditsIconZooming = true;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2022
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2023
	var _this = this;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2024
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2025
	$('#creditsIcon').animate(
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2026
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2027
		width: 100,
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2028
		height: 100,
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2029
		top: $(window).height() - 100 - 2 * parseInt($('#creditsIcon').css('margin-left')),
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2030
		left: $(window).width() - 100 - 2 * parseInt($('#creditsIcon').css('margin-left'))
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2031
	}, this.config.timeShowBigCredits, function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2032
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2033
		_this.isCreditsIconZoomed = true;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2034
		_this.isCreditsIconZooming = false;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2035
	});
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2036
}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2037
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2038
/*
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2039
 * Rétrecit l'icone des credits.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2040
 * Est appelé dans le fichier :
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2041
 * mosaic > fonction onMouseMove.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2042
*/
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2043
Mosaic.prototype.showSmallCredits = function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2044
{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2045
	//Si on n'a pas zoomé on quitte.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2046
	if(!this.isCreditsIconZoomed || this.isCreditsIconZooming)
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2047
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2048
		return;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2049
	}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2050
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2051
	this.isCreditsIconZooming = true;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2052
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2053
	var _this = this;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2054
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2055
	var creditsIconWidth = $('#creditsIcon').width();
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2056
	
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2057
	$('#creditsIcon').animate(
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2058
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2059
		width: 50,
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2060
		height: 50,
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2061
		top: $(window).height() - 50 - 2 * parseInt($('#creditsIcon').css('margin-left')),
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2062
		left: $(window).width() - 50 - 2 * parseInt($('#creditsIcon').css('margin-left'))
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2063
	}, this.config.timeShowBigCredits, function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2064
	{
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2065
		_this.isCreditsIconZoomed = false;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2066
		_this.isCreditsIconZooming = false;
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2067
	});
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2068
}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2069
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2070
/*
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2071
 * Affiche les crédits.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2072
*/
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2073
Mosaic.prototype.notifyCredits = function(tabCredits)
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2074
{
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2075
	//Si ils sont déjà affichés on quitte.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2076
    if(this.creditsDisplayed)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2077
    {
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2078
        return;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2079
    }
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2080
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2081
    //On enlève les autres notifications.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2082
    this.removeNotifications();
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2083
    
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2084
    //On indique qu'ils sont affichés.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2085
    this.creditsDisplayed = true;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2086
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2087
	//Panneau des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2088
	//On crée les flèches au niveau du container en cas d'overflow du texte.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2089
	var credits = "<div id='notify_credits'><div id='credits_upArrow' class='credits_arrows'></div><div id='credits_container'></div><div id='credits_downArrow' class='credits_arrows'></div></div>";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2090
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2091
	//Pied de page des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2092
	var credits_footer = "<div id='credits_footer'><div id='credits_footer_BBM'></div><div id='credits_footer_text'>" + this.creditsMetadata.footer_line1 + "<br />" + this.creditsMetadata.footer_line2 + "</div><div id='credits_footer_partners'></div></div>";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2093
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2094
	$('body').append(credits);
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2095
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2096
	//On récupère les éléments css du div des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2097
	var notify_credits = $('#notify_credits'), window_width = $(window).width(), window_height = $(window).height(), notify_margin = parseInt(notify_credits.css('margin-left')), notify_padding = parseInt(notify_credits.css('padding-left'));
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2098
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2099
	//On ajoute le pied de page aux crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2100
	notify_credits.append(credits_footer);
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2101
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2102
	//Elements html contenant les crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2103
	var credits_elements = "<div id='credits_content'><div id='credits_title' class='credits_text'>" + this.creditsMetadata.title + "<br /></div><div id='credits_subtitle' class='credits_text'><i>" + this.creditsMetadata.subtitle + "</i><br /><br /></div>";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2104
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2105
	for(var i = 0 ; i < this.tabCredits.length ; i++)
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2106
	{
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2107
		credits_elements += "<div class='credits_film credits_text'>" + this.tabCredits[i].film + "</div><div class='credits_body credits_text'>";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2108
		if(this.tabCredits[i].realisation)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2109
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2110
			credits_elements += this.creditsMetadata.realisation + " : " + this.tabCredits[i].realisation + "<br />";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2111
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2112
		if(this.tabCredits[i].company)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2113
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2114
			credits_elements += this.creditsMetadata.company + " : " + this.tabCredits[i].company + "<br />";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2115
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2116
		if(this.tabCredits[i].production)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2117
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2118
			credits_elements += this.creditsMetadata.production + " : " + this.tabCredits[i].production + "<br />";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2119
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2120
		if(this.tabCredits[i].choregraphy)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2121
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2122
			credits_elements += this.creditsMetadata.choregraphy + " : " + this.tabCredits[i].choregraphy + "<br />";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2123
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2124
		if(this.tabCredits[i].music)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2125
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2126
			credits_elements += this.creditsMetadata.music + " : " + this.tabCredits[i].music + "<br />";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2127
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2128
		
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2129
		credits_elements += "<br /></div>"
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2130
	}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2131
	
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2132
	credits_elements += "</div>";
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2133
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2134
	$('#credits_container').append(credits_elements);
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2135
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2136
	//On le positionne
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2137
	notify_credits.css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2138
    {
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2139
        left: "0px",
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2140
        top: "0px",
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2141
        width: window_width - notify_margin * 2 - notify_padding * 2,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2142
        height: window_height - notify_margin * 2 - notify_padding * 2,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2143
        'z-index': 1000
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2144
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2145
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2146
	//$('#credits_content').css('background-color', '#0000FF');
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2147
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2148
	this.column_gap = 30;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2149
	// this.column_width = (notify_credits.width() - notify_margin * 2 - notify_padding * 2) / 3 - this.column_gap * 3;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2150
	this.column_width = 150;//Math.ceil((notify_credits.width() - this.column_gap) / 3 - notify_margin * 2);
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2151
	//console.log(Math.ceil((notify_credits.width() - this.column_gap) / 3 - notify_margin * 2));
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2152
	//Dimensions des flèches.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2153
	var arrowWidth = 50, arrowHeight = 50;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2154
	//Dimensions du footer.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2155
	var footer_height = 100;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2156
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2157
	//On spécifie les colonnes.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2158
	$('#credits_container').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2159
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2160
		position: 'absolute',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2161
		'-moz-column-width': this.column_width,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2162
		'-webkit-column-width': this.column_width,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2163
		'-moz-column-gap': this.column_gap,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2164
		'-webkit-column-gap': this.column_gap,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2165
		'-moz-column-rule': '1px solid #ddccb5',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2166
		'-webkit-column-rule': '1px solid #ddccb5'
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2167
    });
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2168
	
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2169
	//CSS du pied de page.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2170
	$('#credits_footer').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2171
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2172
		position: 'absolute',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2173
		'background-color': '#FFF',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2174
		width: +notify_credits.width() + notify_margin + notify_padding,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2175
		height: footer_height,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2176
		top: +notify_credits.height() - 100 + notify_margin + notify_padding,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2177
		left: '0px'
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2178
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2179
	$('#credits_footer_BBM').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2180
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2181
		position: 'absolute',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2182
		'background-image': 'url(./img/creditsBBM.png)',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2183
		'background-repeat': 'no-repeat',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2184
		'background-size': '300px 40px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2185
		width: '300px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2186
		height: '40px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2187
		top: '0px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2188
		left: '0px'
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2189
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2190
	$('#credits_footer_partners').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2191
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2192
		position: 'absolute',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2193
		'background-image': 'url(./img/creditsPartners.png)',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2194
		'background-repeat': 'no-repeat',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2195
		width: '386px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2196
		height: '41px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2197
		top: $('#credits_footer').height() - 41,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2198
		left: +notify_credits.width() - 386 + notify_margin + notify_padding
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2199
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2200
	$('#credits_footer_text').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2201
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2202
		position: 'absolute',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2203
		width: notify_credits.width() - $('#credits_footer_partners').width(),
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2204
		top: '40px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2205
		left: '0px',
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2206
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2207
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2208
	//On ajoute les flèches à l'interface, bien qu'elles soient invisibles s'il n'y a pas d'overflow du texte.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2209
	$('#credits_upArrow').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2210
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2211
		top: 0,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2212
		left: notify_credits.width() / 2 - arrowWidth / 2
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2213
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2214
	$('#credits_downArrow').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2215
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2216
		top: $('#credits_footer').position().top - arrowHeight,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2217
		left: notify_credits.width() / 2 - arrowWidth / 2
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2218
	});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2219
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2220
	//Hauteur totale du texte des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2221
	var credits_total_height = $('#credits_content').height();
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2222
	//Nombre de pages de crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2223
	this.creditsPageLength = Math.ceil(credits_total_height / (notify_credits.height() * 3));
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2224
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2225
	//On suppose qu'il n'y a pas d'overflow du texte des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2226
	this.isCreditsTextOverflow = false;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2227
	
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2228
	//Si la taille totale des crédits excède celle de la hauteur du panneau des crédits x 3, alors le panneau sera en plusieurs parties.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2229
	if(credits_total_height > notify_credits.height() * 3)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2230
	{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2231
		//Si on est arrivé là, on a constaté un overflow du texte des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2232
		this.isCreditsTextOverflow = true;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2233
		
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2234
		//Si on est sur la première page des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2235
		if(this.creditsPageNumber == 0)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2236
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2237
			//On ne laisse pas la place du haut pour la flèche haut puisqu'on est sur la première page.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2238
			$('#credits_container').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2239
			{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2240
				//top: 0,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2241
				height: notify_credits.height() - footer_height - arrowHeight
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2242
			});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2243
			$('#credits_downArrow').css('opacity', '1');
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2244
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2245
		//Sinon si on est sur la dernière page des crédits.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2246
		else if(this.creditsPageNumber + 1 == creditsPageLength)
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2247
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2248
			$('#credits_downArrow').css('opacity', '0');
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2249
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2250
		//Sinon on laisse la place pour revenir en arrière ou en avant.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2251
		else
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2252
		{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2253
			$('#credits_container').css(
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2254
			{
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2255
				//top: arrowHeight,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2256
				height: notify_credits.height() - footer_height - arrowHeight * 2,
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2257
			});
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2258
		}
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2259
	}
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2260
}
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2261
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2262
/*
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2263
 * Supprime les crédits.
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2264
*/
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2265
Mosaic.prototype.removeCredits = function()
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2266
{
93
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2267
	//On indique qu'ils ne sont plus affichés.
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2268
    this.creditsDisplayed = false;
417d4b573bc8 Front IDILL:
bastiena
parents: 85
diff changeset
  2269
	this.creditsPageNumber = 0;
85
b244a7bc0844 Front IDILL:
bastiena
parents: 79
diff changeset
  2270
	$('#notify_credits').remove();
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  2271
}