이용자 목록, 이용자 상세 스타일 정리
This commit is contained in:
@@ -9857,6 +9857,609 @@ select.form-control {
|
||||
}
|
||||
}
|
||||
|
||||
.user-management-container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 48px 40px;
|
||||
background-color: #F8FAFC;
|
||||
min-height: 100vh;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.user-management-container {
|
||||
padding: 24px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-management-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.user-management-header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-management-title h1 {
|
||||
font-size: 14px;
|
||||
color: #64748B;
|
||||
font-weight: 400;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.user-management-title h2 {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: #1A1A2E;
|
||||
}
|
||||
|
||||
.user-management-actions {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.btn-create-user,
|
||||
.btn-create-user-large {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 32px;
|
||||
background: linear-gradient(135deg, #4B9BFF 0%, #2E7FF7 100%);
|
||||
color: #FFFFFF;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 12px rgba(75, 155, 255, 0.1);
|
||||
}
|
||||
.btn-create-user:hover,
|
||||
.btn-create-user-large:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 24px rgba(75, 155, 255, 0.15);
|
||||
}
|
||||
.btn-create-user:active,
|
||||
.btn-create-user-large:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.btn-create-user .btn-icon,
|
||||
.btn-create-user-large .btn-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.btn-create-user-large {
|
||||
padding: 16px 40px;
|
||||
font-size: 18px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.table-controls {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.table-controls {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.total-count {
|
||||
font-size: 16px;
|
||||
color: #64748B;
|
||||
}
|
||||
.total-count strong {
|
||||
color: #4B9BFF;
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.user-list-wrapper {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.user-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
display: grid;
|
||||
grid-template-columns: 60px 120px 1fr 150px 120px 200px;
|
||||
gap: 16px;
|
||||
padding: 16px 24px;
|
||||
background: #EFF6FF;
|
||||
border-bottom: 2px solid #E2E8F0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #1A1A2E;
|
||||
}
|
||||
@media (max-width: 1280px) {
|
||||
.table-header {
|
||||
grid-template-columns: 50px 100px 1fr 120px 100px 180px;
|
||||
font-size: 12px;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1024px) {
|
||||
.table-header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: grid;
|
||||
grid-template-columns: 60px 120px 1fr 150px 120px 200px;
|
||||
gap: 16px;
|
||||
padding: 24px;
|
||||
border-bottom: 1px solid #E2E8F0;
|
||||
align-items: center;
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
.table-row:hover {
|
||||
background-color: rgba(75, 155, 255, 0.02);
|
||||
}
|
||||
.table-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.table-row.row-pending {
|
||||
background-color: rgba(255, 217, 61, 0.03);
|
||||
border-left: 3px solid #FFD93D;
|
||||
}
|
||||
@media (max-width: 1280px) {
|
||||
.table-row {
|
||||
grid-template-columns: 50px 100px 1fr 120px 100px 180px;
|
||||
padding: 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1024px) {
|
||||
.table-row {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 8px;
|
||||
padding: 16px;
|
||||
}
|
||||
.table-row::before {
|
||||
content: attr(data-label);
|
||||
font-weight: 600;
|
||||
color: #64748B;
|
||||
}
|
||||
}
|
||||
|
||||
.col-num {
|
||||
font-size: 14px;
|
||||
color: #64748B;
|
||||
text-align: center;
|
||||
}
|
||||
@media (max-width: 1024px) {
|
||||
.col-num {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.col-name {
|
||||
font-weight: 500;
|
||||
}
|
||||
.col-name a {
|
||||
color: #1A1A2E;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.col-name a:hover {
|
||||
color: #4B9BFF;
|
||||
}
|
||||
.col-name .pending-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: #64748B;
|
||||
font-style: italic;
|
||||
}
|
||||
.col-name .pending-label i {
|
||||
color: #FFD93D;
|
||||
}
|
||||
|
||||
.col-email {
|
||||
color: #64748B;
|
||||
font-size: 14px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.col-role {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user-role-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
background-color: rgba(75, 155, 255, 0.1);
|
||||
color: #4B9BFF;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.user-role-badge i {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.col-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.col-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.user-status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 6px 12px;
|
||||
border-radius: 50px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.user-status-badge.status-active {
|
||||
background-color: rgba(107, 207, 127, 0.1);
|
||||
color: rgb(68.4897959184, 194.5102040816, 93.693877551);
|
||||
}
|
||||
.user-status-badge.status-inactive {
|
||||
background-color: rgba(100, 116, 139, 0.1);
|
||||
color: #64748B;
|
||||
}
|
||||
.user-status-badge.status-pending {
|
||||
background-color: rgba(255, 217, 61, 0.15);
|
||||
color: rgb(163, 131.0721649485, 0);
|
||||
}
|
||||
|
||||
.user-current-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
background-color: rgba(167, 139, 250, 0.1);
|
||||
color: #A78BFA;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.user-action-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
.user-action-buttons .btn-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-sm {
|
||||
padding: 4px 10px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-primary {
|
||||
background-color: #4B9BFF;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-primary:hover {
|
||||
background-color: rgb(24, 126.6666666667, 255);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-secondary {
|
||||
background-color: #64748B;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-secondary:hover {
|
||||
background-color: rgb(78.6610878661, 91.2468619247, 109.3389121339);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-danger {
|
||||
background-color: #FF6B6B;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-danger:hover {
|
||||
background-color: #ff3838;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-warning {
|
||||
background-color: #FFD93D;
|
||||
color: #1F2937;
|
||||
}
|
||||
.user-action-buttons .btn-action.btn-warning:hover {
|
||||
background-color: rgb(255, 207.0103092784, 10);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.user-action-buttons .btn-action:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.user-empty-state {
|
||||
text-align: center;
|
||||
padding: 80px 24px;
|
||||
color: #64748B;
|
||||
}
|
||||
.user-empty-state .empty-icon {
|
||||
font-size: 80px;
|
||||
margin-bottom: 24px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.user-empty-state h3 {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #1A1A2E;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.user-empty-state p {
|
||||
font-size: 16px;
|
||||
color: #64748B;
|
||||
}
|
||||
|
||||
.user-detail-container {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
padding: 40px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.user-detail-container {
|
||||
padding: 24px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.user-profile-card {
|
||||
background: linear-gradient(135deg, #4B9BFF 0%, #2E7FF7 100%);
|
||||
color: #FFFFFF;
|
||||
margin-bottom: 32px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.user-profile-card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
right: -20%;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 50%;
|
||||
}
|
||||
.user-profile-card .detail-grid {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.user-profile-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 32px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.user-profile-header {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.user-profile-avatar {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.avatar-circle-large {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 40px;
|
||||
font-weight: 700;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: #FFFFFF;
|
||||
border: 4px solid rgba(255, 255, 255, 0.3);
|
||||
box-shadow: 0 8px 24px rgba(75, 155, 255, 0.15);
|
||||
}
|
||||
|
||||
.user-profile-info {
|
||||
flex: 1;
|
||||
}
|
||||
.user-profile-info h2 {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.user-profile-info .user-profile-email {
|
||||
font-size: 16px;
|
||||
opacity: 0.9;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.user-profile-badges {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.user-profile-badges {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.user-profile-badges .user-status-badge,
|
||||
.user-profile-badges .user-role-badge {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: #FFFFFF;
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.detail-section {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12px;
|
||||
padding: 32px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.detail-section h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: #1A1A2E;
|
||||
margin-bottom: 24px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 2px solid #EFF6FF;
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 24px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.detail-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
.detail-item.full-width {
|
||||
grid-column: 1/-1;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #64748B;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.detail-label i {
|
||||
color: #4B9BFF;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
font-size: 16px;
|
||||
color: #1A1A2E;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.status-indicator.status-active {
|
||||
background-color: rgba(107, 207, 127, 0.1);
|
||||
color: rgb(68.4897959184, 194.5102040816, 93.693877551);
|
||||
}
|
||||
.status-indicator.status-active .status-dot {
|
||||
background-color: #6BCF7F;
|
||||
}
|
||||
.status-indicator.status-inactive {
|
||||
background-color: rgba(100, 116, 139, 0.1);
|
||||
color: #64748B;
|
||||
}
|
||||
.status-indicator.status-inactive .status-dot {
|
||||
background-color: #64748B;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
.detail-actions {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
justify-content: center;
|
||||
padding-top: 24px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.detail-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 32px;
|
||||
background-color: #FFFFFF;
|
||||
color: #1A1A2E;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
border: 2px solid #E2E8F0;
|
||||
border-radius: 12px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
background-color: #F8FAFC;
|
||||
border-color: #4B9BFF;
|
||||
color: #4B9BFF;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.btn-secondary:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.btn-secondary i {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,30 +1,86 @@
|
||||
const customPopups = {
|
||||
/**
|
||||
* 알림 팝업 표시
|
||||
* @param {string} message - 알림 메시지
|
||||
* @param {Function} callback - 확인 버튼 클릭 시 호출되는 콜백 (선택사항)
|
||||
*/
|
||||
showAlert: function (message, callback) {
|
||||
// 메시지 설정
|
||||
$('#customAlertMessage').text(message);
|
||||
$('#customAlert').css('display', 'flex');
|
||||
|
||||
// Enter 키 이벤트 리스너 추가
|
||||
$(document).on('keydown.customAlert', function (e) {
|
||||
// 팝업 표시 (modal 구조 사용)
|
||||
$('#customAlert').show();
|
||||
setTimeout(function() {
|
||||
$('#customAlertBackdrop').addClass('show');
|
||||
$('#customAlertModal').addClass('show');
|
||||
}, 10);
|
||||
|
||||
// Body 스크롤 방지
|
||||
$('body').css('overflow', 'hidden');
|
||||
|
||||
// 확인 버튼에 포커스
|
||||
setTimeout(function() {
|
||||
$('#customAlertOkButton').focus();
|
||||
}, 350);
|
||||
|
||||
// 확인 버튼 클릭 이벤트 (기존 이벤트 제거 후 재등록)
|
||||
$('#customAlertOkButton').off('click').on('click', function () {
|
||||
customPopups.hideAlert();
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
// 닫기 버튼 클릭 이벤트
|
||||
$('#customAlertCloseButton').off('click').on('click', function () {
|
||||
customPopups.hideAlert();
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
// Enter 키 이벤트
|
||||
$(document).off('keydown.customAlert').on('keydown.customAlert', function (e) {
|
||||
if (e.key === 'Enter') {
|
||||
customPopups.hideAlert('#customAlert');
|
||||
customPopups.hideAlert();
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 확인 버튼 클릭 시 콜백 호출
|
||||
$('#customAlertOkButton').off('click').on('click', function () {
|
||||
customPopups.hideAlert('#customAlert');
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
// Escape 키 이벤트
|
||||
$(document).off('keydown.customAlertEsc').on('keydown.customAlertEsc', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
customPopups.hideAlert();
|
||||
if (typeof callback === 'function') {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
hideAlert: function (id) {
|
||||
$(id).hide();
|
||||
|
||||
/**
|
||||
* 알림 팝업 숨기기
|
||||
*/
|
||||
hideAlert: function () {
|
||||
// Modal 숨김 애니메이션
|
||||
$('#customAlertBackdrop').removeClass('show');
|
||||
$('#customAlertModal').removeClass('show');
|
||||
|
||||
// 애니메이션 완료 후 숨김
|
||||
setTimeout(function() {
|
||||
$('#customAlert').hide();
|
||||
}, 300);
|
||||
|
||||
// Body 스크롤 복원
|
||||
$('body').css('overflow', '');
|
||||
|
||||
// 이벤트 리스너 제거
|
||||
$('#customAlertOkButton').off('click');
|
||||
$('#customAlertCloseButton').off('click');
|
||||
$(document).off('keydown.customAlert');
|
||||
$(document).off('keydown.customAlertEsc');
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -153,17 +209,97 @@ const customPopups = {
|
||||
$('#passwordPopupError').removeClass('show');
|
||||
$('#passwordPopupInput').removeClass('error');
|
||||
},
|
||||
/**
|
||||
* 확인 팝업 표시
|
||||
* @param {string} message - 확인 메시지
|
||||
* @param {Function} callback - 버튼 클릭 시 호출되는 콜백 (파라미터: boolean - true는 확인, false는 취소)
|
||||
*/
|
||||
showConfirm: function (message, callback) {
|
||||
// 메시지 설정
|
||||
$('#customConfirmMessage').text(message);
|
||||
$('#customConfirm').css('display', 'flex');
|
||||
$('#customConfirmYesButton').one('click', function () {
|
||||
$('#customConfirm').hide();
|
||||
if (callback) callback(true);
|
||||
|
||||
// 팝업 표시 (modal 구조 사용)
|
||||
$('#customConfirm').show();
|
||||
setTimeout(function() {
|
||||
$('#customConfirmBackdrop').addClass('show');
|
||||
$('#customConfirmModal').addClass('show');
|
||||
}, 10);
|
||||
|
||||
// Body 스크롤 방지
|
||||
$('body').css('overflow', 'hidden');
|
||||
|
||||
// 확인 버튼에 포커스
|
||||
setTimeout(function() {
|
||||
$('#customConfirmYesButton').focus();
|
||||
}, 350);
|
||||
|
||||
// 확인 버튼 클릭 이벤트 (기존 이벤트 제거 후 재등록)
|
||||
$('#customConfirmYesButton').off('click').on('click', function () {
|
||||
customPopups.hideConfirm();
|
||||
if (typeof callback === 'function') {
|
||||
callback(true);
|
||||
}
|
||||
});
|
||||
$('#customConfirmNoButton').one('click', function () {
|
||||
$('#customConfirm').hide();
|
||||
if (callback) callback(false);
|
||||
|
||||
// 취소 버튼 클릭 이벤트
|
||||
$('#customConfirmNoButton').off('click').on('click', function () {
|
||||
customPopups.hideConfirm();
|
||||
if (typeof callback === 'function') {
|
||||
callback(false);
|
||||
}
|
||||
});
|
||||
|
||||
// 닫기 버튼 클릭 이벤트
|
||||
$('#customConfirmCloseButton').off('click').on('click', function () {
|
||||
customPopups.hideConfirm();
|
||||
if (typeof callback === 'function') {
|
||||
callback(false);
|
||||
}
|
||||
});
|
||||
|
||||
// Enter 키 이벤트 (확인 버튼 실행)
|
||||
$(document).off('keydown.customConfirm').on('keydown.customConfirm', function (e) {
|
||||
if (e.key === 'Enter') {
|
||||
customPopups.hideConfirm();
|
||||
if (typeof callback === 'function') {
|
||||
callback(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Escape 키 이벤트 (취소)
|
||||
$(document).off('keydown.customConfirmEsc').on('keydown.customConfirmEsc', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
customPopups.hideConfirm();
|
||||
if (typeof callback === 'function') {
|
||||
callback(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 확인 팝업 숨기기
|
||||
*/
|
||||
hideConfirm: function () {
|
||||
// Modal 숨김 애니메이션
|
||||
$('#customConfirmBackdrop').removeClass('show');
|
||||
$('#customConfirmModal').removeClass('show');
|
||||
|
||||
// 애니메이션 완료 후 숨김
|
||||
setTimeout(function() {
|
||||
$('#customConfirm').hide();
|
||||
}, 300);
|
||||
|
||||
// Body 스크롤 복원
|
||||
$('body').css('overflow', '');
|
||||
|
||||
// 이벤트 리스너 제거
|
||||
$('#customConfirmYesButton').off('click');
|
||||
$('#customConfirmNoButton').off('click');
|
||||
$('#customConfirmCloseButton').off('click');
|
||||
$(document).off('keydown.customConfirm');
|
||||
$(document).off('keydown.customConfirmEsc');
|
||||
},
|
||||
showEmailValidationPopup: function (message, onConvertCallback, onChangeEmailCallback) {
|
||||
$('#emailValidationPopupMessage').text(message);
|
||||
@@ -188,17 +324,223 @@ const customPopups = {
|
||||
$('#userLoginId').val(loginId);
|
||||
$('#emailResend').show();
|
||||
},
|
||||
|
||||
/**
|
||||
* 사용자 초대 팝업 표시
|
||||
* @param {Object} options - 팝업 옵션
|
||||
* @param {Function} options.onConfirm - 확인 버튼 클릭 시 호출되는 콜백 (파라미터: email)
|
||||
* @param {Function} options.onCancel - 취소 버튼 클릭 시 호출되는 콜백 (선택사항)
|
||||
*/
|
||||
showUserInvite: function (options) {
|
||||
options = options || {};
|
||||
|
||||
const onConfirm = options.onConfirm;
|
||||
const onCancel = options.onCancel;
|
||||
|
||||
// 입력 필드 및 에러 초기화
|
||||
$('#userInviteEmailInput').val('').removeClass('error');
|
||||
$('#userInvitePopupError').removeClass('show').text('');
|
||||
|
||||
// 팝업 표시 (modal 구조 사용)
|
||||
$('#userInvitePopup').show();
|
||||
setTimeout(function() {
|
||||
$('#userInviteModalBackdrop').addClass('show');
|
||||
$('#userInviteModal').addClass('show');
|
||||
}, 10);
|
||||
|
||||
// Body 스크롤 방지
|
||||
$('body').css('overflow', 'hidden');
|
||||
|
||||
// 입력 필드에 포커스
|
||||
setTimeout(function() {
|
||||
$('#userInviteEmailInput').focus();
|
||||
}, 350);
|
||||
|
||||
// 확인 버튼 이벤트 (기존 이벤트 제거 후 재등록)
|
||||
$('#userInvitePopupConfirmButton').off('click').on('click', function () {
|
||||
const email = $('#userInviteEmailInput').val().trim();
|
||||
|
||||
// 이메일 유효성 검사
|
||||
if (!email) {
|
||||
customPopups.showUserInviteError('이메일 주소를 입력해주세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
// 이메일 형식 검증
|
||||
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
if (!emailPattern.test(email)) {
|
||||
customPopups.showUserInviteError('올바른 이메일 형식이 아닙니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof onConfirm === 'function') {
|
||||
onConfirm(email);
|
||||
}
|
||||
});
|
||||
|
||||
// 취소 버튼 이벤트
|
||||
$('#userInvitePopupCancelButton').off('click').on('click', function () {
|
||||
customPopups.hideUserInvite();
|
||||
if (typeof onCancel === 'function') {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// 닫기 버튼 이벤트
|
||||
$('#userInvitePopupCloseButton').off('click').on('click', function () {
|
||||
customPopups.hideUserInvite();
|
||||
if (typeof onCancel === 'function') {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// Enter 키 이벤트
|
||||
$('#userInviteEmailInput').off('keypress').on('keypress', function (e) {
|
||||
if (e.which === 13) {
|
||||
$('#userInvitePopupConfirmButton').click();
|
||||
}
|
||||
});
|
||||
|
||||
// 입력 시 에러 초기화
|
||||
$('#userInviteEmailInput').off('input').on('input', function () {
|
||||
customPopups.clearUserInviteError();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 사용자 초대 팝업 숨기기
|
||||
*/
|
||||
hideUserInvite: function () {
|
||||
// Modal 숨김 애니메이션
|
||||
$('#userInviteModalBackdrop').removeClass('show');
|
||||
$('#userInviteModal').removeClass('show');
|
||||
|
||||
// 애니메이션 완료 후 숨김
|
||||
setTimeout(function() {
|
||||
$('#userInvitePopup').hide();
|
||||
}, 300);
|
||||
|
||||
// Body 스크롤 복원
|
||||
$('body').css('overflow', '');
|
||||
|
||||
// 입력 필드 초기화
|
||||
$('#userInviteEmailInput').val('').removeClass('error');
|
||||
$('#userInvitePopupError').removeClass('show').text('');
|
||||
|
||||
// 이벤트 리스너 제거
|
||||
$('#userInvitePopupConfirmButton').off('click');
|
||||
$('#userInvitePopupCancelButton').off('click');
|
||||
$('#userInvitePopupCloseButton').off('click');
|
||||
$('#userInviteEmailInput').off('keypress').off('input');
|
||||
},
|
||||
|
||||
/**
|
||||
* 사용자 초대 에러 메시지 표시
|
||||
* @param {string} message - 에러 메시지
|
||||
*/
|
||||
showUserInviteError: function (message) {
|
||||
$('#userInvitePopupError').text(message).addClass('show');
|
||||
$('#userInviteEmailInput').addClass('error');
|
||||
},
|
||||
|
||||
/**
|
||||
* 사용자 초대 에러 메시지 제거
|
||||
*/
|
||||
clearUserInviteError: function () {
|
||||
$('#userInvitePopupError').removeClass('show');
|
||||
$('#userInviteEmailInput').removeClass('error');
|
||||
},
|
||||
|
||||
/**
|
||||
* 권한 변경 팝업 표시
|
||||
* @param {Object} options - 팝업 옵션
|
||||
* @param {string} options.userName - 사용자 이름
|
||||
* @param {string} options.userEmail - 사용자 이메일
|
||||
* @param {string} options.userId - 사용자 ID
|
||||
* @param {Function} options.onConfirm - 확인 버튼 클릭 시 호출되는 콜백 (파라미터: userId)
|
||||
* @param {Function} options.onCancel - 취소 버튼 클릭 시 호출되는 콜백 (선택사항)
|
||||
*/
|
||||
showChangeRole: function (options) {
|
||||
options = options || {};
|
||||
|
||||
const userName = options.userName || '';
|
||||
const userEmail = options.userEmail || '';
|
||||
const userId = options.userId;
|
||||
const onConfirm = options.onConfirm;
|
||||
const onCancel = options.onCancel;
|
||||
|
||||
// 사용자 정보 설정
|
||||
$('#changeRoleUserName').text(userName);
|
||||
$('#changeRoleUserEmail').text(userEmail ? `(${userEmail})` : '');
|
||||
|
||||
// 팝업 표시 (modal 구조 사용)
|
||||
$('#changeRolePopup').show();
|
||||
setTimeout(function() {
|
||||
$('#changeRoleModalBackdrop').addClass('show');
|
||||
$('#changeRoleModal').addClass('show');
|
||||
}, 10);
|
||||
|
||||
// Body 스크롤 방지
|
||||
$('body').css('overflow', 'hidden');
|
||||
|
||||
// 확인 버튼 이벤트 (기존 이벤트 제거 후 재등록)
|
||||
$('#changeRolePopupConfirmButton').off('click').on('click', function () {
|
||||
if (typeof onConfirm === 'function') {
|
||||
onConfirm(userId);
|
||||
}
|
||||
});
|
||||
|
||||
// 취소 버튼 이벤트
|
||||
$('#changeRolePopupCancelButton').off('click').on('click', function () {
|
||||
customPopups.hideChangeRole();
|
||||
if (typeof onCancel === 'function') {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// 닫기 버튼 이벤트
|
||||
$('#changeRolePopupCloseButton').off('click').on('click', function () {
|
||||
customPopups.hideChangeRole();
|
||||
if (typeof onCancel === 'function') {
|
||||
onCancel();
|
||||
}
|
||||
});
|
||||
|
||||
// Escape 키 이벤트
|
||||
$(document).off('keydown.changeRole').on('keydown.changeRole', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
customPopups.hideChangeRole();
|
||||
if (typeof onCancel === 'function') {
|
||||
onCancel();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 권한 변경 팝업 숨기기
|
||||
*/
|
||||
hideChangeRole: function () {
|
||||
// Modal 숨김 애니메이션
|
||||
$('#changeRoleModalBackdrop').removeClass('show');
|
||||
$('#changeRoleModal').removeClass('show');
|
||||
|
||||
// 애니메이션 완료 후 숨김
|
||||
setTimeout(function() {
|
||||
$('#changeRolePopup').hide();
|
||||
}, 300);
|
||||
|
||||
// Body 스크롤 복원
|
||||
$('body').css('overflow', '');
|
||||
|
||||
// 이벤트 리스너 제거
|
||||
$('#changeRolePopupConfirmButton').off('click');
|
||||
$('#changeRolePopupCancelButton').off('click');
|
||||
$('#changeRolePopupCloseButton').off('click');
|
||||
$(document).off('keydown.changeRole');
|
||||
},
|
||||
|
||||
init: function () {
|
||||
// customAlert 팝업의 닫기 버튼에 이벤트 리스너 추가
|
||||
$('#customAlertOkButton, #customAlert .btn_close').on('click', function () {
|
||||
customPopups.hideAlert('#customAlert');
|
||||
});
|
||||
|
||||
// customConfirm 팝업의 닫기 버튼에 이벤트 리스너 추가
|
||||
$('#customConfirmNoButton').on('click', function () {
|
||||
customPopups.hideAlert('#customConfirm');
|
||||
});
|
||||
|
||||
// emailValidationPopup 팝업의 닫기 버튼에 이벤트 리스너 추가
|
||||
$('#emailValidationPopupCloseButton').on('click', function () {
|
||||
$('#emailValidationPopup').hide();
|
||||
@@ -208,11 +550,13 @@ const customPopups = {
|
||||
$('#emailResend').hide();
|
||||
});
|
||||
|
||||
// 다른 팝업의 닫기 버튼에 이벤트 리스너 추가
|
||||
$('.btn_close:not(#customAlert .btn_close)').on('click', function () {
|
||||
$(this).closest('.popup_total').hide();
|
||||
// 다른 팝업의 닫기 버튼에 이벤트 리스너 추가 (modernized popups 제외)
|
||||
$('.btn_close').on('click', function () {
|
||||
const $popup = $(this).closest('.popup_total');
|
||||
if ($popup.length) {
|
||||
$popup.hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
@import 'pages/apikey-detail';
|
||||
@import 'pages/notice';
|
||||
@import 'pages/inquiry';
|
||||
@import 'pages/user-management';
|
||||
|
||||
// 6. Themes
|
||||
@import 'themes/dark';
|
||||
|
||||
Reference in New Issue
Block a user