Add filters to wallets and big miners tables

This commit is contained in:
Tanguy Pruvot 2015-09-19 05:24:16 +02:00
parent 751507a13b
commit 5d3cb76563
4 changed files with 58 additions and 24 deletions

View file

@ -14,7 +14,7 @@ echo <<<end
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
<div align=right>
<div align="right" style="margin-top: -14px;">
Select Server:
<select id='server_select'>
<option value=''>all</option>
@ -25,6 +25,7 @@ Select Server:
<option value='yaamp5'>yaamp5</option>
<option value='yaamp6'>yaamp6</option>
</select>&nbsp;
<input class="search" type="search" data-column="all" style="width: 140px;" placeholder="Search..." />
</div>
<div id='main_results'>
@ -39,7 +40,7 @@ Select Server:
<!-- br><a href='/site/updateprice'><img width=16 src=''><b>UPDATE PRICE</b></a -->
<!-- br><a href='/site/dopayments'><img width=16 src=''><b>DO PAYMENTS</b></a -->
<br><br><br><br><br><br><br><br><br><br>
<br><br><br>
<script>

View file

@ -2,7 +2,12 @@
/////////////////////////////////////////////////////////////////////////////////////
//echo '<br><table id="maintable" class="dataGrid">';
echo <<<end
<style type="text/css">
tr.ssrow.filtered { display: none; }
</style>
end;
showTableSorter('maintable', '{
headers: {
0:{sorter:false},
@ -16,6 +21,13 @@ headers: {
8:{sorter:"currency"},
9:{sorter:"currency"},
10:{sorter:"currency"}
},
widgets: ["zebra","filter"],
widgetOptions: {
filter_external: ".search",
filter_columnFilters: false,
filter_childRows : true,
filter_ignoreCase: true
}}');
echo <<<end

View file

@ -18,7 +18,7 @@ JavascriptFile("/extensions/jqplot/plugins/jqplot.highlighter.js");
<a href='/site/version'>Version</a>&nbsp;
<a href='/site/earning'>Earnings</a>&nbsp;
<a href='/site/payments'>Payments</a>&nbsp;
<a href='/site/monsters'>Monitor</a>&nbsp;
<a href='/site/monsters'>Big Miners</a>&nbsp;
<a href='/site/connections'>Conns</a>&nbsp;
<a href='/site/emptymarkets'>EmptyMarket</a>&nbsp;
<a href='/coin'>New</a>&nbsp;

View file

@ -12,25 +12,46 @@
<?php
echo "<a href='/site/monsters'>refresh</a><br>";
echo <<<end
<div align="right" style="margin-top: -14px;">
<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 "<br><table class='dataGrid'>";
echo "<thead>";
echo "<tr>";
echo "<th></th>";
echo "<th></th>";
echo "<th>Wallet</th>";
echo "<th></th>";
echo "<th>Last</th>";
echo "<th>Blocks</th>";
echo "<th>Balance</th>";
echo "<th>Total Paid</th>";
echo "<th>Miners</th>";
echo "<th>Shares</th>";
echo "<th></th>";
echo "<th></th>";
echo "</tr>";
echo "</thead><tbody>";
showTableSorter('maintable', "{
headers: { 0: { sorter: false} },
widgets: ['zebra','filter'],
widgetOptions: {
filter_external: '.search',
filter_columnFilters: false,
filter_childRows : true,
filter_ignoreCase: true
}
}");
echo <<<end
<thead>
<tr>
<th></th>
<th>Coin</th>
<th></th>
<th>Wallet</th>
<th></th>
<th>Last</th>
<th>Blocks</th>
<th>Balance</th>
<th>Total Paid</th>
<th>Miners</th>
<th>Shares</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
end;
function showUser($userid, $what)
{
@ -53,9 +74,9 @@ function showUser($userid, $what)
echo "<tr class='ssrow'>";
if($coin)
echo "<td><img src='$coin->image' width=16> $coin->symbol</td>";
echo '<td><img src="'.$coin->image.'" width="16"></td><td>'.$coin->symbol.'</td>';
else
echo "<td></td>";
echo '<td colspan="2"></td>';
echo "<td>$user->id</td>";
echo "<td><a href='/site?address=$user->username'>$user->username</a></td>";