init
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Vendored
+33
File diff suppressed because one or more lines are too long
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"emptyTable": "데이터가 없습니다",
|
||||
"info": "_START_ - _END_ / _TOTAL_",
|
||||
"infoEmpty": "0 - 0 / 0",
|
||||
"infoFiltered": "(총 _MAX_ 개)",
|
||||
"infoThousands": ",",
|
||||
"lengthMenu": "페이지당 줄수 _MENU_",
|
||||
"loadingRecords": "읽는중...",
|
||||
"processing": "처리중...",
|
||||
"search": "검색:",
|
||||
"zeroRecords": "검색 결과가 없습니다",
|
||||
"paginate": {
|
||||
"first": "처음",
|
||||
"last": "마지막",
|
||||
"next": "다음",
|
||||
"previous": "이전"
|
||||
},
|
||||
"aria": {
|
||||
"sortAscending": ": 내림차순 정렬",
|
||||
"sortDescending": ": 오름차순 정렬"
|
||||
},
|
||||
"buttons": {
|
||||
"copyKeys": "ctrl키 나 u2318 + C키로 테이블 데이터를 시스텝 복사판에서 복사하고 취소하려면 이 메시지를 클릭하거나 ESC키를 누르면됩니다. to copy the table data to your system clipboard. To cancel, click this message or press escape.",
|
||||
"copySuccess": {
|
||||
"1": "1행을 복사판에서 복사됨",
|
||||
"_": "%d행을 복사판에서 복사됨"
|
||||
},
|
||||
"copyTitle": "복사판에서 복사",
|
||||
"csv": "CSV",
|
||||
"excel": "<i class=\"bi bi-filetype-xls\"></i> 엑셀",
|
||||
"pageLength": {
|
||||
"-1": "모든 행 보기",
|
||||
"_": "%d행 보기"
|
||||
},
|
||||
"pdf": "<i class=\"bi bi-filetype-pdf\"></i> PDF",
|
||||
"print": "인쇄",
|
||||
"collection": "모음",
|
||||
"colvis": "컬럼 보기",
|
||||
"colvisRestore": "보기 복원",
|
||||
"copy": "<i class=\"bi bi-clipboard\"></i> 복사",
|
||||
"createState" : "필터생성",
|
||||
"removeAllStates" : "전체삭제",
|
||||
"savedStates" : "저장된 필터",
|
||||
"updateState" : "변경",
|
||||
"renameState" : "이름변경",
|
||||
"removeState" : "필터삭제",
|
||||
"stateRestore" : "검색필터 %d"
|
||||
},
|
||||
"stateRestore" : {
|
||||
"renameTitle" : "이름 변경하기",
|
||||
"renameLabel" : "\"%s\" 에서 새 이름으로:",
|
||||
"renameButton" : "이름변경",
|
||||
"removeTitle" : "필터 삭제하기",
|
||||
"removeConfirm" : "%s 을(를) 정말 삭제하시겠습니까?",
|
||||
"duplicateError": "이미 존재하는 이름입니다.",
|
||||
"emptyError": "이름은 비워둘 수 없습니다.",
|
||||
"emptyStates": "저장된 필터가 없습니다.",
|
||||
"removeError": "필터 삭제에 실패하였습니다.",
|
||||
"removeJoiner": " 과(와) ",
|
||||
"removeSubmit": "삭제"
|
||||
},
|
||||
"searchBuilder": {
|
||||
"add": "조건 추가",
|
||||
"button": {
|
||||
"0": "빌더 조회",
|
||||
"_": "빌더 조회(%d)"
|
||||
},
|
||||
"clearAll": "모두 지우기",
|
||||
"condition": "조건",
|
||||
"data": "데이터",
|
||||
"deleteTitle": "필터 규칙을 삭제",
|
||||
"logicAnd": "And",
|
||||
"logicOr": "Or",
|
||||
"title": {
|
||||
"0": "빌더 조회",
|
||||
"_": "빌더 조회(%d)"
|
||||
},
|
||||
"value": "값"
|
||||
},
|
||||
"autoFill": {
|
||||
"cancel": "취소",
|
||||
"fill": "모든 셀에서 <i>%d<i>을(를) 삽입</i></i>",
|
||||
"fillHorizontal": "수평 셀에서 값을 삽입",
|
||||
"fillVertical": "수직 설에서 값을 삽입"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
//원복
|
||||
// $(function(){
|
||||
// $('.left-side .nav li button').on('click', function(){
|
||||
// $('.left-side').addClass('open');
|
||||
|
||||
// let width = window.innerWidth;
|
||||
// let open = $('.left-side');
|
||||
|
||||
// if(width<= 500 && open.hasClass('open')){
|
||||
// $('.left-side .nav li button').on('click', function(){
|
||||
// $('.left-side').toggleClass('open');
|
||||
// }
|
||||
// )}
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
// $(function(){
|
||||
// $('.left-side .nav li button').on('click', function(){
|
||||
// //$('.left-side').toggleClass('hide');
|
||||
|
||||
// let width = window.innerWidth;
|
||||
// let open = $('.left-side');
|
||||
|
||||
|
||||
// // if(width<= 500 && open.hasClass('hide')){
|
||||
// // $('.left-side .nav li button').on('click', function(){
|
||||
// // $('.left-side').toggleClass('hide');
|
||||
// // }
|
||||
// // )}
|
||||
|
||||
// menu_class();
|
||||
// console.log(localStorage.btn,result);
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
+2
File diff suppressed because one or more lines are too long
Vendored
+13
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+22
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,701 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
var serialize = function (data, accuracy) {
|
||||
accuracy = accuracy > 0 ? accuracy : 1;
|
||||
var chunkSize = 24 * accuracy;
|
||||
var res = [];
|
||||
var i = 0;
|
||||
for (i = 0; i < chunkSize * 7; i++) {
|
||||
res[i] = 0;
|
||||
}
|
||||
for (i = 0; i < 7; i++) {
|
||||
var row = data[i + 1];
|
||||
if (!row) {continue;}
|
||||
for (var j = 0, rowLen = row.length; j < rowLen; j++) {
|
||||
res[i * chunkSize + row[j]] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return res.join('');
|
||||
};
|
||||
|
||||
var parse = function (strSequence, accuracy) {
|
||||
accuracy = accuracy > 0 ? accuracy : 1;
|
||||
var chunkSize = 24 * accuracy;
|
||||
var res = {};
|
||||
for (var i = 0, row = 1, len = strSequence.length; i < len; i++) {
|
||||
var col = i % chunkSize;
|
||||
if (strSequence[i] === '1') {
|
||||
!res[row] && (res[row] = []);
|
||||
res[row].push(col);
|
||||
}
|
||||
if ((i + 1) % chunkSize === 0) {
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
var toStr = function (currentSelectRange) {
|
||||
return Object.prototype.toString.call(currentSelectRange);
|
||||
};
|
||||
// it only does '%s', and return '' when arguments are undefined
|
||||
var sprintf = function (str) {
|
||||
var args = arguments;
|
||||
var flag = true;
|
||||
var i = 1;
|
||||
|
||||
str = str.replace(/%s/g, function () {
|
||||
var arg = args[i++];
|
||||
|
||||
if (typeof arg === 'undefined') {
|
||||
flag = false;
|
||||
return '';
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
return flag ? str : '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Return an interger array of ascending range form 'form' to 'to'.
|
||||
* @param {Number} form
|
||||
* @param {Number} to
|
||||
* @return {Array}
|
||||
*/
|
||||
var makeRange = function (from, to) {
|
||||
// 保证 from <= to
|
||||
if (from > to) {
|
||||
from = from + to;
|
||||
to = from - to;
|
||||
from = from - to;
|
||||
}
|
||||
|
||||
var res = [];
|
||||
for (var i = from; i <= to; i++) {
|
||||
res.push(i);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
var makeMatrix = function (startCoord, endCoord) {
|
||||
var matrix = {};
|
||||
var colArr = makeRange(startCoord[1], endCoord[1]);
|
||||
var fromRow = startCoord[0] < endCoord[0] ? startCoord[0] : endCoord[0];
|
||||
var steps = Math.abs(startCoord[0] - endCoord[0]) + 1;
|
||||
for (var i = 0; i < steps; i++) {
|
||||
matrix[fromRow + i] = colArr.slice(0);
|
||||
}
|
||||
return matrix;
|
||||
};
|
||||
|
||||
/**
|
||||
* Merge to arrays, return an new array.
|
||||
* @param {Array} origin
|
||||
* @param {Array} addition
|
||||
*/
|
||||
var mergeArray = function (origin, addition) {
|
||||
var hash = {};
|
||||
var res = [];
|
||||
|
||||
origin.forEach(function (item, i) {
|
||||
hash[item] = 1;
|
||||
res[i] = item;
|
||||
});
|
||||
|
||||
addition.forEach(function (item) {
|
||||
if (!hash[item]) {
|
||||
res.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
return res.sort(function (num1, num2) {
|
||||
return num1 - num2;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 去当前数组中去除指定集合,返回新数组
|
||||
* @param {Array} origin 原数组
|
||||
* @param {Array} reject 要去除的数组
|
||||
*/
|
||||
var rejectArray = function (origin, reject) {
|
||||
var hash = {};
|
||||
var res = [];
|
||||
|
||||
reject.forEach(function (item, i) {
|
||||
hash[item] = i;
|
||||
});
|
||||
|
||||
origin.forEach(function (item) {
|
||||
if (!hash.hasOwnProperty(item)) {
|
||||
res.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
return res.sort(function (num1, num2) {
|
||||
return num1 - num2;
|
||||
});
|
||||
};
|
||||
|
||||
// 选择模式
|
||||
var SelectMode = {
|
||||
JOIN: 1, // 合并模式,添加到选区
|
||||
MINUS: 2, // 减去模式,从之前的选区中减去
|
||||
REPLACE: 3, // 替换模式,弃用之前的选区,直接使用给定的选区作为最终值
|
||||
NONE: 0
|
||||
};
|
||||
|
||||
var Scheduler = function (el, options) {
|
||||
this.$el = $(el);
|
||||
if (!this.$el.is('table')) {
|
||||
this.$el = $('<table></table>').appendTo(this.$el);
|
||||
}
|
||||
|
||||
// 自定义项
|
||||
this.options = options;
|
||||
// 选择模式
|
||||
this.selectMode = SelectMode.NONE;
|
||||
this.startCoord = null;
|
||||
this.endCoord = null;
|
||||
// 控件的数据对象,所有操作不会更改 this.options.data
|
||||
this.data = $.extend(true, {}, this.options.data);
|
||||
this.init();
|
||||
};
|
||||
|
||||
// 默认项
|
||||
Scheduler.DEFAULTS = {
|
||||
locale: 'en', // i18n
|
||||
accuracy: 1, // how many cells of an hour
|
||||
data: [], // selected cells
|
||||
footer: true,
|
||||
multiple: true,
|
||||
disabled: false,
|
||||
// event callbacks
|
||||
onDragStart: $.noop,
|
||||
onDragMove: $.noop,
|
||||
onDragEnd: $.noop,
|
||||
onSelect: $.noop,
|
||||
onRender: $.noop
|
||||
};
|
||||
|
||||
// Language
|
||||
Scheduler.LOCALES = {};
|
||||
|
||||
// Simplified Chinese
|
||||
Scheduler.LOCALES['zh-cn'] = Scheduler.LOCALES.zh = {
|
||||
AM: '上午',
|
||||
PM: '下午',
|
||||
TIME_TITLE: '时间',
|
||||
WEEK_TITLE: '星期',
|
||||
WEEK_DAYS: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'],
|
||||
DRAG_TIP: '可拖动鼠标选择时间段',
|
||||
RESET: '清空选择'
|
||||
};
|
||||
|
||||
// English
|
||||
Scheduler.LOCALES['en-US'] = Scheduler.LOCALES.en = {
|
||||
AM: 'AM',
|
||||
PM: 'PM',
|
||||
TIME_TITLE: 'TIME',
|
||||
WEEK_TITLE: 'DAY',
|
||||
WEEK_DAYS: ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'],
|
||||
DRAG_TIP: 'Drag to select hours',
|
||||
RESET: 'Reset Selected'
|
||||
};
|
||||
|
||||
// Template
|
||||
Scheduler.TEMPLATES = {
|
||||
HALF_DAY_ROW: '<tr>' +
|
||||
'<th rowspan="2" class="slash">' +
|
||||
'<div class="scheduler-time-title">%s</div>' +
|
||||
'<div class="scheduler-week-title">%s</div>' +
|
||||
'</th>' +
|
||||
'<th class="scheduler-half-toggle" data-half-toggle="1" colspan="%s">%s</th>' +
|
||||
'<th class="scheduler-half-toggle" data-half-toggle="2" colspan="%s">%s</th>' +
|
||||
'</tr>',
|
||||
HOUR_HEAD_CELL: '<th class="scheduler-hour-toggle" data-hour-toggle="%s" colspan="%s">%s</th>',
|
||||
DAY_ROW: '<tr data-index="%s"><td class="scheduler-day-toggle" data-day-toggle="%s">%s</td>%s</tr>',
|
||||
HOUR_CELL: '<td class="scheduler-hour%s" data-row="%s" data-col="%s"></td>',
|
||||
FOOT_ROW: '<tr><td colspan="%s"><div class="scheduler-control-wrap"><span class="scheduler-tips">%s</span><a class="scheduler-reset">%s</a></div></td></tr>'
|
||||
};
|
||||
|
||||
// Util
|
||||
Scheduler.Util = {
|
||||
parse: parse,
|
||||
serialize: serialize
|
||||
};
|
||||
|
||||
var proto = Scheduler.prototype;
|
||||
|
||||
proto.init = function () {
|
||||
this.initLocale();
|
||||
this.initTable();
|
||||
this.options.onRender.call(this.$el);
|
||||
};
|
||||
|
||||
proto.initLocale = function () {
|
||||
var me = this;
|
||||
if (me.options.locale) {
|
||||
var parts = me.options.locale.toLowerCase().split(/-|_/);
|
||||
if (parts[1]) {
|
||||
parts[1] = parts[1].toUpperCase();
|
||||
}
|
||||
if ($.fn.scheduler.locales[me.options.locale]) {
|
||||
// locale as requested
|
||||
$.extend(me.options, $.fn.scheduler.locales[me.options.locale]);
|
||||
} else if ($.fn.scheduler.locales[parts.join('-')]) {
|
||||
// locale with sep set to - (in case original was specified with _)
|
||||
$.extend(me.options, $.fn.scheduler.locales[parts.join('-')]);
|
||||
} else if ($.fn.scheduler.locales[parts[0]]) {
|
||||
// short locale language code (i.e. 'en')
|
||||
$.extend(me.options, $.fn.scheduler.locales[parts[0]]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
proto.initTable = function () {
|
||||
this.$el.addClass('scheduler');
|
||||
if (this.options.disabled) {
|
||||
this.$el.addClass('scheduler-disabled');
|
||||
}
|
||||
this.initHead();
|
||||
this.initBody();
|
||||
if (this.options.footer) {
|
||||
this.initFoot();
|
||||
}
|
||||
};
|
||||
|
||||
proto.initHead = function () {
|
||||
var me = this;
|
||||
me.$head = me.$el.find('>thead');
|
||||
if (!me.$head.length) {
|
||||
me.$head = $('<thead></thead>').appendTo(me.$el);
|
||||
}
|
||||
me.$head.append(me.getHeadHtml());
|
||||
|
||||
// toggle select half day
|
||||
me.$head.on('click', '.scheduler-half-toggle', me.onToggleHalfDay.bind(me));
|
||||
// toggle select an hour
|
||||
me.$head.on('click', '.scheduler-hour-toggle', me.onToggleHour.bind(me));
|
||||
};
|
||||
|
||||
proto.initBody = function () {
|
||||
var me = this;
|
||||
|
||||
me.$body = me.$el.find('>tbody');
|
||||
if (!me.$body.length) {
|
||||
me.$body = $('<tbody></tbody>').appendTo(me.$el);
|
||||
}
|
||||
me.$body.append(me.getBodyHtml(me.options.data));
|
||||
|
||||
// toggle select day
|
||||
me.$body.on('click', '.scheduler-day-toggle', me.onToggleDay.bind(me));
|
||||
// range toggle select hour
|
||||
me.$body.on('mousedown', '.scheduler-hour', me.onMouseDown.bind(me))
|
||||
.on('mousemove', '.scheduler-hour', me.onMouseMove.bind(me))
|
||||
.on('mouseup', '.scheduler-hour', me.onMouseUp.bind(me));
|
||||
};
|
||||
|
||||
proto.initFoot = function () {
|
||||
var me = this;
|
||||
me.$foot = me.$el.find('>tfoot');
|
||||
if (!me.$foot.length) {
|
||||
me.$foot = $('<tfoot></tfoot>').appendTo(me.$el);
|
||||
}
|
||||
me.$foot.append(me.getFootHtml());
|
||||
me.$foot.on('click', '.scheduler-reset', me.onReset.bind(me));
|
||||
};
|
||||
|
||||
proto.getHeadHtml = function (data) {
|
||||
var me = this;
|
||||
var options = me.options;
|
||||
me.$head.append(sprintf($.fn.scheduler.templates.HALF_DAY_ROW,
|
||||
options.TIME_TITLE, // title: time
|
||||
options.WEEK_TITLE, // title: week
|
||||
me.options.accuracy * 12, // row span
|
||||
options.AM, // title: 上午
|
||||
me.options.accuracy * 12, // row span
|
||||
options.PM // title: 下午
|
||||
));
|
||||
|
||||
var hours = '';
|
||||
for (var i = 0; i < 24; i++) {
|
||||
hours += sprintf($.fn.scheduler.templates.HOUR_HEAD_CELL,
|
||||
i, // hour indexs
|
||||
options.accuracy, // row span
|
||||
i // hour text
|
||||
);
|
||||
}
|
||||
return sprintf('<tr>%s</tr>', hours);
|
||||
};
|
||||
|
||||
proto.getFootHtml = function () {
|
||||
var me = this;
|
||||
var options = me.options;
|
||||
return sprintf(
|
||||
$.fn.scheduler.templates.FOOT_ROW,
|
||||
options.accuracy * 24 + 1,
|
||||
options.DRAG_TIP,
|
||||
options.RESET
|
||||
);
|
||||
};
|
||||
|
||||
proto.getBodyHtml = function (data) {
|
||||
var me = this;
|
||||
var options = me.options;
|
||||
var rows = '';
|
||||
var cellOfRow = options.accuracy * 24;
|
||||
|
||||
for (var i = 1; i <= 7; i++) {
|
||||
var cells = '';
|
||||
var selectedHours = data[i];
|
||||
for (var j = 0; j < cellOfRow; j++) {
|
||||
cells += sprintf(
|
||||
$.fn.scheduler.templates.HOUR_CELL,
|
||||
selectedHours && ~selectedHours.indexOf(j) ? ' scheduler-active' : '',
|
||||
i,
|
||||
j
|
||||
);
|
||||
}
|
||||
rows += sprintf(
|
||||
$.fn.scheduler.templates.DAY_ROW,
|
||||
i,
|
||||
i,
|
||||
options.WEEK_DAYS[i - 1],
|
||||
cells
|
||||
);
|
||||
}
|
||||
|
||||
return rows;
|
||||
};
|
||||
|
||||
// toggle select one day
|
||||
proto.onToggleDay = function (e) {
|
||||
if (this.options.disabled) {
|
||||
return;
|
||||
}
|
||||
var index = $(e.target).parent().data('index');
|
||||
var startCoord = [index, 0]; // [row, col] row start form 1
|
||||
var endCoord = [index, 24 * this.options.accuracy - 1];
|
||||
var selectMode = this.getRangeSelectMode(startCoord, endCoord);
|
||||
this.updateToggle(startCoord, endCoord, selectMode);
|
||||
};
|
||||
|
||||
// toggle select half day
|
||||
proto.onToggleHalfDay = function (e) {
|
||||
if (this.options.disabled) {
|
||||
return;
|
||||
}
|
||||
var index = $(e.target).data('halfToggle'); // index = 1 | 2
|
||||
var fromIndex = (index - 1) * 12 * this.options.accuracy;
|
||||
var toIndex = fromIndex + 12 * this.options.accuracy - 1;
|
||||
var startCoord = [1, fromIndex]; // [row, col] row start form 1
|
||||
var endCoord = [7, toIndex];
|
||||
var selectMode = this.getRangeSelectMode(startCoord, endCoord);
|
||||
this.updateToggle(startCoord, endCoord, selectMode);
|
||||
};
|
||||
|
||||
// toggle select an hour
|
||||
proto.onToggleHour = function (e) {
|
||||
if (this.options.disabled) {
|
||||
return;
|
||||
}
|
||||
var index = $(e.target).data('hourToggle'); // index = 1 | 2
|
||||
var fromIndex = index * this.options.accuracy;
|
||||
var toIndex = fromIndex + this.options.accuracy - 1;
|
||||
var startCoord = [1, fromIndex]; // [row, col] row start form 1
|
||||
var endCoord = [7, toIndex];
|
||||
var selectMode = this.getRangeSelectMode(startCoord, endCoord);
|
||||
this.updateToggle(startCoord, endCoord, selectMode);
|
||||
};
|
||||
|
||||
proto.onMouseDown = function (e) {
|
||||
if (this.options.disabled) {
|
||||
return;
|
||||
}
|
||||
this.moving = true;
|
||||
var $cell = $(e.target);
|
||||
this.startCoord = [$cell.data('row'), $cell.data('col')];
|
||||
this.endCoord = this.startCoord.slice(0);
|
||||
this.selectMode = this.getCellSelectMode(this.startCoord);
|
||||
this.updateRange(this.startCoord, this.endCoord, this.selectMode);
|
||||
this.options.onDragStart.call(this.$el, this.cache);
|
||||
};
|
||||
|
||||
proto.onMouseMove = function (e) {
|
||||
if (!this.moving) {
|
||||
return false;
|
||||
}
|
||||
var $cell = $(e.target);
|
||||
var row = $cell.data('row');
|
||||
var col = $cell.data('col');
|
||||
if (!this.selectMode || !this.startCoord || (this.endCoord &&
|
||||
this.endCoord[0] === row &&
|
||||
this.endCoord[1] === col)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
this.endCoord = [$cell.data('row'), $cell.data('col')];
|
||||
this.updateRange(this.startCoord, this.endCoord, this.selectMode);
|
||||
this.options.onDragMove.call(this.$el, this.cache);
|
||||
};
|
||||
|
||||
proto.onMouseUp = function (e) {
|
||||
if (!this.moving) {
|
||||
return false;
|
||||
}
|
||||
// 起始点都在同一个位置
|
||||
if (this.startCoord[0] === this.endCoord[0] &&
|
||||
this.startCoord[1] === this.endCoord[1]) {
|
||||
this.updateRange(this.startCoord, this.endCoord, this.selectMode);
|
||||
}
|
||||
this.options.onDragEnd.call(this.$el, this.cache);
|
||||
this.end();
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据当前的选中坐标系更新视图,并更新选中数据
|
||||
* @param {Array} startCoord 起始坐标 [row, col]
|
||||
* @param {Array} endCoord 终结坐标 [row, col]
|
||||
* @param {SelectMode} selectMode 选择模式
|
||||
*/
|
||||
proto.updateToggle = function (startCoord, endCoord, selectMode) {
|
||||
this.updateRange(startCoord, endCoord, selectMode);
|
||||
this.end();
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据当前的选中坐标系更新视图
|
||||
* @param {Array} startCoord 起始坐标 [row, col]
|
||||
* @param {Array} endCoord 终结坐标 [row, col]
|
||||
* @param {SelectMode} selectMode 选择模式
|
||||
*/
|
||||
proto.updateRange = function (startCoord, endCoord, selectMode) {
|
||||
var currentSelectRange = makeMatrix(startCoord, endCoord);
|
||||
this.cache = this.merge(this.data, currentSelectRange, selectMode);
|
||||
this.update(this.cache);
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新视图
|
||||
* @param {Object} data 选中的时间集合
|
||||
*/
|
||||
proto.update = function (data) {
|
||||
this.$body.html(this.getBodyHtml(data));
|
||||
};
|
||||
|
||||
// 并更新选中数据
|
||||
proto.end = function () {
|
||||
this.data = this.cache;
|
||||
this.cache = null;
|
||||
this.moving = false;
|
||||
this.startCoord = null;
|
||||
this.endCoord = null;
|
||||
this.selectMode = SelectMode.NONE;
|
||||
this.options.onSelect.call(this.$el, this.val());
|
||||
};
|
||||
|
||||
proto.onReset = function () {
|
||||
if (this.options.disabled) {
|
||||
return;
|
||||
}
|
||||
this.val({});
|
||||
this.options.onSelect.call(this.$el, this.val());
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据选择模式合并合个集合
|
||||
* @param {Object} origin 上一次选中的数据
|
||||
* @param {Object} current 当前选中的数据
|
||||
* @param {Number} selectMode 选择模式 {0: none, 1: 选择(合并)模式, 2: 排除模式(从选区中减去)}
|
||||
*/
|
||||
proto.merge = function (origin, current, selectMode) {
|
||||
var res = {};
|
||||
// 替换模式下,弃用之前的选区,直接使用当前选区
|
||||
if (selectMode === SelectMode.REPLACE) {
|
||||
for (var i = 1; i <= 7; i++) {
|
||||
if (current[i] && current[i].length) {
|
||||
res[i] = current[i].slice(0);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
for (var i = 1; i <= 7; i++) {
|
||||
if (!current[i]) {
|
||||
if (origin[i] && origin[i].length) {
|
||||
res[i] = origin[i].slice(0);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (origin[i] && origin[i].length) {
|
||||
var m = selectMode === SelectMode.JOIN ?
|
||||
mergeArray(origin[i], current[i]) :
|
||||
rejectArray(origin[i], current[i]);
|
||||
m.length && (res[i] = m);
|
||||
} else if (selectMode === SelectMode.JOIN) {
|
||||
res[i] = current[i].slice(0);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据当前选中的范围内时间格式的空闲情况,决定是全选还是全不选
|
||||
* 全空闲:总时间格目 === 空闲时间格数目
|
||||
* 部分空闲:总时间格目 !== 空闲时间格数目
|
||||
* 无空闲:空闲时间格数目 === 0
|
||||
* 状态切换:
|
||||
* 当前范围全空闲 > 采用合并模式,全选当前范围
|
||||
* 部分空闲 > 采用合并模式,全选当前范围
|
||||
* 无空闲 > 采用合并模式,全不选当前范围
|
||||
*
|
||||
* @param {Array} startCoord 起始坐标 [row, col]
|
||||
* @param {Array} endCoord 终结坐标 [row, col]
|
||||
* @return {SelectMode}
|
||||
*/
|
||||
proto.getRangeSelectMode = function (startCoord, endCoord) {
|
||||
if (!this.options.multiple) {
|
||||
return SelectMode.REPLACE;
|
||||
}
|
||||
var rowRange = this.sortCoord(startCoord[0], endCoord[0]);
|
||||
var colRange = this.sortCoord(startCoord[1], endCoord[1]);
|
||||
var startRow = rowRange[0];
|
||||
var endRow = rowRange[1];
|
||||
var startCol = colRange[0];
|
||||
var endCol = colRange[1];
|
||||
var rows = endRow - startRow + 1;
|
||||
var cols = endCol - startCol + 1;
|
||||
var total = rows * cols;
|
||||
|
||||
// 计算已使用的时间格子
|
||||
// TODO 未过滤 disabled 的格子
|
||||
var used = 0;
|
||||
for (var i = 0; i < rows; i++) {
|
||||
var day = startRow + i;
|
||||
var data = this.data[day];
|
||||
if (!data) {
|
||||
continue;
|
||||
}
|
||||
for (var j = 0; j < data.length; j++) {
|
||||
if (data[j] >= startCol && data[j] <= endCol) {
|
||||
used++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return total === used ? SelectMode.MINUS : SelectMode.JOIN;
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据当前选中的时间格式的空闲情况,决定是全选还是全不选
|
||||
* 状态切换:
|
||||
* 当前为单选模式(multiple=false),-> 替换模式
|
||||
* 当前选中时间段为空闲 -> 全选不
|
||||
* 当前选中时间段为无空闲 - > 全不选
|
||||
*
|
||||
* @param {Array} startCoord 起始坐标 [row, col]
|
||||
* @return {SelectMode}
|
||||
*/
|
||||
proto.getCellSelectMode = function (coord) {
|
||||
if (!this.options.multiple) {
|
||||
return SelectMode.REPLACE;
|
||||
}
|
||||
// TODO 未过滤 disabled 的格子
|
||||
var day = this.data[coord[0]];
|
||||
return day && ~day.indexOf(coord[1]) ? SelectMode.MINUS : SelectMode.JOIN;
|
||||
};
|
||||
|
||||
proto.sortCoord = function (num1, num2) {
|
||||
if (num1 > num2) {
|
||||
return [num2, num1];
|
||||
}
|
||||
return [num1, num2];
|
||||
};
|
||||
|
||||
proto.disable = function () {
|
||||
this.$el.toggleClass('scheduler-disabled', true);
|
||||
this.options.disabled = true;
|
||||
};
|
||||
|
||||
proto.enable = function () {
|
||||
this.$el.toggleClass('scheduler-disabled', false);
|
||||
this.options.disabled = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* 如果无传参,则作为 Getter, 否则为 Setter
|
||||
* @param {Array} data optional 选中的内容
|
||||
* @return {Array} 返回当前选中的内容
|
||||
*/
|
||||
proto.val = function (data) {
|
||||
// setter
|
||||
if (toStr(data) === '[object Object]') {
|
||||
// TODO 数据结构校验
|
||||
this.data = data;
|
||||
this.update(data);
|
||||
|
||||
} else { // getter
|
||||
return this.merge(this.data, {}, SelectMode.JOIN);
|
||||
}
|
||||
};
|
||||
|
||||
proto.destroy = function () {
|
||||
this.$el.removeClass('scheduler').empty();
|
||||
};
|
||||
|
||||
$.extend(Scheduler.DEFAULTS, Scheduler.LOCALES.zh);
|
||||
|
||||
// SCHEDULER PLUGIN DEFINITION
|
||||
// ---------------------------
|
||||
|
||||
var apiMethods = [
|
||||
'val',
|
||||
'destroy',
|
||||
'disable',
|
||||
'enable'
|
||||
];
|
||||
|
||||
// Set as a jQuery plugin
|
||||
$.fn.scheduler = function (option) {
|
||||
var value;
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data('scheduler');
|
||||
var options = $.extend({}, Scheduler.DEFAULTS, $this.data(),
|
||||
typeof option === 'object' && option);
|
||||
|
||||
if (typeof option === 'string') {
|
||||
if ($.inArray(option, apiMethods) < 0) {
|
||||
throw new Error('Unknown method: ' + option);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
||||
value = data[option].apply(data, args);
|
||||
|
||||
if (option === 'destroy') {
|
||||
$this.removeData('scheduler');
|
||||
}
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
$this.data('scheduler', (data = new Scheduler(this, options)));
|
||||
}
|
||||
});
|
||||
|
||||
return typeof value === 'undefined' ? this : value;
|
||||
};
|
||||
|
||||
// Exports settings
|
||||
$.fn.scheduler.defaults = Scheduler.DEFAULTS;
|
||||
$.fn.scheduler.templates = Scheduler.TEMPLATES;
|
||||
$.fn.scheduler.locales = Scheduler.LOCALES;
|
||||
$.fn.scheduler.util = Scheduler.Util;
|
||||
})(jQuery);
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
(function(b){b.widget("ui.tagit",{options:{allowDuplicates:!1,caseSensitive:!0,fieldName:"tags",placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var a=
|
||||
this;this.element.is("input")?(this.tagList=b("<ul></ul>").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.addClass("tagit-hidden-field")):this.tagList=this.element.find("ul, ol").andSelf().last();this.tagInput=b('<input type="text" />').addClass("ui-widget-content");this.options.readOnly&&this.tagInput.attr("disabled","disabled");this.options.tabIndex&&this.tagInput.attr("tabindex",this.options.tabIndex);this.options.placeholderText&&this.tagInput.attr("placeholder",
|
||||
this.options.placeholderText);this.options.autocomplete.source||(this.options.autocomplete.source=function(a,e){var d=a.term.toLowerCase(),c=b.grep(this.options.availableTags,function(a){return 0===a.toLowerCase().indexOf(d)});this.options.allowDuplicates||(c=this._subtractArray(c,this.assignedTags()));e(c)});this.options.showAutocompleteOnFocus&&(this.tagInput.focus(function(b,d){a._showAutocomplete()}),"undefined"===typeof this.options.autocomplete.minLength&&(this.options.autocomplete.minLength=
|
||||
0));b.isFunction(this.options.autocomplete.source)&&(this.options.autocomplete.source=b.proxy(this.options.autocomplete.source,this));b.isFunction(this.options.tagSource)&&(this.options.tagSource=b.proxy(this.options.tagSource,this));this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(b('<li class="tagit-new"></li>').append(this.tagInput)).click(function(d){var c=b(d.target);c.hasClass("tagit-label")?(c=c.closest(".tagit-choice"),c.hasClass("removed")||a._trigger("onTagClicked",
|
||||
d,{tag:c,tagLabel:a.tagLabel(c)})):a.tagInput.focus()});var c=!1;if(this.options.singleField)if(this.options.singleFieldNode){var d=b(this.options.singleFieldNode),f=d.val().split(this.options.singleFieldDelimiter);d.val("");b.each(f,function(b,d){a.createTag(d,null,!0);c=!0})}else this.options.singleFieldNode=b('<input type="hidden" style="display:none;" value="" name="'+this.options.fieldName+'" />'),this.tagList.after(this.options.singleFieldNode);c||this.tagList.children("li").each(function(){b(this).hasClass("tagit-new")||
|
||||
(a.createTag(b(this).text(),b(this).attr("class"),!0),b(this).remove())});this.tagInput.keydown(function(c){if(c.which==b.ui.keyCode.BACKSPACE&&""===a.tagInput.val()){var d=a._lastTag();!a.options.removeConfirmation||d.hasClass("remove")?a.removeTag(d):a.options.removeConfirmation&&d.addClass("remove ui-state-highlight")}else a.options.removeConfirmation&&a._lastTag().removeClass("remove ui-state-highlight");if(c.which===b.ui.keyCode.COMMA&&!1===c.shiftKey||c.which===b.ui.keyCode.ENTER||c.which==
|
||||
b.ui.keyCode.TAB&&""!==a.tagInput.val()||c.which==b.ui.keyCode.SPACE&&!0!==a.options.allowSpaces&&('"'!=b.trim(a.tagInput.val()).replace(/^s*/,"").charAt(0)||'"'==b.trim(a.tagInput.val()).charAt(0)&&'"'==b.trim(a.tagInput.val()).charAt(b.trim(a.tagInput.val()).length-1)&&0!==b.trim(a.tagInput.val()).length-1))c.which===b.ui.keyCode.ENTER&&""===a.tagInput.val()||c.preventDefault(),a.options.autocomplete.autoFocus&&a.tagInput.data("autocomplete-open")||(a.tagInput.autocomplete("close"),a.createTag(a._cleanedInput()))}).blur(function(b){a.tagInput.data("autocomplete-open")||
|
||||
a.createTag(a._cleanedInput())});if(this.options.availableTags||this.options.tagSource||this.options.autocomplete.source)d={select:function(b,c){a.createTag(c.item.value);return!1}},b.extend(d,this.options.autocomplete),d.source=this.options.tagSource||d.source,this.tagInput.autocomplete(d).bind("autocompleteopen.tagit",function(b,c){a.tagInput.data("autocomplete-open",!0)}).bind("autocompleteclose.tagit",function(b,c){a.tagInput.data("autocomplete-open",!1)}),this.tagInput.autocomplete("widget").addClass("tagit-autocomplete")},
|
||||
destroy:function(){b.Widget.prototype.destroy.call(this);this.element.unbind(".tagit");this.tagList.unbind(".tagit");this.tagInput.removeData("autocomplete-open");this.tagList.removeClass("tagit ui-widget ui-widget-content ui-corner-all tagit-hidden-field");this.element.is("input")?(this.element.removeClass("tagit-hidden-field"),this.tagList.remove()):(this.element.children("li").each(function(){b(this).hasClass("tagit-new")?b(this).remove():(b(this).removeClass("tagit-choice ui-widget-content ui-state-default ui-state-highlight ui-corner-all remove tagit-choice-editable tagit-choice-read-only"),
|
||||
b(this).text(b(this).children(".tagit-label").text()))}),this.singleFieldNode&&this.singleFieldNode.remove());return this},_cleanedInput:function(){return b.trim(this.tagInput.val().replace(/^"(.*)"$/,"$1"))},_lastTag:function(){return this.tagList.find(".tagit-choice:last:not(.removed)")},_tags:function(){return this.tagList.find(".tagit-choice:not(.removed)")},assignedTags:function(){var a=this,c=[];this.options.singleField?(c=b(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter),
|
||||
""===c[0]&&(c=[])):this._tags().each(function(){c.push(a.tagLabel(this))});return c},_updateSingleTagsField:function(a){b(this.options.singleFieldNode).val(a.join(this.options.singleFieldDelimiter)).trigger("change")},_subtractArray:function(a,c){for(var d=[],f=0;f<a.length;f++)-1==b.inArray(a[f],c)&&d.push(a[f]);return d},tagLabel:function(a){return this.options.singleField?b(a).find(".tagit-label:first").text():b(a).find("input:first").val()},_showAutocomplete:function(){this.tagInput.autocomplete("search",
|
||||
"")},_findTagByLabel:function(a){var c=this,d=null;this._tags().each(function(f){if(c._formatStr(a)==c._formatStr(c.tagLabel(this)))return d=b(this),!1});return d},_isNew:function(a){return!this._findTagByLabel(a)},_formatStr:function(a){return this.options.caseSensitive?a:b.trim(a.toLowerCase())},_effectExists:function(a){return Boolean(b.effects&&(b.effects[a]||b.effects.effect&&b.effects.effect[a]))},createTag:function(a,c,d){var f=this;a=b.trim(a);this.options.preprocessTag&&(a=this.options.preprocessTag(a));
|
||||
if(""===a)return!1;if(!this.options.allowDuplicates&&!this._isNew(a))return a=this._findTagByLabel(a),!1!==this._trigger("onTagExists",null,{existingTag:a,duringInitialization:d})&&this._effectExists("highlight")&&a.effect("highlight"),!1;if(this.options.tagLimit&&this._tags().length>=this.options.tagLimit)return this._trigger("onTagLimitExceeded",null,{duringInitialization:d}),!1;var g=b(this.options.onTagClicked?'<a class="tagit-label"></a>':'<span class="tagit-label"></span>').text(a),e=b("<li></li>").addClass("tagit-choice ui-widget-content ui-state-default ui-corner-all").addClass(c).append(g);
|
||||
this.options.readOnly?e.addClass("tagit-choice-read-only"):(e.addClass("tagit-choice-editable"),c=b("<span></span>").addClass("ui-icon ui-icon-close"),c=b('<a><span class="text-icon">\u00d7</span></a>').addClass("tagit-close").append(c).click(function(a){f.removeTag(e)}),e.append(c));this.options.singleField||(g=g.html(),e.append('<input type="hidden" value="'+g+'" name="'+this.options.fieldName+'" class="tagit-hidden-field" />'));!1!==this._trigger("beforeTagAdded",null,{tag:e,tagLabel:this.tagLabel(e),
|
||||
duringInitialization:d})&&(this.options.singleField&&(g=this.assignedTags(),g.push(a),this._updateSingleTagsField(g)),this._trigger("onTagAdded",null,e),this.tagInput.val(""),this.tagInput.parent().before(e),this._trigger("afterTagAdded",null,{tag:e,tagLabel:this.tagLabel(e),duringInitialization:d}),this.options.showAutocompleteOnFocus&&!d&&setTimeout(function(){f._showAutocomplete()},0))},removeTag:function(a,c){c="undefined"===typeof c?this.options.animate:c;a=b(a);this._trigger("onTagRemoved",
|
||||
null,a);if(!1!==this._trigger("beforeTagRemoved",null,{tag:a,tagLabel:this.tagLabel(a)})){if(this.options.singleField){var d=this.assignedTags(),f=this.tagLabel(a),d=b.grep(d,function(a){return a!=f});this._updateSingleTagsField(d)}if(c){a.addClass("removed");var d=this._effectExists("blind")?["blind",{direction:"horizontal"},"fast"]:["fast"],g=this;d.push(function(){a.remove();g._trigger("afterTagRemoved",null,{tag:a,tagLabel:g.tagLabel(a)})});a.fadeOut("fast").hide.apply(a,d).dequeue()}else a.remove(),
|
||||
this._trigger("afterTagRemoved",null,{tag:a,tagLabel:this.tagLabel(a)})}},removeTagByLabel:function(a,b){var d=this._findTagByLabel(a);if(!d)throw"No such tag exists with the name '"+a+"'";this.removeTag(d,b)},removeAll:function(){var a=this;this._tags().each(function(b,d){a.removeTag(d,!1)})}})})(jQuery);
|
||||
@@ -0,0 +1,140 @@
|
||||
$(function(){
|
||||
// var btn_Array = [];
|
||||
// var result = null;
|
||||
// var last = btn_Array.at(-1);
|
||||
|
||||
// 2024.05.09 메뉴클릭시
|
||||
let $leftMenu = $('.left-side .btn-menu');
|
||||
let $utilNav = $('.left-side, .util-nav');
|
||||
let $sideBtn = $('.left-side .nav > li > button');
|
||||
let $sideCollapse = $('.left-side .nav .collapse');
|
||||
$leftMenu.on('click', function() {
|
||||
toggleLeftSide();
|
||||
});
|
||||
function toggleLeftSide() {
|
||||
$sideBtn.attr('aria-expanded', false);
|
||||
$sideCollapse.removeClass('show');
|
||||
$utilNav.toggleClass('active');
|
||||
}
|
||||
//left-side 메뉴 클릭시
|
||||
$('.nav>li>button').on('click', function(){
|
||||
let allExpand = $('.nav>li>button[aria-expanded="true"]').length;
|
||||
let expand = $(this).attr('aria-expanded');
|
||||
if(expand == 'true' && allExpand == 1){
|
||||
$utilNav.addClass('active');
|
||||
}
|
||||
// if(expand == 'false' && !allExpand){
|
||||
// $utilNav.removeClass('active');
|
||||
// }
|
||||
});
|
||||
//left-side js
|
||||
//left-side 다른영역 클릭 시 클래스 해제
|
||||
function leftMenuResize() {
|
||||
// var width = $(this).width();
|
||||
// if(width <= 1024){
|
||||
// }
|
||||
$sideBtn.attr('aria-expanded', false);
|
||||
$sideCollapse.removeClass('show');
|
||||
$utilNav.removeClass('open hide active');
|
||||
}
|
||||
$('.main-contents-wrap, .sub-contents-wrap').on('click', function(e) {
|
||||
if(!$utilNav.is(e.target) && $utilNav.has(e.target).length === 0) {
|
||||
if($utilNav.hasClass('active')) {
|
||||
leftMenuResize();
|
||||
}
|
||||
}
|
||||
});
|
||||
//left-side 리사이즈 시
|
||||
$(window).one('resize', function() {
|
||||
leftMenuResize();
|
||||
});
|
||||
|
||||
|
||||
// //웹
|
||||
// $('.nav-wrap').on(function(){
|
||||
// if($('.left-side').hasClass('active') && $('.left-side').hasClass('hide')){
|
||||
// $utilNav.removeClass('hide');
|
||||
// }
|
||||
// else if($('.left-side').hasClass('active') && $('.left-side').hasClass('open')){
|
||||
// $utilNav.removeClass('open');
|
||||
// }
|
||||
// });
|
||||
// //모바일웹
|
||||
// $('.nav-wrap').on('mouseleave','touchend',function(){
|
||||
// if($('.left-side').hasClass('active') && $(window).width() > 1024){
|
||||
// $utilNav.addClass('hide');
|
||||
// }
|
||||
// else if($('.left-side').hasClass('active') && $(window).width() <= 1024) {
|
||||
// $utilNav.addClass('open');
|
||||
// }
|
||||
// });
|
||||
|
||||
// 2024.05.09 메뉴클릭시 끝
|
||||
$('.btn-top .head').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('html, body').animate({scrollTop:0},500)
|
||||
})
|
||||
$('.btn-top .list').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('html, body').animate({scrollTop:$('.dataTable').offset().top},500)
|
||||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
setTimeout(function() {
|
||||
if(!$('.dataTable').is(':visible')) {
|
||||
$('.btn-top .list').fadeOut();
|
||||
}
|
||||
//top 버튼 위치 수정 2024.04
|
||||
let $btnDebug = $("#debug-icon");
|
||||
if ($btnDebug.length > 0) {
|
||||
let $btnDebugH = $btnDebug.outerHeight() + 3 ;
|
||||
let $btnTop = $(".btn-top");
|
||||
$btnTop.css("bottom", $btnDebugH + "px");
|
||||
}
|
||||
|
||||
},1000);
|
||||
|
||||
var clipboard = new ClipboardJS('.copy', {
|
||||
text: function(trigger) {
|
||||
return $(trigger).data('clipboard-text');
|
||||
}
|
||||
});
|
||||
clipboard.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
showTooltip(e.trigger, '복사완료!');
|
||||
});
|
||||
clipboard.on('error', function(e) {
|
||||
showTooltip(e.trigger, fallbackMessage(e.action));
|
||||
});
|
||||
$(".modal").on("shown.bs.modal", function() {
|
||||
var modalClipboard = new ClipboardJS('.copy', {
|
||||
container: document.querySelector('.modal'),
|
||||
text: function(trigger) {
|
||||
return $(trigger).data('clipboard-text');
|
||||
}
|
||||
});
|
||||
modalClipboard.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
showTooltip(e.trigger, '복사완료!');
|
||||
});
|
||||
modalClipboard.on('error', function(e) {
|
||||
showTooltip(e.trigger, fallbackMessage(e.action));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('.toggle').on('click', function(){
|
||||
$(this).toggleClass('folded');
|
||||
});
|
||||
|
||||
$('.dataTables_info > i').on('click',function(){
|
||||
$('.txt-info').toggle();
|
||||
});
|
||||
|
||||
$(document).ajaxComplete(function(event, jqxhr, settings) {
|
||||
// 401 응답 처리
|
||||
if (jqxhr.status === 401) {
|
||||
window.location.href = '/login';
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user