searchPanes.bulma.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*! Bulma 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-bulma', 'datatables.net-searchpanes'], function ($) {
  8. return factory($);
  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-bulma')(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($);
  26. };
  27. }
  28. else {
  29. // Browser
  30. factory(jQuery);
  31. }
  32. }(function ($) {
  33. 'use strict';
  34. var dataTable = $.fn.dataTable;
  35. $.extend(true, dataTable.SearchPane.classes, {
  36. disabledButton: 'is-disabled',
  37. paneButton: 'button dtsp-paneButton is-white',
  38. search: 'input search'
  39. });
  40. $.extend(true, dataTable.SearchPanes.classes, {
  41. clearAll: 'dtsp-clearAll button',
  42. collapseAll: 'dtsp-collapseAll button',
  43. disabledButton: 'is-disabled',
  44. showAll: 'dtsp-showAll button'
  45. });
  46. return dataTable.searchPanes;
  47. }));