narentera / flexigrid

Automatically exported from code.google.com/p/flexigrid
0 stars 0 forks source link

Preset in search bar #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I use a custom site-wide search bar that leads to my page with a flexigrid 
table. When doing so, i set p.query dynamically in order to get filtered 
results. However, the flexigrid's search bar remains empty. It would be nice if 
it was pre-filled with p.query. 

I've attached a diff file, but this is trivial to fix, simply add a 
value='p.query' on line 1218... from : 

$(g.sDiv).append("<div class='sDiv2'>"+p.findtext+" <input type='text' 
size='30' name='q' class='qsbox' /> <select name='qtype'>"+sopt+"</select> 
<!--input type='button' value='Clear' /--></div>");

to

$(g.sDiv).append("<div class='sDiv2'>"+p.findtext+" <input type='text' value='" 
+ p.query +"' size='30' name='q' class='qsbox' /> <select 
name='qtype'>"+sopt+"</select> <!--input type='button' value='Clear' 
/--></div>");

I can't find my version, it's written nowhere... but it was downloaded 2 days 
ago:

Thanks,
Jni

Original issue reported on code.google.com by jni.vi...@gmail.com on 16 Mar 2011 at 6:53

Attachments:

GoogleCodeExporter commented 8 years ago
Good point! It has been committed to trunk.

Original comment by eric.caron on 21 Apr 2011 at 10:56