Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- th:onclick="'javascript:openPoolModal(''+ ${networkHashrate.id} + '');'"
- function openPoolModal(id){
- $.ajax({
- url: "/" + id,
- success: function(data){
- $("#PoolModalHolder").html(data);
- $("#personalModal").modal();
- $("#personalModal").modal('show');
- }
- });
- }
- <div class="modal fade" id="personalModal" role="dialog" th:fragment="modalContents">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title" th:text="'Network Id: ' + ${poolHashrates[0].networkHashrate.id}">Network Id</h4>
- </div>
- <div class="modal-body">
- <div class="table-responsive">
- <table width="100%" class="table table-hover " id="poolTable">
- <thead class="thead-inverse">
- <tr>
- <th class="col-md-2 text-center">Pool name</th>
- <th class="col-md-2 text-center">Date from</th>
- <th class="col-md-2 text-center">Hashrate</th>
- </tr>
- </thead>
- <tbody>
- <tr th:each="poolHashrate : ${poolHashrates}">
- <td class="text-center" th:text="${poolHashrate.poolDef.name}"> Sample data</td>
- <td class="text-center" th:text="${poolHashrate.poolDef.date_from}">Maven Street 10, Glasgow</td>
- <td class="text-center" th:text="${poolHashrate.hashrate}">999-999-999</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- $(document).ready( function () {
- $('#poolTable').DataTable();
- } );
- $( "#personalModal" ).focus(function() {
- $('#poolTable').DataTable();
- });
Add Comment
Please, Sign In to add comment