setup.js 2.4 KB

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