Filtering fix

This commit is contained in:
nikolark committed 2014-11-24 20:57:27 +01:00
1 parent eb2d91978e
commit a0f73a0e05
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -59,10 +59,10 @@
function filter_lists(prefix, pushState) {
if(pushState) {
/* Update query string */
window.history.pushState(null, null, '/lists/?q=^' + prefix);
window.history.pushState(null, null, '/lists/?q=^' + prefix+'-');
}
/* Filter lists */
var re_prefix = new RegExp('^'+prefix);
var re_prefix = new RegExp('^'+prefix+'-');
$(".fwdlist").each(function() {
var cur_name = $(this).attr('data-list-name');
if(re_prefix.test(cur_name)) {
+3 -2
View File
@@ -55,13 +55,14 @@
});
}
// TODO combine with above
function filter_lists(prefix, pushState) {
if(pushState) {
/* Update query string */
window.history.pushState(null, null, '/lists/?q=^' + prefix);
window.history.pushState(null, null, '/lists/?q=^' + prefix+'-');
}
/* Filter lists */
var re_prefix = new RegExp('^'+prefix);
var re_prefix = new RegExp('^'+prefix+'-');
$(".fwdlist").each(function() {
var cur_name = $(this).attr('data-list-name');
if(re_prefix.test(cur_name)) {