refactoring
This commit is contained in:
parent
aa614dedf9
commit
bb72886380
8
public/akaunting-js/generalAction.js
vendored
8
public/akaunting-js/generalAction.js
vendored
@ -360,7 +360,7 @@ if (navigator.userAgent.search("Firefox") >= 0) {
|
||||
|
||||
//margue animation for truncated text
|
||||
function marqueeAnimation(truncate) {
|
||||
if (truncate.closest('[data-disable-truncate]') !== null) {
|
||||
if (truncate.closest('[data-disable-marquee]') !== null) {
|
||||
truncate.parentElement.classList.add('truncate');
|
||||
return;
|
||||
}
|
||||
@ -388,14 +388,14 @@ function marqueeAnimation(truncate) {
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll('[data-truncate]').forEach((truncate) => {
|
||||
document.querySelectorAll('[data-truncate-marquee]').forEach((truncate) => {
|
||||
marqueeAnimation(truncate);
|
||||
});
|
||||
|
||||
//disable/enable icons ejected from data-truncate, HTML of icons ejected from parent element (data-truncate)
|
||||
//disable/enable icons ejected from data-truncate-marquee, HTML of icons ejected from parent element (data-truncate-marquee)
|
||||
document.querySelectorAll('[data-index-icon]').forEach((defaultText) => {
|
||||
defaultText.parentElement.parentElement.parentElement.parentElement.appendChild(defaultText);
|
||||
});
|
||||
//disable/enable icons ejected from data-truncate
|
||||
//disable/enable icons ejected from data-truncate-marquee
|
||||
|
||||
//margue animation for truncated text
|
||||
|
@ -1,9 +1,11 @@
|
||||
<span @class([
|
||||
'w-3 h-3 rounded-full ltr:mr-1 rtl:ml-1', $backgroundColor, $textColor
|
||||
])
|
||||
@if (! empty($backgroundStyle))
|
||||
style="background-color: {{ $backgroundStyle }}"
|
||||
@endif
|
||||
>
|
||||
</span>
|
||||
<span class="w-24 truncate">{{ $name }}</span>
|
||||
<div class="flex items-center">
|
||||
<span @class([
|
||||
'w-3 h-3 rounded-full ltr:mr-1 rtl:ml-1', $backgroundColor, $textColor
|
||||
])
|
||||
@if (! empty($backgroundStyle))
|
||||
style="background-color: {{ $backgroundStyle }}"
|
||||
@endif
|
||||
>
|
||||
</span>
|
||||
<span class="w-24 truncate">{{ $name }}</span>
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<!-- There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons. With javascript will add (truncate) class nam -->
|
||||
<div>
|
||||
<!-- this tag use for calculate width of text and parent element -->
|
||||
<span data-truncate>
|
||||
<span data-truncate-marquee>
|
||||
{!! $first !!}
|
||||
</span>
|
||||
</div>
|
||||
@ -32,7 +32,7 @@
|
||||
<div {{ $second_attributes }}>
|
||||
<div>
|
||||
<div>
|
||||
<span data-truncate>
|
||||
<span data-truncate-marquee>
|
||||
{!! $second !!}
|
||||
</span>
|
||||
</div>
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<span data-truncate>
|
||||
<span data-truncate-marquee>
|
||||
{{ $slot }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<!-- There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons -->
|
||||
<div>
|
||||
<!-- this tag use for calculate width of text and parent element -->
|
||||
<span data-truncate>
|
||||
<span data-truncate-marquee>
|
||||
{!! $first !!}
|
||||
</span>
|
||||
</div>
|
||||
@ -32,7 +32,7 @@
|
||||
<div {{ $second_attributes }}>
|
||||
<div>
|
||||
<div>
|
||||
<span data-truncate>
|
||||
<span data-truncate-marquee>
|
||||
{!! $second !!}
|
||||
</span>
|
||||
</div>
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<span data-truncate>
|
||||
<span data-truncate-marquee>
|
||||
{{ $slot }}
|
||||
</span>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user