Browse Source

fix: une url était en hardcore pour la recherche de tag (js)

bastien 13 years ago
parent
commit
1d41d398d9

+ 1 - 1
src/Muzich/CoreBundle/Resources/config/routing.yml View File

@@ -26,7 +26,7 @@ element_add:
26 26
 
27 27
 search_tag:
28 28
   pattern: /search/tag/{string_search}/{timestamp}
29
-  defaults: { _controller: MuzichCoreBundle:Search:searchTag, string_search: null }
29
+  defaults: { _controller: MuzichCoreBundle:Search:searchTag, string_search: null, timestamp: null }
30 30
   
31 31
 search_tag_ig_by_name:
32 32
   pattern: /search/tagid/{string_search}

+ 1 - 0
src/Muzich/CoreBundle/Resources/views/layout.html.twig View File

@@ -29,6 +29,7 @@
29 29
     string_follow_follow = "{{ 'user.follow'|trans({}, 'users') }}";
30 30
     
31 31
     url_index = "{{ path('index') }}";
32
+    url_search_tag = "{{ path('search_tag') }}";
32 33
   </script>
33 34
   {% block js %}{% endblock %}
34 35
   

+ 1 - 1
web/bundles/muzichcore/js/muzich.js View File

@@ -595,7 +595,7 @@ $(document).ready(function(){
595 595
       ajax_query_timestamp = new Date().getTime();
596 596
 
597 597
       // Récupération des tags correspondants
598
-      $.getJSON('/app_dev.php/fr/search/tag/'+input.val()+'/'+ajax_query_timestamp, function(data) {
598
+      $.getJSON(url_search_tag+'/'+input.val()+'/'+ajax_query_timestamp, function(data) {
599 599
         if (data.status == 'mustbeconnected')
600 600
         {
601 601
           $(location).attr('href', url_index);