mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
add filter field, placeholder in input filter field
This commit is contained in:
parent
a75d337912
commit
d82b59f173
|
@ -56,7 +56,7 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style {
|
|||
|
||||
$this->contentHeading(getMLText("substitute_user"));
|
||||
?>
|
||||
<input type="text" id="myInput">
|
||||
<input type="text" id="myInput" placeholder="<?= getMLText('type_to_filter'); ?>">
|
||||
<table id="myTable" class="table table-condensed">
|
||||
<thead>
|
||||
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('email');?></th><th><?php printMLText('role'); ?></th><th><?php printMLText('groups'); ?></th><th></th></tr>
|
||||
|
|
|
@ -31,6 +31,19 @@ require_once("class.Bootstrap.php");
|
|||
*/
|
||||
class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style {
|
||||
|
||||
function js() { /* {{{ */
|
||||
?>
|
||||
$(document).ready(function(){
|
||||
$("#myInput").on("keyup", function() {
|
||||
var value = $(this).val().toLowerCase();
|
||||
$("#myTable tbody tr").filter(function() {
|
||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
||||
});
|
||||
});
|
||||
});
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
function show() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
|
@ -49,7 +62,8 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style {
|
|||
$sessionmgr = new SeedDMS_SessionMgr($dms->getDB());
|
||||
?>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<input type="text" id="myInput" placeholder="<?= getMLText('type_to_filter'); ?>">
|
||||
<table id="myTable" class="table table-condensed">
|
||||
<thead><tr><th></th><th><?php printMLText('name'); ?></th><th><?php printMLText('groups'); ?></th><th><?php printMLText('role'); ?></th><th><?php printMLText('discspace'); ?></th><th><?php printMLText('authentication'); ?></th><th></th></tr></thead><tbody>
|
||||
<?php
|
||||
foreach ($allUsers as $currUser) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user