Changeset 1591
- Timestamp:
- Oct 3, 2010, 9:06:06 PM (10 years ago)
- Location:
- cpc/trunk/project
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/solr/templates/searchSuccess.php
r1589 r1591 108 108 } 109 109 110 function constructLien(date) { 111 lien = document.location+''; 112 lien = lien.replace(/\??date=[^&]+/, ''); 113 lien = lien.replace(/#.*/, ''); 114 if (!lien.match(/\?/)) 115 lien += '?'; 116 else 117 lien += '&'; 118 lien += 'date='+date; 119 return lien; 120 } 121 110 122 $(document).ready(function() { 111 123 $(".date li").each(function() { 112 124 if($(this).height() > bh) { bh = $(this).height(); } 113 date_li = $(this). find('a').attr("title").split(':');125 date_li = $(this).attr("title").split('--'); 114 126 date_href[nb_li] = $(this).find('a').attr("href"); 115 127 $(this).find(".hover_graph").attr("onclick", "document.location.replace('http://"+location.host+date_href[nb_li]+"')"); … … 140 152 to = to["date"].split('%2C'); 141 153 parametre["date"] = from[0]+'%2C'+to[0]; 142 143 lien = document.location+''; 144 lien = lien.replace(/date=[^&]+/, ''); 145 if (!lien.match(/\?/)) 146 lien += '?'; 147 else 148 lien += '&'; 149 lien += 'date='+parametre['date']; 154 155 lien = constructLien(parametre['date']); 156 document.location = '#date='+parametre['date']; 150 157 151 158 if(ui.values[0] == ui.values[1]) { … … 190 197 $i++; 191 198 $height = round($nb['pc']*100/($fdates['max']) * 2); 192 $padding = 200-$height; ?> 193 <li<?php echo ' style="list-style-image: none; width: '.$width.'px; height: '.$height.'px; left: '.$left.'px;">'; 199 $padding = 200-$height; 194 200 $left = $left + $width; if($i < (count($fdates['values']))) { $left = $left + $espacement; } 195 201 $newargs = $selected; … … 198 204 199 205 if(($vue == 'jour') or ($vue == 'par_jour') or ($vue == 'mois')){ 200 $title_date = myTools::displayShortDate($date).' :'.$nb['nb'].' résultats';206 $title_date = myTools::displayShortDate($date).' -- '.$nb['nb'].' résultats'; 201 207 } 202 208 if($vue == 'par_mois') { 203 $title_date = ucfirst(myTools::displayMoisAnnee($date)).' :'.$nb['nb'].' résultats';209 $title_date = ucfirst(myTools::displayMoisAnnee($date)).' -- '.$nb['nb'].' résultats'; 204 210 } 205 211 if($vue == 'par_mois') { … … 207 213 } 208 214 209 echo '<div class="hover_graph" title="'.$title_date.'" style="width: '.$width.'px; height: '.$padding.'px; bottom: '.$height.'px;"></div><span class="text_graph">'.link_search($nb['nb'], $query, $newargs, array('title' => $title_date)).'</span>'; 215 echo '<li title="'.$title_date.'" class="jstitle" style="list-style-image: none; width: '.$width.'px; height: '.$height.'px; left: '.$left.'px;">'; 216 echo '<div class="hover_graph" title="'.$title_date.'" style="width: '.$width.'px; height: '.$padding.'px; bottom: '.$height.'px;"></div><span class="text_graph">'.link_search($nb['nb'], $query, $newargs, array()).'</span>'; 210 217 211 218 # echo ' '.$nb['nb'].' résultats ('; printf('%02d', $nb['pc']*100/($fdates['max'])); echo '%)'; -
cpc/trunk/project/web/js/fonctions.js
r1574 r1591 76 76 $('#jstitle').css('display', 'none'); 77 77 }); 78 //Redirection d'un lien envoyé depuis une page ajax 79 url = document.location+''; 80 if (url.match(/#date=/) && constructLien) { 81 document.location = constructLien(url.replace(/.*#date=/, '')); 82 } 78 83 79 84 }); // fin document ready
Note: See TracChangeset
for help on using the changeset viewer.