아파트 평면도 상세 페이지 추가
This commit is contained in:
@@ -647,9 +647,9 @@
|
||||
// { 'className': 'text-center', 'targets': [0, 2, 3, 4] },
|
||||
],
|
||||
columns: [
|
||||
{ data: null, render: fn_chk_render, width: "50px" },
|
||||
{ data: null, render: fn_chk_render, width: "50px", className: "dt-no-rowclick" },
|
||||
|
||||
{ data: 'apt_step', render: fn_stat_render, width: "80px" },
|
||||
{ data: 'apt_step', render: fn_stat_render, width: "80px", },
|
||||
{ data: 'part_no', width: "80px" },
|
||||
{ data: 'hscp_no', width: "100px" },
|
||||
{ data: 'addr' },
|
||||
@@ -657,9 +657,9 @@
|
||||
{ data: 'pyeong_cnt', width: "80px" },
|
||||
{ data: 'dept_nm', width: "80px" },
|
||||
{ data: 'usr_nm', width: "50px" },
|
||||
{ data: null, render: fn_btn_upload },
|
||||
{ data: null, render: fn_btn_preview, width: "80px" },
|
||||
{ data: null, render: fn_btn_download, width: "80px" },
|
||||
{ data: null, render: fn_btn_upload, className: "dt-no-rowclick" },
|
||||
{ data: null, render: fn_btn_preview, width: "80px", className: "dt-no-rowclick" },
|
||||
{ data: null, render: fn_btn_download, width: "80px", className: "dt-no-rowclick" },
|
||||
|
||||
],
|
||||
// 옵션들 예시
|
||||
@@ -669,10 +669,14 @@
|
||||
serverSide: true,
|
||||
});
|
||||
|
||||
$('#resultList tbody').on('click', 'tr', function () {
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
|
||||
|
||||
const rcpt_no = rowData.rcpt_no;
|
||||
const hscp_no = rowData.hscp_no;
|
||||
location.href = "<?= site_url('article/apt/ground/detail') ?>/" + rcpt_no + "/" + hscp_no;
|
||||
@@ -705,7 +709,8 @@
|
||||
});
|
||||
|
||||
// 리스트 파일업로드
|
||||
$(document).on("click", ".btn-upload-photo", function () {
|
||||
$(document).on("click", ".btn-upload-photo", function (e) {
|
||||
e.stopPropagation();
|
||||
const row = $('#resultList').DataTable()
|
||||
.row($(this).closest('tr'))
|
||||
.data();
|
||||
@@ -715,6 +720,12 @@
|
||||
$("#uploadModal").modal("show");
|
||||
});
|
||||
|
||||
// 미리보기
|
||||
$(document).on('click', '.btn-preview', function (e) {
|
||||
e.stopPropagation(); // 행 클릭 방지(2중 안전)
|
||||
fn_preview($(this).data('src'));
|
||||
});
|
||||
|
||||
/**
|
||||
* 파일 Dropzone
|
||||
* */
|
||||
@@ -791,7 +802,7 @@
|
||||
});
|
||||
|
||||
dz.on("queuecomplete", function () {
|
||||
// table.ajax.reload()
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
dz.on("successmultiple", function () {
|
||||
@@ -1038,20 +1049,17 @@
|
||||
|
||||
// 미리보기 btn
|
||||
function fn_btn_preview(data, type, row) {
|
||||
var str = "";
|
||||
if (row.pho_no == null) return '';
|
||||
|
||||
if (row.pho_no != null) {
|
||||
var src = "";
|
||||
if (row.cloud_upload_yn == "Y") {
|
||||
src = '<?= NCLOUD_OBJECT_STORAGE_URL ?>' + '' + row.file_path + '' + row.filenm_up;
|
||||
} else {
|
||||
src = row.file_path + '' + row.filenm_up;
|
||||
}
|
||||
let src = (row.cloud_upload_yn == "Y")
|
||||
? '<?= NCLOUD_OBJECT_STORAGE_URL ?>' + row.file_path + row.filenm_up
|
||||
: row.file_path + row.filenm_up;
|
||||
|
||||
str = `<a onclick="fn_preview('${src}');">미리보기</a>`;
|
||||
}
|
||||
|
||||
return str;
|
||||
return `
|
||||
<button type="button" class="btn btn-sm btn-link p-0 btn-preview" data-src="${src}">
|
||||
미리보기
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
|
||||
// 다운로드 btn
|
||||
|
||||
Reference in New Issue
Block a user