mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 04:20:11 +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; }
|
if($s == '') { return $s; }
|
||||||
|
|
||||||
$s = preg_replace("/\'/", ' ', $s);
|
$s = preg_replace("/\'/", ' ', $s);
|
||||||
|
$s = preg_replace("/\./", ' ', $s);
|
||||||
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
@ -448,11 +448,14 @@ var Piler =
|
|||||||
{
|
{
|
||||||
Piler.log("[load_search_results_for_saved_query]", terms);
|
Piler.log("[load_search_results_for_saved_query]", terms);
|
||||||
|
|
||||||
|
terms = decodeURIComponent(terms);
|
||||||
|
|
||||||
var pairs = terms.split('&');
|
var pairs = terms.split('&');
|
||||||
$.each(pairs, function(i, v){
|
$.each(pairs, function(i, v){
|
||||||
var pair = v.split('=');
|
var pair = v.split('=');
|
||||||
if(pair[0] == 'search') {
|
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'])) {
|
if(isset($s['search'])) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<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>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } } ?>
|
<?php } } ?>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
if(isset($s['search']) && $s['search']) {
|
if(isset($s['search']) && $s['search']) {
|
||||||
?>
|
?>
|
||||||
<div class="resultrow center">
|
<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>
|
</div>
|
||||||
<?php } } ?>
|
<?php } } ?>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user