Changeset 69109 in spip-zone


Ignore:
Timestamp:
Jan 20, 2013, 6:34:31 AM (7 years ago)
Author:
prigent.yohann@…
Message:

une erreur si rien sur la page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/spip_suggest/suggest_fonctions.php

    r68973 r69109  
    4242<script type="text/javascript">
    4343        $(document).ready(function(){
    44 $( "#recherche" ).autocomplete({
     44$("#recherche").autocomplete({
    4545      minLength: 0,
    4646      source:"'.generer_url_public("suggest").'",
     
    5555        return false;
    5656      }
    57     }).data( "autocomplete" )._renderItem = function( ul, item ) {
     57    });
     58        var obj = $("#recherche").data("autocomplete");
     59        obj && (obj._renderItem = function( ul, item ) {
    5860      return $( "<li>" )
    5961        .data( "item.autocomplete", item )
    6062        .append( "<a>" + item.label + " (" + item.nb + ")</a>" )
    6163        .appendTo( ul );
    62     };
     64    });
    6365});
    6466</script>';
Note: See TracChangeset for help on using the changeset viewer.