git://git.onelab.eu
/
plewww.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ba63e89
)
make the search more interactive and less cpu hangry with a timeout and closure.
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Thu, 9 Apr 2009 15:19:25 +0000
(15:19 +0000)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Thu, 9 Apr 2009 15:19:25 +0000
(15:19 +0000)
plekit/table/table.js
patch
|
blob
|
history
diff --git
a/plekit/table/table.js
b/plekit/table/table.js
index
8656af9
..
14c7220
100644
(file)
--- a/
plekit/table/table.js
+++ b/
plekit/table/table.js
@@
-102,9
+102,18
@@
function plekit_tr_text (tr) {
return text;
}
return text;
}
+var plekit_table_filter_timeout = null;
/* scan the table, and mark as visible
the rows that match (either AND or OR the patterns) */
/* scan the table, and mark as visible
the rows that match (either AND or OR the patterns) */
-function plekit_table_filter (table_id,pattern_id,and_id) {
+function plekit_table_filter(table_id,pattern_id,and_id) {
+ clearTimeout(plekit_table_filter_timeout);
+ plekit_table_filter_timeout = setTimeout(function() {
+ plekit_lazy_table_filter(table_id,pattern_id,and_id)
+ },
+ 200);
+}
+
+function plekit_lazy_table_filter (table_id,pattern_id,and_id) {
var table=$(table_id);
var css='#'+table_id+'>tbody';
var rows = $$(css)[0].rows;
var table=$(table_id);
var css='#'+table_id+'>tbody';
var rows = $$(css)[0].rows;