Merge branch 'master' into two-column-header
This commit is contained in:
27
public/akaunting-js/generalAction.js
vendored
27
public/akaunting-js/generalAction.js
vendored
@@ -11,7 +11,7 @@ document.querySelectorAll("[data-table-list]").forEach((row) => {
|
||||
|
||||
//redirect edit or show page for table row click
|
||||
document.querySelectorAll("[data-table-body]").forEach((table) => {
|
||||
if (document.body.clientWidth >= 991) {
|
||||
if (document.body.clientWidth < 768 || document.body.clientWidth > 1200) {
|
||||
let rows = table.querySelectorAll("tr");
|
||||
|
||||
rows.forEach((row) => {
|
||||
@@ -27,7 +27,13 @@ document.querySelectorAll("[data-table-body]").forEach((table) => {
|
||||
if (row_href) {
|
||||
for (let i = first_selector; i < td.length - 1; i++) {
|
||||
let td_item = td[i];
|
||||
td_item.addEventListener("click", () => {
|
||||
|
||||
td_item.addEventListener("click", (event) => {
|
||||
// click disabled when preview dialog is open
|
||||
if (event.target.closest('[data-tooltip-target]')) {
|
||||
return;
|
||||
}
|
||||
// click disabled when preview dialog is open
|
||||
window.location.href = row_href;
|
||||
});
|
||||
|
||||
@@ -42,6 +48,20 @@ document.querySelectorAll("[data-table-body]").forEach((table) => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (document.body.clientWidth <= 768) {
|
||||
table.querySelectorAll('[data-table-list]').forEach((actions) => {
|
||||
actions.querySelector('[data-mobile-actions]').addEventListener('click', function() {
|
||||
this.closest('td').querySelector('[data-mobile-actions-modal]').classList.add('show');
|
||||
this.closest('td').querySelector('[data-mobile-actions-modal]').classList.remove('opacity-0', 'invisible');
|
||||
|
||||
this.closest('td').querySelector('[data-mobile-actions-modal]').addEventListener('click', function() {
|
||||
this.classList.add('opacity-0', 'invisible');
|
||||
this.classList.remove('show');
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//redirect edit or show page for table row click
|
||||
|
||||
@@ -368,7 +388,7 @@ function marqueeAnimation(truncate) {
|
||||
// offsetwidth = width of the text, clientWidth = width of parent text (div)
|
||||
// because some index page has icons, we use two time parent element
|
||||
|
||||
if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) {
|
||||
if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) {
|
||||
truncate.addEventListener('mouseover', function () {
|
||||
truncate.parentElement.style.animationPlayState = 'running';
|
||||
|
||||
@@ -429,6 +449,7 @@ document.querySelectorAll('[data-index-icon]').forEach((defaultText) => {
|
||||
|
||||
if (icon_parents_element.classList.contains('flex')) {
|
||||
icon_parents_element.appendChild(defaultText);
|
||||
icon_parents_element.classList.remove('truncate');
|
||||
} else {
|
||||
if (icon_parents_element.classList.contains('overflow-x-hidden')) {
|
||||
icon_parents_element.parentElement.appendChild(defaultText);
|
||||
|
15
public/css/app.css
vendored
15
public/css/app.css
vendored
@@ -54515,16 +54515,16 @@ body{
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-gray-100:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-lilac-100:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(245 247 250 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-gray-100:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-gray-200:hover{
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
||||
@@ -57080,6 +57080,11 @@ body{
|
||||
line-height: 2.75rem;
|
||||
}
|
||||
|
||||
.sm\:text-purple{
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(85 88 139 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
[dir="ltr"] .sm\:ltr\:right-4{
|
||||
right: 1rem;
|
||||
}
|
||||
|
Reference in New Issue
Block a user