2022-09-17 20:50:50 +09:00
|
|
|
// 레이아웃 셋팅 - 반응형
|
|
|
|
|
fn_layout_setting();
|
|
|
|
|
|
|
|
|
|
// 화면 사이즈가 변경 될 시, 레이아웃 셋팅 실행
|
2024-09-23 11:45:33 +09:00
|
|
|
window.onresize = function () { fn_layout_setting(); };
|
2022-09-17 20:50:50 +09:00
|
|
|
|
|
|
|
|
// 즐겨찾기 추가 - Ajax
|
2024-09-23 11:45:33 +09:00
|
|
|
$('a[data-function="favorite"]').on('click', function () {
|
|
|
|
|
var formData = new FormData();
|
|
|
|
|
var idx = $(this).data('idx');
|
|
|
|
|
var obj = $(this);
|
|
|
|
|
formData.append("wr_id", idx);
|
|
|
|
|
formData.append("bo_table", g5_bo_table);
|
|
|
|
|
formData.append("mb_id", avo_mb_id);
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: avo_board_skin_url + '/ajax/add_favorite.php'
|
|
|
|
|
, data: formData
|
|
|
|
|
, processData: false
|
|
|
|
|
, contentType: false
|
|
|
|
|
, type: 'POST'
|
|
|
|
|
, success: function (data) {
|
|
|
|
|
if (data == 'on') {
|
|
|
|
|
obj.removeClass('on');
|
|
|
|
|
obj.addClass(data);
|
|
|
|
|
} else if (data == 'off') {
|
|
|
|
|
obj.removeClass('on');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
2022-09-17 20:50:50 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
$('a.ui-open-log').on('click', function () {
|
2022-09-17 20:50:50 +09:00
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
var obj = $(this).closest('.pic-data').children('div');
|
|
|
|
|
var state = $(obj).hasClass('on');
|
|
|
|
|
var original_height = $(obj).find('img').height();
|
|
|
|
|
var setting_height = 470;
|
2022-09-17 20:50:50 +09:00
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
if (state) {
|
|
|
|
|
//닫기
|
|
|
|
|
$(obj).stop().animate({ height: setting_height + "px" }, 1000);
|
|
|
|
|
$(obj).removeClass('on');
|
|
|
|
|
$(this).text("OPEN");
|
|
|
|
|
} else {
|
|
|
|
|
// 열기
|
|
|
|
|
$(obj).stop().animate({ height: original_height + "px" }, 1000);
|
|
|
|
|
$(obj).addClass('on');
|
|
|
|
|
$(this).text("CLOSE");
|
|
|
|
|
}
|
2022-09-17 20:50:50 +09:00
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
return false;
|
2022-09-17 20:50:50 +09:00
|
|
|
});
|
|
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
$('a.ui-remove-blind').on('click', function () {
|
|
|
|
|
$(this).closest('.pic-data').removeClass('ui-blind');
|
|
|
|
|
$(this).fadeOut();
|
|
|
|
|
return false;
|
2022-09-17 20:50:50 +09:00
|
|
|
});
|
|
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
$('.send_memo').on('click', function () {
|
|
|
|
|
var target = $(this).attr('href');
|
|
|
|
|
window.open(target, 'memo', "width=500, height=300");
|
|
|
|
|
return false;
|
2022-09-17 20:50:50 +09:00
|
|
|
});
|
|
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
$('.btn-search-guide').on('click', function () {
|
|
|
|
|
$('#searc_keyword').toggleClass('on');
|
|
|
|
|
return false;
|
2022-09-17 20:50:50 +09:00
|
|
|
});
|
|
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
$(window).ready(function () {
|
|
|
|
|
$('#load_log_board').css('opacity', '1.0');
|
2022-09-17 20:50:50 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function fn_layout_setting() {
|
2024-09-23 11:45:33 +09:00
|
|
|
$('#log_list > .item').each(function () {
|
|
|
|
|
var log_data_width = $(this).find('.ui-pic').data('width');
|
|
|
|
|
var log_width = $(this).find('.pic-data').find('img').width();
|
|
|
|
|
|
|
|
|
|
if (log_data_width < log_width && log_width > 300) {
|
|
|
|
|
log_data_width = log_width;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var comment_width = $('#log_list .item-inner').width() - log_data_width + 10;
|
|
|
|
|
if (comment_width > 320) {
|
|
|
|
|
$(this).removeClass('both');
|
|
|
|
|
$(this).find('.ui-comment').css('width', comment_width - 20 + "px");
|
|
|
|
|
} else {
|
|
|
|
|
$(this).addClass('both');
|
|
|
|
|
$(this).find('.ui-comment').css('width', "auto");
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-09-17 20:50:50 +09:00
|
|
|
};
|
|
|
|
|
|
2024-09-23 11:45:33 +09:00
|
|
|
$('.new_win').on('click', function () {
|
|
|
|
|
var target = $(this).attr('href');
|
|
|
|
|
window.open(target, 'emoticon', "width=400, height=600");
|
|
|
|
|
return false;
|
|
|
|
|
});
|