diff options
| author | Zaran <zaran.krleza@gmail.com> | 2011-01-17 15:55:42 +0100 |
|---|---|---|
| committer | Zaran <zaran.krleza@gmail.com> | 2011-01-17 15:55:42 +0100 |
| commit | 98c38cd86474cbba0152acbc9addf74ec989d7e0 (patch) | |
| tree | 1b45a5cead2b0c1e0980df0b23efd29bc7b53586 /webclient/lib | |
| parent | b11654bf7e54cdd86398a33ce278f3b70e4e319d (diff) | |
| download | alias-98c38cd86474cbba0152acbc9addf74ec989d7e0.tar.gz | |
Add field to filter the roster.
Diffstat (limited to 'webclient/lib')
| -rw-r--r-- | webclient/lib/basic.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webclient/lib/basic.js b/webclient/lib/basic.js index 84e6ff4..f8b24e7 100644 --- a/webclient/lib/basic.js +++ b/webclient/lib/basic.js @@ -1,6 +1,10 @@ var BOSH_SERVICE = 'http://alias.fr.nf/http-bind'; var connection = null; +jQuery.expr[':'].Contains = function(a,i,m){ + return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0; +}; + function log(msg, color) { $('#log').append($('<div></div>').css('background-color', color).text(msg)); @@ -169,4 +173,10 @@ $(document).ready(function(){ $('#bottomup').click(function(){ $(this).next().slideToggle(); }); + + $('#rosterfilter').keyup(function() { + var filter = $(this).val(); + $('#roster ul li div.roster-name:not(:Contains("' + filter + '"))').parent().hide(); + $('#roster ul li div.roster-name:Contains("' + filter + '")').parent().show(); + }); });
\ No newline at end of file |
