Skip to content
Extraits de code Groupes Projets
Valider 71321e46 rédigé par touti's avatar touti Validation de cerdic
Parcourir les fichiers

assurer onAjaxLoad pour surligner les mots même lors d'un rechagrment des...

assurer onAjaxLoad pour surligner les mots même lors d'un rechagrment des elements trouvés lors d'une recherche issue #4217
parent 6807e139
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -74,9 +74,10 @@ function surligner_mots($page, $surcharge_surligne = '') { ...@@ -74,9 +74,10 @@ function surligner_mots($page, $surcharge_surligne = '') {
$script = " $script = "
<script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script> <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script>
<script type='text/javascript'>/*<![CDATA[*/ <script type='text/javascript'>/*<![CDATA[*/
if (window.jQuery) if (window.jQuery) {
(function(\$){\$(function(){ var highlighter = function() {
\$(document).SearchHighlight({ jQuery(function($){
\$(document).SearchHighlight({
tag_name:'" . (html5_permis() ? 'mark' : 'span') . "', tag_name:'" . (html5_permis() ? 'mark' : 'span') . "',
style_name:'spip_surligne', style_name:'spip_surligne',
exact:'whole', exact:'whole',
...@@ -86,10 +87,13 @@ function surligner_mots($page, $surcharge_surligne = '') { ...@@ -86,10 +87,13 @@ function surligner_mots($page, $surcharge_surligne = '') {
nohighlight:'.pas_surlignable'" . nohighlight:'.pas_surlignable'" .
($surcharge_surligne ? ", ($surcharge_surligne ? ",
keys:'$surcharge_surligne'" : '') . ', keys:'$surcharge_surligne'" : '') . ',
min_length: 3 min_length: 3
}) });
}); });
})(jQuery); }
highlighter();
onAjaxLoad(highlighter);
}(jQuery);
/*]]>*/</script> /*]]>*/</script>
'; ';
// on l'insere juste avant </head>, sinon tout en bas // on l'insere juste avant </head>, sinon tout en bas
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter