From a2c45c3761cfa0b32c219280ab3fd6d68028f589 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 27 Jul 2010 21:56:07 +0000 Subject: [PATCH] FS#142 : By default the string must be in the search --- html/ajax_card.php | 1 + html/js/card.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/html/ajax_card.php b/html/ajax_card.php index b3e81bdb2..16bd446cc 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -40,6 +40,7 @@ - fs Form to search card parameter like - inp : the input text field to update + - str : current content of the input text field (inp) - label : the element to put the name of the card - price : the element to put the price of the card (if exists) - tvaid : the element to put the tvaid of the card (if exists) diff --git a/html/js/card.js b/html/js/card.js index 24a632289..9cde9f9e8 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -38,6 +38,7 @@ function search_card(obj) { try{ var gDossier=$('gDossier').value; var inp=obj.inp; + var string_to_search=$(inp).value; var label=obj.label; var typecard=obj.typecard; var price=obj.price; @@ -50,8 +51,8 @@ function search_card(obj) { var query=encodeJSON({'gDossier':gDossier, 'inp':inp,'label':label,'price':price,'tvaid':tvaid, 'ctl':obj.popup,'op':'fs','jrn':jrn, - 'typecard':typecard - }); + 'typecard':typecard,'query':string_to_search + }); showIPopup(obj.popup); var action=new Ajax.Request ( 'ajax_card.php', {