25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.1KB

  1. /*! Bootstrap integration for DataTables' SearchPanes
  2. * ©2016 SpryMedia Ltd - datatables.net/license
  3. */
  4. (function (factory) {
  5. if (typeof define === 'function' && define.amd) {
  6. // AMD
  7. define(['jquery', 'datatables.net-bs4', 'datatables.net-searchpanes'], function ($) {
  8. return factory($, window, document);
  9. });
  10. }
  11. else if (typeof exports === 'object') {
  12. // CommonJS
  13. module.exports = function (root, $) {
  14. if (!root) {
  15. root = window;
  16. }
  17. if (!$ || !$.fn.dataTable) {
  18. // eslint-disable-next-line @typescript-eslint/no-var-requires
  19. $ = require('datatables.net-bs4')(root, $).$;
  20. }
  21. if (!$.fn.dataTable.SearchPanes) {
  22. // eslint-disable-next-line @typescript-eslint/no-var-requires
  23. require('datatables.net-searchpanes')(root, $);
  24. }
  25. return factory($, root, root.document);
  26. };
  27. }
  28. else {
  29. // Browser
  30. factory(jQuery, window, document);
  31. }
  32. }(function ($, window, document) {
  33. 'use strict';
  34. var dataTable = $.fn.dataTable;
  35. $.extend(true, dataTable.SearchPane.classes, {
  36. buttonGroup: 'btn-group',
  37. disabledButton: 'disabled',
  38. narrow: 'col',
  39. pane: {
  40. container: 'table'
  41. },
  42. paneButton: 'btn btn-light',
  43. pill: 'pill badge badge-pill badge-secondary',
  44. search: 'form-control search',
  45. searchCont: 'input-group',
  46. searchLabelCont: 'input-group-append',
  47. subRow1: 'dtsp-subRow1',
  48. subRow2: 'dtsp-subRow2',
  49. table: 'table table-sm table-borderless',
  50. topRow: 'dtsp-topRow'
  51. });
  52. $.extend(true, dataTable.SearchPanes.classes, {
  53. clearAll: 'dtsp-clearAll btn btn-light',
  54. collapseAll: 'dtsp-collapseAll btn btn-light',
  55. container: 'dtsp-searchPanes',
  56. disabledButton: 'disabled',
  57. panes: 'dtsp-panes dtsp-panesContainer',
  58. showAll: 'dtsp-showAll btn btn-light',
  59. title: 'dtsp-title',
  60. titleRow: 'dtsp-titleRow'
  61. });
  62. return dataTable.searchPanes;
  63. }));