browser: search "+" (add any) resets columns
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 7 Dec 2010 20:48:44 +0000 (21:48 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000 (22:40 +0100)
searchlocal.js

index ac38dce9501aa502d82dc387095e937ae7880507..5d7493b100616134bddd693d6cdef245010b2974 100644 (file)
@@ -67,6 +67,11 @@ function filtertable(query, action) {
                query = match[2];
        }
 
+       if (query == '' && action == 'add') {
+               // restore all columns if explicitly adding all ("+")
+               filtercols(table, function(){return true}, 'add');
+               // continue to restore rows
+       }
        if (/^[a-z_]+$/.test(query) && document.querySelector('.b-a-'+query)) {
                // column if class b-a-* exists
                var match = function(th) {