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'; 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 { div#controls {
width: 100%; width: 100%;
padding: 10px;
} }
input { input {

View File

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