tableSorter: update javascript lib to allow search filters

Apply the search filter to the coins database...
This commit is contained in:
Tanguy Pruvot 2015-09-19 02:57:42 +02:00
parent 9fb0ad23f4
commit c872cd349f
3 changed files with 4036 additions and 1049 deletions

View file

@ -1,25 +1,42 @@
<?php <?php
//echo "<a href='/coin/create'>Add a coin</a>"; //echo "<a href='/coin/create'>Add a coin</a>";
echo '<br>';
showTableSorter('maintable', '{headers: {0: {sorter: false}}}'); echo <<<end
echo "<thead>"; <div align="right">
<input class="search" type="search" data-column="all" style="width: 140px;" placeholder="Search..." />
</div>
<style type="text/css">
tr.ssrow.filtered { display: none; }
</style>
end;
echo "<tr>"; showTableSorter('maintable', "{
echo "<th width=30></th>"; headers: { 0: { sorter: false} },
echo "<th>Name</th>"; widgets: ['zebra','filter'],
echo "<th>Symbol</th>"; widgetOptions: {
echo "<th>Algo</th>"; filter_external: '.search',
echo "<th>Status</th>"; filter_columnFilters: false,
echo "<th>Version</th>"; filter_childRows : true,
echo "<th>Created</th>"; filter_ignoreCase: true
//echo "<th>Difficulty</th>"; }
echo "<th>Height</th>"; }");
echo "<th>Message</th>";
echo "<th>Links</th>"; echo <<<end
echo "</tr>"; <thead><tr>
echo "</thead><tbody>"; <th width="30"></th>
<th>Name</th>
<th>Symbol</th>
<th>Algo</th>
<th>Status</th>
<th>Version</th>
<th>Created</th>
<th>Height</th>
<th>Message</th>
<th>Links</th>
</tr></thead>
<tbody>
end;
$total_active = 0; $total_active = 0;
$total_installed = 0; $total_installed = 0;

File diff suppressed because it is too large Load diff

View file

@ -50,7 +50,10 @@ function getTextTitle($text)
function showTableSorter($id, $options='') function showTableSorter($id, $options='')
{ {
JavascriptReady("$('#{$id}').tablesorter({$options});"); JavascriptReady("
$('#{$id}').tablesorter({$options});
$('.tablesorter-header').not('.sorter-false').css('cursor', 'pointer');"
);
echo "<table id='$id' class='dataGrid2'>"; echo "<table id='$id' class='dataGrid2'>";
} }