mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:20:13 +01:00
minor gui fix to support apostroph in the query
This commit is contained in:
parent
a132c85be8
commit
8e27aea28d
@ -794,6 +794,7 @@ class ModelSearchSearch extends Model {
|
||||
if($s == '') { return $s; }
|
||||
|
||||
$s = preg_replace("/\'/", ' ', $s);
|
||||
$s = preg_replace("/\./", ' ', $s);
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
@ -448,11 +448,14 @@ var Piler =
|
||||
{
|
||||
Piler.log("[load_search_results_for_saved_query]", terms);
|
||||
|
||||
terms = decodeURIComponent(terms);
|
||||
|
||||
var pairs = terms.split('&');
|
||||
$.each(pairs, function(i, v){
|
||||
var pair = v.split('=');
|
||||
if(pair[0] == 'search') {
|
||||
$("input#_search").val(pair[1]);
|
||||
var search = decodeURIComponent(pair[1]);
|
||||
$("input#_search").val(search.replace(/\+/g, " "));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
if(isset($s['search'])) {
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="#" onclick="Piler.load_search_results_for_saved_query('<?php print urldecode($term['term']); ?>');"><?php print $s['search']; ?></a></td>
|
||||
<td><a href="#" onclick="Piler.load_search_results_for_saved_query('<?php print urlencode($term['term']); ?>');"><?php print $s['search']; ?></a></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php } } ?>
|
||||
|
@ -18,7 +18,7 @@
|
||||
if(isset($s['search']) && $s['search']) {
|
||||
?>
|
||||
<div class="resultrow center">
|
||||
<a href="#" onclick="Piler.load_search_results_for_saved_query('<?php print urldecode($term['term']); ?>');"><?php print $s['search']; ?></a></br />
|
||||
<a href="#" onclick="Piler.load_search_results_for_saved_query('<?php print urlencode($term['term']); ?>');"><?php print $s['search']; ?></a></br />
|
||||
</div>
|
||||
<?php } } ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user