search box for the notificatons [close #563]

This commit is contained in:
reality 2013-08-24 14:46:38 +00:00
parent 904b7d22d5
commit 1d73115c33
3 changed files with 17 additions and 2 deletions

View File

@ -7,3 +7,15 @@ function search(q)
quotes[i].className = quotes[i].innerHTML.indexOf(q) == -1 ? 'quotes hidden' : 'quotes';
}
}
function searchNotifies(q) {
var notifies = document.getElementById('notifies');
for (var i=1, row; row=notifies.rows[i]; i++) {
console.log(row);
if(row.cells[3].innerHTML.indexOf(q) == -1) {
row.style.display = 'none';
} else {
row.style.display = '';
}
}
}

View File

@ -64,6 +64,7 @@ div#main {
div#controls {
width: 100%;
padding: 10px;
}
input {

View File

@ -4,8 +4,10 @@ block content
div#backlink
a(href='/notify/'+server) « Server Channels
p
div#profile_datatable
table.table.table-hover.data
div#controls
input(type="text", name="search", id="search-text", oninput="searchNotifies(this.value)")
div#notify_datatable
table.table.table-hover.data#notifies
thead
tr
th Date