setup.js-- 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. $('.select').select2({
  2. minimumResultsForSearch: Infinity,
  3. });
  4. $('.toggle-full-screen').click(function () {
  5. $(this).children().toggleClass('fa-expand-arrows-alt fa-compress-arrows-alt')
  6. if (!document.fullscreenElement) {
  7. document.documentElement.requestFullscreen();
  8. } else {
  9. if (document.exitFullscreen) {
  10. document.exitFullscreen();
  11. }
  12. }
  13. });
  14. $('[data-toggle="tooltip"]').tooltip()
  15. $('.modal').on('show.bs.modal', function (event) {
  16. $('.modal').draggable({ handle: ".modal-header" });
  17. })
  18. $(document).on('keydown','.decimal', function (event) {
  19. handleEnterPressedinNormalCell(event, function() {})
  20. }).on('focusout','.decimal', function () {
  21. $(this).val(format_conver_for(minusComma($(this).val()), $(this).data('point')))
  22. });
  23. // 전체 input 텍스트박스 더블클릭 시 초기화
  24. $(document).on('dblclick', 'input[type="text"]:enabled.filter', function () {
  25. $(this).val('')
  26. })
  27. $(document).on('mouseenter', '.table-row > tbody > tr > td, .table-row > thead th', function () {
  28. let $this = $(this);
  29. if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
  30. $this.tooltip({
  31. title: $this.text(),
  32. animated: 'fade',
  33. placement: 'right',
  34. container: 'body',
  35. // trigger: 'click'
  36. });
  37. $this.tooltip('show');
  38. }
  39. }).on('mouseleave', '.table-row > tbody > tr > td, .table-row > thead th', function() {
  40. $('.tooltip').tooltip('dispose');
  41. // $('.tooltip').tooltip('hide');
  42. });
  43. $(document).on('mouseenter', ".table-row > tbody > tr > td > img", function () {
  44. $(this).tooltip({
  45. html: true,
  46. title: `<img src="${$(this).attr('src')}" onerror="this.src='/images/folder.jpg'"/>`,
  47. animated: 'fade',
  48. placement: 'right',
  49. container: 'body',
  50. // trigger: 'click'
  51. });
  52. $(this).tooltip('show');
  53. }).on('mouseleave', '.table-row > tbody > tr > td > img', function() {
  54. $('.tooltip').tooltip('dispose');
  55. });
  56. $(document).on('mouseenter', 'table .txt_box', function () {
  57. let $this = $(this);
  58. if (! $this.data('title')) { return; }
  59. $this.tooltip({
  60. title: $this.data('title'),
  61. animated: 'fade',
  62. placement: 'top',
  63. container: 'body',
  64. });
  65. $this.tooltip('show');
  66. }).on('mouseleave', '.table .txt_box', function() {
  67. $('.tooltip').tooltip('dispose');
  68. });