Changeset 1514


Ignore:
Timestamp:
Sep 30, 2010, 6:20:18 PM (10 years ago)
Author:
roux
Message:

refacto double hilight

Location:
cpc/trunk/project
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/circonscription/config/view.yml

    r848 r1514  
    11all:
    22   javascripts: [jquery.maphilight.min.js]
     3showSuccess:
     4   javascripts: [doubleHilight.js]
     5listSuccess:
     6   javascripts: [doubleHilight.js]
    37
  • cpc/trunk/project/apps/frontend/modules/circonscription/templates/listSuccess.php

    r1503 r1514  
    1717    continue;
    1818  if (preg_match('/^\d$/', $num)) $num = sprintf("%02d",$num);
    19   echo '<p title="'.strtoupper($num).'" class="dept" id="dep'.strtoupper($num).'">'.link_to($circo, '@list_parlementaires_departement?departement='.preg_replace('/ /', '_', $circo)).'</p>';
     19  echo '<p title="'.strtoupper($num).'" class="dept dep_map" id="dep'.strtoupper($num).'">'.link_to($circo, '@list_parlementaires_departement?departement='.preg_replace('/ /', '_', $circo)).'</p>';
    2020  if ($ct == $iter2)
    2121    break;
     
    2323} ?>
    2424</div>
    25 <script type="text/javascript">
    26 /* survol du txt */
    27 $(".dept").live("mouseover", function() {
    28   dep = $(this).attr("id").substring(3);
    29   $("#map"+dep).mouseover();
    30 })
    31 $(".dept").live("mouseout", function() {
    32   dep = $(this).attr("id").substring(3);
    33   $("#map"+dep).mouseout();
    34 })
    35 /* survol de la map */
    36 $("area").live("mouseover", function() {
    37   dep = $(this).attr("id").substring(3);
    38   $("#dep"+dep).css("background-color", "#D1EA74");
    39 })
    40 $("area").live("mouseout", function() {
    41   dep = $(this).attr("id").substring(3);
    42   $("#dep"+dep).css("background-color", "#fff");
    43 })
    44 </script>
  • cpc/trunk/project/apps/frontend/modules/circonscription/templates/showSuccess.php

    r1507 r1514  
    77  <?php include_partial('parlementaire/table', array('deputes' => $parlementaires, 'circo' => $departement_num)); ?>
    88</div>
    9 <script type="text/javascript">
    10 /* survol du txt */
    11 $(".list_dep").live("mouseover", function() {
    12   dep = $(this).attr("id").substring(3);
    13   $("#map"+dep).mouseover();
    14 })
    15 $(".list_dep").live("mouseout", function() {
    16   dep = $(this).attr("id").substring(3);
    17   $("#map"+dep).mouseout();
    18 })
    19 /* survol de la map */
    20 $("area").live("mouseover", function() {
    21   dep = $(this).attr("id").substring(3);
    22   $("#dep"+dep).css("background-color", "#D1EA74");
    23 })
    24 $("area").live("mouseout", function() {
    25   dep = $(this).attr("id").substring(3);
    26   $("#dep"+dep).css("background-color", "#fff");
    27 })
    28 </script>
  • cpc/trunk/project/apps/frontend/modules/parlementaire/templates/_table.php

    r1506 r1514  
    1717foreach($deputes as $depute) {
    1818  $ct++; ?>
    19   <div <?php if (isset($circo) && $depute->fin_mandat == null) echo 'id="dep'.preg_replace('/^(\d[\dab])$/', '0\\1', strtolower(Parlementaire::getNumeroDepartement($depute->nom_circo))).'-'.sprintf('%02d', $depute->num_circo).'" '; ?>class="list_dep" onclick="document.location='<?php echo url_for('@parlementaire?slug='.$depute->slug); ?>'">
     19  <div class="list_dep<?php if (isset($circo) && $depute->fin_mandat == null) echo ' dep_map" id="dep'.preg_replace('/^(\d[\dab])$/', '0\\1', strtolower(Parlementaire::getNumeroDepartement($depute->nom_circo))).'-'.sprintf('%02d', $depute->num_circo); ?>" onclick="document.location='<?php echo url_for('@parlementaire?slug='.$depute->slug); ?>'">
    2020    <span class="list_nom">
    2121      <a href="<?php echo url_for('@parlementaire?slug='.$depute->slug); ?>"><?php echo $depute->getNomPrenom(); ?></a>
Note: See TracChangeset for help on using the changeset viewer.