Browse Source

Evolution #53: Recherche js tags: pas que le début

bastien 13 years ago
parent
commit
646199ac96
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Muzich/CoreBundle/Resources/views/Tag/tagsPrompt.html.twig

+ 2 - 2
src/Muzich/CoreBundle/Resources/views/Tag/tagsPrompt.html.twig View File

@@ -34,7 +34,7 @@
34 34
   // to highlight part of the matched string
35 35
   $.ui.autocomplete.prototype._renderItem = function( ul, item) {
36 36
       var sstr = $.trim(this.term);
37
-      var re = new RegExp("^" + sstr, "i") ;
37
+      var re = new RegExp(sstr, "i") ;
38 38
       var t = item.label.replace(re,"<strong>" + sstr + "</strong>");
39 39
       return $( "<li></li>" )
40 40
           .data( "item.autocomplete", item )
@@ -47,7 +47,7 @@
47 47
       source: function(req, responseFn) {
48 48
           var sstr = $.trim(req.term);
49 49
           var re = $.ui.autocomplete.escapeRegex(sstr);
50
-          var matcher = new RegExp( "^" + re, "i" );
50
+          var matcher = new RegExp(re, "i" );
51 51
           var a = $.grep( taglist, function(item,index){
52 52
               return matcher.test(item);
53 53
           });