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.

116 lines
5.1 KiB

4 years ago
  1. (function (d) {
  2. "function" === typeof define && define.amd ? define(["jquery", "datatables.net", "datatables.net-buttons"], function (c) {
  3. return d(c, window, document)
  4. }) : "object" === typeof exports ? module.exports = function (c, a) {
  5. c || (c = window);
  6. if (!a || !a.fn.dataTable) a = require("datatables.net")(c, a).$;
  7. a.fn.dataTable.Buttons || require("datatables.net-buttons")(c, a);
  8. return d(a, c, c.document)
  9. } : d(jQuery, window, document)
  10. })(function (d, c, a) {
  11. var h = d.fn.dataTable,
  12. f = a.createElement("a");
  13. h.ext.buttons.print = {
  14. className: "buttons-print",
  15. text: function (d) {
  16. return d.i18n("buttons.print", "Print")
  17. },
  18. action: function (a, b, i, e) {
  19. a = b.buttons.exportData(e.exportOptions);
  20. i = function (a, b) {
  21. for (var d = "<tr>", c = 0, e = a.length; c < e; c++) d += "<" + b + ">" + a[c] + "</" + b + ">";
  22. return d + "</tr>"
  23. };
  24. b = '<table class="' + b.table().node().className + '">';
  25. e.header && (b += "<thead>" + i(a.header, "th") + "</thead>");
  26. for (var b = b + "<tbody>", j = 0, h = a.body.length; j < h; j++) b += i(a.body[j], "td");
  27. b += "</tbody>";
  28. e.footer && (b += "<thead>" + i(a.footer, "th") + "</thead>");
  29. var g = c.open("", ""),
  30. a = e.title.replace("*",
  31. //d("title").text()
  32. '');
  33. g.document.close();
  34. //var k = "<title>" + a + "</title>";
  35. d("style, link").each(function () {
  36. var a = '',
  37. b = d(this).clone()[0],
  38. c;
  39. "link" === b.nodeName.toLowerCase() && (f.href = b.href, c = f.host, -1 === c.indexOf("http://themesdesign.in/") && 0 !== f.pathname.indexOf("http://themesdesign.in/") && (c += "http://themesdesign.in/"), b.href = f.protocol + "//" + c + f.pathname + f.search);
  40. k = a + b.outerHTML
  41. });
  42. d(g.document.head).html(k);
  43. d(g.document.body).html("<h1>" + a + "</h1><div>" + e.message + "</div>" + b);
  44. e.customize && e.customize(g);
  45. setTimeout(function () {
  46. e.autoPrint && (g.print(), g.close())
  47. }, 250)
  48. },
  49. title: "*",
  50. message: "",
  51. exportOptions: {},
  52. header: !0,
  53. footer: !1,
  54. autoPrint: !0,
  55. customize: null
  56. };
  57. return h.Buttons
  58. });
  59. (function (d) {
  60. "function" === typeof define && define.amd ? define(["jquery", "datatables.net", "datatables.net-buttons"], function (c) {
  61. return d(c, window, document)
  62. }) : "object" === typeof exports ? module.exports = function (c, a) {
  63. c || (c = window);
  64. if (!a || !a.fn.dataTable) a = require("datatables.net")(c, a).$;
  65. a.fn.dataTable.Buttons || require("datatables.net-buttons")(c, a);
  66. return d(a, c, c.document)
  67. } : d(jQuery, window, document)
  68. })(function (d, c, a) {
  69. var h = d.fn.dataTable,
  70. f = a.createElement("a");
  71. h.ext.buttons.print = {
  72. className: "buttons-print",
  73. text: function (d) {
  74. return d.i18n("buttons.print", " Print")
  75. },
  76. action: function (a, b, i, e) {
  77. a = b.buttons.exportData(e.exportOptions);
  78. i = function (a, b) {
  79. for (var d = "<tr>", c = 0, e = a.length; c < e; c++) d += "<" + b + ">" + a[c] + "</" + b + ">";
  80. return d + "</tr>"
  81. };
  82. b = '<table class="' + b.table().node().className + '">';
  83. e.header && (b += "<thead>" + i(a.header, "th") + "</thead>");
  84. for (var b = b + "<tbody>", j = 0, h = a.body.length; j < h; j++) b += i(a.body[j], "td");
  85. b += "</tbody>";
  86. e.footer && (b += "<thead>" + i(a.footer, "th") + "</thead>");
  87. var g = c.open("", ""),
  88. a = e.title.replace("*",
  89. ''
  90. //d("title").text()
  91. );
  92. g.document.close();
  93. //var k = "<title>" + a + "</title>";
  94. d("style, link").each(function () {
  95. var a = '',
  96. b = d(this).clone()[0],
  97. c;
  98. "link" === b.nodeName.toLowerCase() && (f.href = b.href, c = f.host, -1 === c.indexOf("http://themesdesign.in/") && 0 !== f.pathname.indexOf("http://themesdesign.in/") && (c += "http://themesdesign.in/"), b.href = f.protocol + "//" + c + f.pathname + f.search);
  99. k = a + b.outerHTML
  100. });
  101. d(g.document.head).html(k);
  102. d(g.document.body).html("<h1>" + a + "</h1><div>" + e.message + "</div>" + b);
  103. e.customize && e.customize(g);
  104. setTimeout(function () {
  105. e.autoPrint && (g.print(), g.close())
  106. }, 250)
  107. },
  108. title: "*",
  109. message: "",
  110. exportOptions: {},
  111. header: !0,
  112. footer: !1,
  113. autoPrint: !0,
  114. customize: null
  115. };
  116. return h.Buttons
  117. });