655 lines
23 KiB
JavaScript
655 lines
23 KiB
JavaScript
var isHoliday = false;
|
|
$(document).ready(function () {
|
|
var firstButton = $('.btnAssignList').first();
|
|
var firstDataId = firstButton.data('id');
|
|
loadChatMessage(Number(firstDataId));
|
|
$('.input-form').hide();
|
|
|
|
|
|
//for chevron down icon for extending height of chat part
|
|
var $taskDescText = $('#taskDescText');
|
|
var $showMoreButton = $('#showMoreButton');
|
|
// Check if content overflows
|
|
//if ($taskDescText[0].scrollHeight > $taskDescText.height()) {
|
|
// $showMoreButton.show();
|
|
|
|
//}
|
|
|
|
|
|
$showMoreButton.on('click', function() {
|
|
$taskDescText.toggleClass('expanded');
|
|
$('.mainChat').toggleClass('expanded');
|
|
if ($taskDescText.hasClass('expanded')) {
|
|
$showMoreButton.html(
|
|
`<svg width="20px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 15.75 7.5-7.5 7.5 7.5" /></svg>
|
|
`);
|
|
} else {
|
|
$showMoreButton.html(`<svg width="20px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" /></svg>`);
|
|
}
|
|
});
|
|
|
|
|
|
//$showMoreButton.on('click', function () {
|
|
// if ($taskDescText.height() === 60) {
|
|
// $taskDescText.css('height', '60px');
|
|
// $showMoreButton.html(` <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 15.75 7.5-7.5 7.5 7.5" /></svg>`);
|
|
// } else {
|
|
// $taskDescText.css('height', '150px');
|
|
// $showMoreButton.html(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" /></svg>`);
|
|
// }
|
|
//});
|
|
|
|
//$('.actionBtn').click(function () {
|
|
// $('.actionBtn').removeClass('active');
|
|
// $('#save').removeClass('disable');
|
|
// $(this).addClass('active');
|
|
|
|
// $('#save').removeClass('disable');
|
|
// $(this).addClass('active');
|
|
|
|
// $('.input-form').show();
|
|
|
|
// switch ($(this).attr('id')) {
|
|
// case "deadlineBtn":
|
|
// $('.select-time-section').show();
|
|
// $('#select2MemberList').hide();
|
|
// $('.textarea-col').removeClass('col-12').addClass('col-8');
|
|
// $('#save').attr('onclick', 'handleDeadlineClick()');
|
|
// break;
|
|
// case "notPossibleBtn":
|
|
// $('.select-time-section').hide();
|
|
// $('#select2MemberList').hide();
|
|
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
// $('#save').attr('onclick', 'handleNotPossibleClick()');
|
|
// break;
|
|
// case "doneBtn":
|
|
// $('.select-time-section').hide();
|
|
// $('#select2MemberList').hide();
|
|
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
// $('#save').attr('onclick', 'handleDoneClick()');
|
|
// break;
|
|
// case "AssignBtn":
|
|
// $('#Desc-Time-Area').hide();
|
|
// $('.select-time-section').hide();
|
|
// $('#select2MemberList').show();
|
|
// $('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
// $('#save').attr('onclick', 'handleAssignClick ()');
|
|
// }
|
|
|
|
// // if ($(this).attr('id') === "deadlineBtn") {
|
|
// // $('.select-time-section').show();
|
|
// // $('.textarea-col').removeClass('col-12').addClass('col-8');
|
|
// // $('#save').attr('onclick', 'handleDeadlineClick()');
|
|
// // } else if ($(this).attr('id') === "notPossibleBtn") {
|
|
// // $('.select-time-section').hide();
|
|
// // $('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
// // $('#save').attr('onclick', 'handleNotPossibleClick()');
|
|
// // } else if ($(this).attr('id') === "doneBtn") {
|
|
// // $('.select-time-section').hide();
|
|
// // $('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
// // $('#save').attr('onclick', 'handleDoneClick()');
|
|
// // }
|
|
//});
|
|
|
|
$('.actionBtn').click(function () {
|
|
var isActive = $(this).hasClass('active');
|
|
|
|
$('.actionBtn').removeClass('active');
|
|
$('#save').removeClass('disable');
|
|
$('.input-form').hide();
|
|
$('.select-time-section').hide();
|
|
$('#select2MemberList').hide();
|
|
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
|
|
if (!isActive) {
|
|
$(this).addClass('active');
|
|
$('.input-form').show();
|
|
|
|
switch ($(this).attr('id')) {
|
|
case "deadlineBtn":
|
|
$('.select-time-section').show();
|
|
$('.textarea-col').removeClass('col-12').addClass('col-8');
|
|
$('#save').attr('onclick', 'handleDeadlineClick()');
|
|
break;
|
|
case "notPossibleBtn":
|
|
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
$('#save').attr('onclick', 'handleNotPossibleClick()');
|
|
break;
|
|
case "doneBtn":
|
|
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
$('#save').attr('onclick', 'handleDoneClick()');
|
|
break;
|
|
case "AssignBtn":
|
|
$('#Desc-Time-Area').hide();
|
|
$('#select2MemberList').show();
|
|
$('.textarea-col').removeClass('col-8').addClass('col-12');
|
|
$('#save').attr('onclick', 'handleAssignClick()');
|
|
}
|
|
} else {
|
|
$(this).removeClass('active');
|
|
$('.input-form').hide();
|
|
}
|
|
});
|
|
|
|
$('.select2Member').select2({
|
|
placeholder: {
|
|
id: '-1',
|
|
text: "انتخاب اعضاء"
|
|
}
|
|
});
|
|
|
|
$(document).on('click', '#today', function () {
|
|
$("#EndTaskDate").css('color', '#797979');
|
|
$("#HolidayError").hide();
|
|
updateDateInput(0);
|
|
$("#today").prop('checked', true);
|
|
CheckHoliday();
|
|
});
|
|
|
|
$(document).on('click', '#tommorow', function () {
|
|
$("#EndTaskDate").css('color', '#797979');
|
|
$("#HolidayError").hide();
|
|
updateDateInput(1);
|
|
$("#tommorow").prop('checked', true);
|
|
CheckHoliday();
|
|
});
|
|
|
|
$(document).on('click', '#two-day-later', function () {
|
|
$("#EndTaskDate").css('color', '#797979');
|
|
$("#HolidayError").hide();
|
|
updateDateInput(2);
|
|
$("#two-day-later").prop('checked', true);
|
|
CheckHoliday();
|
|
});
|
|
|
|
$(".date").on('input', function () {
|
|
var value = $(this).val();
|
|
$(this).val(convertPersianNumbersToEnglish(value));
|
|
}).mask("0000/00/00");
|
|
|
|
if (window.matchMedia('(max-width: 767px)').matches) {
|
|
setTimeout(function () {
|
|
$('.modal-body').animate({
|
|
scrollTop: $('.modal-body').get(0).scrollHeight
|
|
}, 1200);
|
|
}, 900);
|
|
} else {
|
|
setTimeout(function () {
|
|
$('.mainChat').animate({
|
|
scrollTop: $('.mainChat').get(0).scrollHeight
|
|
}, 1200);
|
|
}, 900);
|
|
}
|
|
});
|
|
|
|
function updateDateInput(daysToAdd) {
|
|
var today = new Date();
|
|
today.setDate(today.getDate() + daysToAdd);
|
|
var jalaaliDate = jalaali.toJalaali(today);
|
|
var formattedDate = jalaaliDate.jy + '/' + (jalaaliDate.jm < 10 ? '0' + jalaaliDate.jm : jalaaliDate.jm) + '/' + (jalaaliDate.jd < 10 ? '0' + jalaaliDate.jd : jalaaliDate.jd);
|
|
$('#EndTaskDate').val(formattedDate);
|
|
}
|
|
|
|
function CheckHoliday() {
|
|
var timeChecked = $("#EndTaskDate").val();
|
|
if (timeChecked.length === 10) {
|
|
$.ajax({
|
|
contentType: 'charset=utf-8',
|
|
dataType: 'json',
|
|
type: 'GET',
|
|
url: checkIsHolidayAjax,
|
|
data: { time: timeChecked },
|
|
headers: { "RequestVerificationToken": antiForgeryToken },
|
|
success: function (response) {
|
|
if (response.isSuccedded) {
|
|
if (response.isHoliday) {
|
|
$("#EndTaskDate").css('color', 'red');
|
|
$("#HolidayError").show();
|
|
isHoliday = response.isHoliday;
|
|
}
|
|
else {
|
|
isHoliday = response.isHoliday;
|
|
}
|
|
}
|
|
else {
|
|
$('.alert-msg p').text(response.message);
|
|
setTimeout(function () {
|
|
}, 3500);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
$("#EndTaskDate").css('color', '#797979');
|
|
$("#HolidayError").hide();
|
|
}
|
|
}
|
|
|
|
function handleAction(actionType, dataSave, ajaxFunction) {
|
|
if (isHoliday) {
|
|
swal.fire({
|
|
title: "اخطار",
|
|
text: "تاریخ وظیفه مورد نظر در روز تعطیل میباشد؛ آیا میخواهید ادامه دهید؟",
|
|
icon: "warning",
|
|
showCancelButton: true,
|
|
confirmButtonText: "بله",
|
|
cancelButtonText: "خیر",
|
|
confirmButtonColor: '#84cc16',
|
|
reverseButtons: true
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
saveAjax(ajaxFunction, dataSave);
|
|
}
|
|
});
|
|
} else {
|
|
saveAjax(ajaxFunction, dataSave);
|
|
}
|
|
}
|
|
|
|
function handleDeadlineClick() {
|
|
var dataSave = {
|
|
'command.TaskId': taskId,
|
|
'command.CreateTaskTimeRequest.Description': $('#Description').val(),
|
|
'command.CreateTaskTimeRequest.RequestTime': $('#EndTaskDate').val()
|
|
};
|
|
|
|
handleAction('deadline', dataSave, postCreateTimeRequest);
|
|
}
|
|
|
|
function handleNotPossibleClick() {
|
|
var dataSave = {
|
|
'command.TaskId': taskId,
|
|
'command.CreateTaskCancel.Description': $('#Description').val()
|
|
};
|
|
|
|
handleAction('notPossible', dataSave, postCreateCancelRequest);
|
|
}
|
|
|
|
function handleAssignClick() {
|
|
var userDateTime = $('#UserEndTaskDate').val();
|
|
|
|
var dataSave = {
|
|
'command.CreateAssign.AssignedId': $('#select2AssignList').val(),
|
|
'command.TaskId': taskId,
|
|
'command.CreateAssign.EndTaskDateFa': userDateTime
|
|
};
|
|
|
|
handleAction('assign', dataSave, postCreateAssign);
|
|
}
|
|
|
|
function handleDoneClick() {
|
|
var dataSave = {
|
|
'command.TaskId': taskId,
|
|
'command.CompleteTaskViewModel.Description': $('#Description').val()
|
|
};
|
|
|
|
handleAction('done', dataSave, postSaveComplete);
|
|
}
|
|
|
|
function saveAjax(url, data) {
|
|
$.ajax({
|
|
async: false,
|
|
dataType: 'json',
|
|
type: 'POST',
|
|
url: `${url}`,
|
|
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
|
data: data,
|
|
success: function (response) {
|
|
if (response.isSuccess) {
|
|
$('.alert-success-msg').show();
|
|
$('.alert-success-msg p').text(response.message);
|
|
setTimeout(function () {
|
|
$('.alert-success-msg').hide();
|
|
$('.alert-success-msg p').text('');
|
|
//document.location.reload();
|
|
$(`.section-btns-task button.active`).click();
|
|
|
|
|
|
$('#MainModal').modal('toggle');
|
|
}, 1500);
|
|
|
|
loadTicketAndRequestCount();
|
|
|
|
} else {
|
|
$('.alert-msg').show();
|
|
$('.alert-msg p').text(response.message);
|
|
setTimeout(function () {
|
|
$('.alert-msg').hide();
|
|
$('.alert-msg p').text('');
|
|
}, 2000);
|
|
}
|
|
},
|
|
error: function (err) {
|
|
console.log(err);
|
|
}
|
|
});
|
|
}
|
|
|
|
function loadChatMessage(id) {
|
|
$('#ajaxChatSection').html('');
|
|
|
|
var addAssignedName = $(`#addAssignedName_${id}`).text();
|
|
var addEndTaskDateFa = $(`#addEndTaskDateFa_${id}`).text();
|
|
|
|
$(`#AssignedName`).text(addAssignedName);
|
|
$(`#AssignEndTaskDateFa`).text(addEndTaskDateFa);
|
|
|
|
var html = '';
|
|
$.ajax({
|
|
async: false,
|
|
contentType: 'charset=utf-8',
|
|
dataType: 'json',
|
|
type: 'GET',
|
|
url: `${loadChatMessageAjax}`,
|
|
data: { 'assignId': Number(id) },
|
|
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
|
|
success: function (response) {
|
|
$.each(response.data, function (i, item) {
|
|
var color = "";
|
|
var textType = "";
|
|
switch (item.typeOfMessage) {
|
|
case "درخواست مهلت":
|
|
color = "orange";
|
|
textType = "درخواست مهلت";
|
|
break;
|
|
case "درخواست کنسل":
|
|
color = "red";
|
|
textType = "درخواست کنسل";
|
|
break;
|
|
case "درخواست انجام":
|
|
color = "green";
|
|
textType = "درخواست انجام";
|
|
break;
|
|
case "تایید درخواست مهلت":
|
|
color = "green";
|
|
textType = "تایید";
|
|
break;
|
|
case "رد درخواست مهلت":
|
|
color = "red";
|
|
textType = "رد";
|
|
break;
|
|
case "تایید درخواست کنسل":
|
|
color = "green";
|
|
textType = "تایید";
|
|
break;
|
|
case "رد درخواست کنسل":
|
|
color = "red";
|
|
textType = "رد";
|
|
break;
|
|
case "تایید درخواست انجام":
|
|
color = "green";
|
|
textType = "تایید";
|
|
break;
|
|
case "رد درخواست انجام":
|
|
color = "red";
|
|
textType = "رد";
|
|
break;
|
|
case "تکمیل":
|
|
color = "green";
|
|
textType = "تکمیل";
|
|
break;
|
|
case "لغو":
|
|
color = "red";
|
|
textType = "رد";
|
|
break;
|
|
case "تغییر تاریخ":
|
|
color = "orange";
|
|
textType = "تغییر";
|
|
break;
|
|
default:
|
|
color = "";
|
|
}
|
|
|
|
var senderOrReceiver = "";
|
|
if (Number(UserId) === item.receiverId) {
|
|
senderOrReceiver = "receiver";
|
|
} else {
|
|
senderOrReceiver = "sender";
|
|
}
|
|
|
|
|
|
// if (Number(UserId) === item.senderId) {
|
|
// html += `
|
|
//<div class="chat-card-${senderOrReceiver} ${color}" style="margin: 5px;">
|
|
// <h6 class="m-0">
|
|
// ${item.senderName}
|
|
// </h6>
|
|
// <p class="m-0">
|
|
// ${item.message}
|
|
// </p>
|
|
// <p class="date-time pt-3 m-0">${item.creationDate}</p>
|
|
// <div class="chat-tag">
|
|
// <span>
|
|
// ${textType}
|
|
// </span>
|
|
// </div>
|
|
//</div>
|
|
// `;
|
|
// }
|
|
// else {
|
|
// html += `
|
|
// <div class="chat-card-${senderOrReceiver} ${color}" style="margin: 5px auto 5px 5px;">
|
|
// <h6 class="m-0">
|
|
// ${item.senderName}
|
|
// </h6>
|
|
// <p class="m-0">
|
|
// ${item.message}
|
|
// </p>
|
|
// <p class="date-time pt-3 m-0">${item.creationDate}</p>
|
|
// <div class="chat-tag">
|
|
// <span>
|
|
// ${textType}
|
|
// </span>
|
|
// </div>
|
|
// </div>
|
|
// `;
|
|
// }
|
|
|
|
if (Number(UserId) === item.receiverId) {
|
|
html += `
|
|
<div class="chat-card-${senderOrReceiver} ${color}" style="margin: 5px auto 5px 5px;">
|
|
<h6 class="m-0">
|
|
${item.senderName}
|
|
</h6>
|
|
<p class="mb-0 mt-2" style="word-break: break-word;">
|
|
${item.message}
|
|
</p>
|
|
<p class="date-time pt-3 m-0">${item.creationDate}</p>
|
|
<div class="chat-tag">
|
|
<span>
|
|
${textType}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
`;
|
|
}
|
|
if (Number(UserId) === item.senderId) {
|
|
html += `
|
|
<div class="chat-card-${senderOrReceiver} ${color}" style="margin: 5px;">
|
|
<h6 class="m-0">
|
|
${item.senderName}
|
|
</h6>
|
|
<p class="mb-0 mt-2" style="word-break: break-word;">
|
|
${item.message}
|
|
</p>
|
|
<p class="date-time pt-3 m-0">${item.creationDate}</p>
|
|
<div class="chat-tag">
|
|
<span>
|
|
${textType}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
`;
|
|
}
|
|
|
|
|
|
});
|
|
|
|
$('#ajaxChatSection').append(html);
|
|
loadGallery();
|
|
},
|
|
failure: function (response) {
|
|
console.log(5, response);
|
|
}
|
|
});
|
|
}
|
|
|
|
//صدا
|
|
var wavesurfer = null;
|
|
|
|
if (voiceSrc) {
|
|
waveVoice(voiceSrc);
|
|
}
|
|
|
|
function waveVoice(voiceSrc) {
|
|
// Ensure identifiers are only declared once
|
|
var playPauseButton = $('#play-pause');
|
|
var currentTimeEl = $('#current-time');
|
|
var durationEl = $('#duration');
|
|
var voiceSource = decodeURIComponent(voiceSrc.replace(/&/g, '&'));
|
|
|
|
// If a wavesurfer instance already exists, destroy it
|
|
if (wavesurfer) {
|
|
wavesurfer.destroy();
|
|
}
|
|
|
|
// Initialize Wavesurfer
|
|
wavesurfer = WaveSurfer.create({
|
|
container: '#waveform',
|
|
waveColor: '#e0e0e0',
|
|
progressColor: '#23a9a9',
|
|
cursorWidth: 2,
|
|
cursorColor: '#23a9a9',
|
|
height: 40,
|
|
barWidth: 2,
|
|
responsive: true
|
|
});
|
|
|
|
// Load the audio file
|
|
wavesurfer.load(`${voiceSource}`);
|
|
$("#waveArea").show();
|
|
|
|
// Play/pause functionality
|
|
playPauseButton.off('click'); // Remove previous event handlers
|
|
playPauseButton.on('click', function () {
|
|
if (wavesurfer.isPlaying()) {
|
|
wavesurfer.pause();
|
|
playPauseButton.removeClass('pause').addClass('play');
|
|
} else {
|
|
wavesurfer.play();
|
|
playPauseButton.removeClass('play').addClass('pause');
|
|
}
|
|
});
|
|
|
|
// Update time and progress
|
|
wavesurfer.on('audioprocess', function () {
|
|
currentTimeEl.text(formatTime(wavesurfer.getCurrentTime()));
|
|
});
|
|
|
|
// Set duration once ready
|
|
wavesurfer.on('ready', function () {
|
|
durationEl.text(formatTime(wavesurfer.getDuration()));
|
|
});
|
|
|
|
// Format time function
|
|
function formatTime(seconds) {
|
|
var minutes = Math.floor(seconds / 60);
|
|
seconds = Math.floor(seconds % 60);
|
|
return minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
|
|
}
|
|
}
|
|
//صدا
|
|
|
|
|
|
|
|
|
|
// برای نمایش تصاویر
|
|
function loadGallery() {
|
|
if ($('.gallery').length) {
|
|
// Lightbox Gallery
|
|
(function () {
|
|
var lightboxEnabled = document.querySelectorAll('.lightbox-enabled');
|
|
var lightboxArray = Array.from(lightboxEnabled);
|
|
var lastImage = lightboxArray.length - 1;
|
|
var lightboxContainer = document.querySelector('.lightbox-container');
|
|
var lightboxImage = document.querySelector('.lightbox-image');
|
|
var lightboxBtns = document.querySelectorAll('.lightbox-btn');
|
|
var lightboxBtnRight = document.querySelector('#right');
|
|
var lightboxBtnLeft = document.querySelector('#left');
|
|
var close = document.querySelector('#close');
|
|
let activeImage;
|
|
|
|
var showLightBox = () => { lightboxContainer.classList.add('active'); }
|
|
|
|
var hideLightBox = () => {
|
|
lightboxContainer.classList.remove('active');
|
|
document.removeEventListener('keydown', handleKeyDown);
|
|
}
|
|
|
|
var setActiveImage = (image) => {
|
|
lightboxImage.src = image.dataset.imgsrc;
|
|
activeImage = lightboxArray.indexOf(image);
|
|
}
|
|
|
|
var transitionSlidesLeft = () => {
|
|
lightboxBtnLeft.focus();
|
|
$('.lightbox-image').addClass('slideright');
|
|
setTimeout(function () {
|
|
activeImage === 0 ? setActiveImage(lightboxArray[lastImage]) : setActiveImage(lightboxArray[activeImage - 1]);
|
|
}, 250);
|
|
|
|
setTimeout(function () {
|
|
$('.lightbox-image').removeClass('slideright');
|
|
}, 500);
|
|
}
|
|
|
|
var transitionSlidesRight = () => {
|
|
lightboxBtnRight.focus();
|
|
$('.lightbox-image').addClass('slideleft');
|
|
setTimeout(function () {
|
|
activeImage === lastImage ? setActiveImage(lightboxArray[0]) : setActiveImage(lightboxArray[activeImage + 1]);
|
|
}, 250);
|
|
setTimeout(function () {
|
|
$('.lightbox-image').removeClass('slideleft');
|
|
}, 500);
|
|
}
|
|
|
|
var transitionSlideHandler = (moveItem) => {
|
|
moveItem.includes('left') ? transitionSlidesLeft() : transitionSlidesRight();
|
|
}
|
|
|
|
var handleKeyDown = (e) => {
|
|
if (e.key === 'ArrowLeft') {
|
|
transitionSlidesLeft();
|
|
} else if (e.key === 'ArrowRight') {
|
|
transitionSlidesRight();
|
|
} else if (e.key === 'Escape' || e.key === 'Esc') {
|
|
hideLightBox();
|
|
}
|
|
}
|
|
|
|
lightboxEnabled.forEach(image => {
|
|
image.addEventListener('click', (e) => {
|
|
showLightBox();
|
|
setActiveImage(image);
|
|
document.addEventListener('keydown', handleKeyDown);
|
|
});
|
|
});
|
|
|
|
lightboxContainer.addEventListener('click', () => { hideLightBox(); });
|
|
close.addEventListener('click', () => { hideLightBox(); });
|
|
|
|
lightboxBtns.forEach(btn => {
|
|
btn.addEventListener('click', (e) => {
|
|
e.stopPropagation();
|
|
transitionSlideHandler(e.currentTarget.id);
|
|
});
|
|
});
|
|
|
|
lightboxImage.addEventListener('click', (e) => {
|
|
e.stopPropagation();
|
|
});
|
|
})();
|
|
}
|
|
}
|
|
// برای نمایش تصاویر
|