|
29.06.2015, 13:29
#38994925
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
Ссылка на профиль пользователя:
|
|
|
Участник
Сообщения: 3 545
Рейтинг:
0
/ 0
|
|
|
|
Имеется скрипт под jQuery dataTables.
Вопрос: как организовать постепенную загрузку(Ajax)?
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75.
<script type="text/javascript">
var table;
jQuery(document).ready(function($)
{
getSignals(<?=(int)$_GET['PartnerID']?>,function (response)
{
console.log(response);
table = $("#table").dataTable({
"dom": '<T>ir<t>p',
"sPaginationType": "bootstrap",
"responsive": true,
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"bStateSave": true,
"data":response.rows,
"oTableTools": {
"aButtons": [
{
"sExtends": "text",
"sButtonText": "Add New",
"sButtonClass": "entypo-plus",
"fnClick": function ( nButton, oConfig, oFlash ) {
addNew();
}
},
{
"sExtends": "text",
"sButtonText": "Filter",
"sButtonClass": "entypo-search",
"fnClick": function ( nButton, oConfig, oFlash ) {
if ($('.replace-inputs').is(':hidden'))
$('.replace-inputs').show();
else
$('.replace-inputs').hide();
}
},
]
},
"columns": [
{ "data": "SignalID" },
{ "data": "TradeType" },
{ "data": "AssetName" },
{ "data": "IsCall" },
{ "data": "SignalStrength" },
{ "data": "MaxExpirationTime" },
{ "data": "MinExpirationTime", className: "tdAlignCenter" },
{ "data": "EASendTime", className: "tdAlignCenter" },
{ "data": "CreateTime", className: "tdAlignCenter"},
{ "data": "SendEndTime", className: "tdAlignCenter" },
{ "data": "MarketPriceBid", "searchable": false },
{ "data": "MarketPriceAsk", "searchable": false },
{ "data": "BotName", "searchable": false },
{ "data": "SignalID", "searchable": false },
],
"columnDefs": [{
"targets": 13,
"data": "SignalID",
"searchable": false,
"render": function ( data, type, full, meta ) {
return '<a href="#" alt="Edit" class="btn btn-default btn-sm row-edit-btn" BrandID=' + data + '><i class="entypo-pencil"></i></a>' +
'<a href="#" alt="Delete" class="btn btn-danger btn-sm row-delete-btn" BrandID=' + data + '><i class="entypo-cancel"></i></a>';
}
}]
});
table.columnFilter({
"sPlaceHolder" : "head:after",
aoColumns: [
{ type: "text" },
{ type: "text" },
{ type: "text" },
{ type: "text" }
]
});
|
|
|