|
@@ -260,7 +260,8 @@ $(document).ready(function(){
|
260
|
260
|
$('.tags_prompt input.clear, a.filter_clear_url').live("click", function(){
|
261
|
261
|
$('img.elements_more_loader').show();
|
262
|
262
|
$('ul.elements').html('');
|
263
|
|
-
|
|
263
|
+ // On initialise la liste de tags déjà ajouté
|
|
264
|
+ tagsAddeds['search'] = new Array;
|
264
|
265
|
var form = $('form[name="search"]');
|
265
|
266
|
remove_tags(form.attr('name'));
|
266
|
267
|
form.submit();
|
|
@@ -271,6 +272,8 @@ $(document).ready(function(){
|
271
|
272
|
|
272
|
273
|
$('img.elements_more_loader').show();
|
273
|
274
|
$('ul.elements').html('');
|
|
275
|
+ // On initialise la liste de tags déjà ajouté
|
|
276
|
+ tagsAddeds['search'] = new Array;
|
274
|
277
|
|
275
|
278
|
var form = $(this).parents('form[name="search"]');
|
276
|
279
|
|
|
@@ -802,18 +805,14 @@ $(document).ready(function(){
|
802
|
805
|
|
803
|
806
|
var li_tag =
|
804
|
807
|
$('<li>').append(
|
805
|
|
- $('<a>').attr('id','searched_tag_'+tag_id+'_'+tag_name)
|
|
808
|
+ $('<a>').attr('id','searched_tag_'+tag_id)
|
806
|
809
|
.attr('href', '#')
|
807
|
810
|
// qui réagit quand on clique dessus
|
808
|
811
|
.click(function(e){
|
809
|
|
- // On récupère le nom du tag
|
810
|
|
- var name = $(this).attr('id').substr(13,$(this).attr('id').length);
|
811
|
|
- name = name.substr(strpos(name, '_')+1, name.length);
|
812
|
|
-
|
813
|
|
- var id = $(this).attr('id').substr(13,$(this).attr('id').length);
|
814
|
|
- id = str_replace(name, '', id);
|
815
|
|
- id = str_replace('_', '', id);
|
816
|
812
|
|
|
813
|
+ var id = str_replace('searched_tag_', '', $(this).attr('id'));
|
|
814
|
+ var name = $('span#tag_prompt_tag_'+id+'_name').html();
|
|
815
|
+
|
817
|
816
|
$('input#tags_selected_tag_'+form_name).val(id);
|
818
|
817
|
inputTag.val(name);
|
819
|
818
|
// Et on execute l'évènement selectTag de l'input
|
|
@@ -825,7 +824,7 @@ $(document).ready(function(){
|
825
|
824
|
return false;
|
826
|
825
|
})
|
827
|
826
|
.append(t_string)
|
828
|
|
- );
|
|
827
|
+ ).append($('<span style="display: none;" id="tag_prompt_tag_'+tag_id+'_name">'+tag_name+'</span>'));
|
829
|
828
|
|
830
|
829
|
// Si on depasse les 30 tags
|
831
|
830
|
if (i > 30)
|