You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.8 KiB

4 years ago
  1. !function (t) {
  2. "use strict";
  3. var a = function () {
  4. this.$dataTableButtons = t("#datatable-buttons");
  5. };
  6. a.prototype.createDataTableButtons = function () {
  7. 0 !== this.$dataTableButtons.length && this.$dataTableButtons.DataTable({
  8. dom: "Bfrtip",
  9. buttons: [
  10. //{
  11. // extend: "copy",
  12. // className: "btn-success fa fa-files-o"
  13. //},
  14. //{
  15. // extend: "csv",
  16. // className: "btn-info fa fa-file-excel-o"
  17. //},
  18. //{
  19. // extend: "excel",
  20. // className: "btn-warning fa fa-file-excel-o"
  21. //},
  22. {
  23. extend: "pdf",
  24. className: "btn-warning fa fa-file-pdf-o"
  25. },
  26. {
  27. extend: "print",
  28. className: "btn-danger fa fa-print"
  29. }],
  30. responsive: !0
  31. });
  32. },
  33. a.prototype.init = function () {
  34. t("#datatable").dataTable(), t("#datatable-keytable").DataTable({
  35. keys: !0
  36. }), t("#datatable-responsive").DataTable(), t("#datatable-scroller").DataTable({
  37. ajax: "../Plugins/datatables/json/scroller-demo.json",
  38. deferRender: !0,
  39. scrollY: 380,
  40. scrollCollapse: !0,
  41. scroller: !0
  42. });
  43. t("#datatable-fixed-header").DataTable({
  44. fixedHeader: !0
  45. });
  46. this.createDataTableButtons();
  47. }, t.DataTable = new a, t.DataTable.Constructor = a;
  48. }(window.jQuery),
  49. function (t) {
  50. "use strict";
  51. t.DataTable.init();
  52. }(window.jQuery);