browser: disable column search if no queryselector
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 8 Dec 2010 00:01:57 +0000 (01:01 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000 (22:40 +0100)
Fixes normal queries for older browsers (firefox 2.0 tested ok).

searchlocal.js

index eb4baf635da7f70002b9df7cad8623b7d538b062..512f07b8482cf1bf293e16c09d385a6178fb014a 100644 (file)
@@ -69,6 +69,7 @@ function filtertable(query, action) {
                query = match[2];
        }
 
+if (document.querySelector !== undefined) {
        if (query == '' && action == 'add') {
                // restore all columns if explicitly adding all ("+")
                filtercols(table, function(){return true}, 'add');
@@ -82,6 +83,7 @@ function filtertable(query, action) {
                }
                return filtercols(table, match, action || 'toggle');
        }
+}
 
        if (/^[A-Z0-9 ]{2,}$/.test(query)) {
                // category title if all uppercase