Added all registration data in a table on the stats page
This commit is contained in:
@@ -152,9 +152,9 @@
|
||||
}
|
||||
|
||||
window.initNodeFunctions = [ function(node) {
|
||||
forEachElement('.number-field,.email-field,.text-field,.password-field', function(field) {
|
||||
forEachElement('.number-field,.email-field,.text-field,.password-field,.search-field', function(field) {
|
||||
var input = field.querySelector('input');
|
||||
var positionLabel = function(input) {
|
||||
var positionLabel = function(input) {
|
||||
field.classList[input.value ? 'remove' : 'add']('empty');
|
||||
}
|
||||
positionLabel(input);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
(function() {
|
||||
var searchControl = document.getElementById('search');
|
||||
|
||||
function filterTable() {
|
||||
forEach(document.getElementById('search-rows').getElementsByTagName('tr'), function(tr) {
|
||||
tr.classList.remove('hidden');
|
||||
|
||||
var value = searchControl.value;
|
||||
if (value) {
|
||||
var words = value.split(/\s+/);
|
||||
for (var i = 0; i < words.length; i++) {
|
||||
var word = new RegExp(words[i].replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), "i");
|
||||
if (tr.innerHTML.search(word) == -1) {
|
||||
tr.classList.add('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchControl.addEventListener('keyup', filterTable);
|
||||
searchControl.addEventListener('search', filterTable);
|
||||
})();
|
||||
Reference in New Issue
Block a user