Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

user filtering

  • Loading branch information...
commit bf0dc4138cebbccc21329046a5e47623885f9aa2 1 parent a192d45
Spiros Ioannou authored
Showing with 25 additions and 5 deletions.
  1. +7 −1 js/jquery.quicksearch.js
  2. +18 −4 php/editusers.php
View
8 js/jquery.quicksearch.js
@@ -112,7 +112,13 @@ jQuery(function ($) {
var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
cache = t.map(function () {
- return e.strip_html(this.innerHTML);
+ var txt;
+ if ($(this) && $(this).find('input:text').length)
+ txt= e.strip_html(this.innerHTML)+' '+$(this).find('input:text').val();
+ else
+ txt= e.strip_html(this.innerHTML);
+ return txt;
+ //return e.strip_html(this.innerHTML); //original code
});
rowcache = jq_results.map(function () {
View
22 php/editusers.php
@@ -1,3 +1,9 @@
+<script>
+ $(document).ready(function() {
+ $('input#usersfilter').quicksearch('table#userstbl tbody tr');
+ });
+
+</script>
<?php
if (!isset($initok)) {echo "do not run this script directly";exit;}
@@ -44,10 +50,17 @@
<form autocomplete='off' method=post name='actionaddfrm'>
<h1><?php te("Users");?></h1><b><?php te("Users are used for both web login and as item assignees");?></b>
-<table class=brdr width='100%' border=0>
-<tr><th><?php te("Username");?></th><th><?php te("User Description");?></th>
- <th><?php te("Password");?><sup>1</sup></th>
- <th><?php te("Type");?></th></tr>
+<input style='color:#909090' id="usersfilter" name="usersfilter" class='filter'
+ value='Filter' onclick='this.style.color="#000"; this.value=""' size="20">
+<span style='font-weight:normal;' class='nres'></span>
+
+<table id='userstbl' class=brdr width='100%' border=0>
+ <thead>
+ <tr><th><?php te("Username");?></th><th><?php te("User Description");?></th>
+ <th><?php te("Password");?><sup>1</sup></th>
+ <th><?php te("Type");?></th></tr>
+ </thead>
+ <tbody>
<?php
$i=0;
@@ -83,6 +96,7 @@
<tr><td colspan=4><button type="submit"><img src="images/save.png" alt="Save" > <?php te("Save");?></button></td></tr>
<tr><td colspan=4><sup>1</sup><?php te("Blank passwords prohibit login");?></td></tr>
+</tbody>
</table>
</form>
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.