Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
brkcvn committed Oct 24, 2022
1 parent 9879358 commit ec46f8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions public/akaunting-js/generalAction.js
Expand Up @@ -392,6 +392,19 @@ function marqueeAnimation(truncate) {
});

truncate.classList.add('truncate');

// if truncate has truncate class, text marquee animate doesn't pretty work
if (truncate.querySelector('.truncate') !== null && truncate.querySelector('.truncate').classList.contains('truncate')) {
let old_element = truncate.querySelector('.truncate');
let parent = old_element.parentNode;

let new_element = document.createElement('span');
new_element.innerHTML = old_element.innerHTML;
new_element.classList = old_element.classList;

parent.replaceChild(new_element, old_element);
}
// if truncate has truncate class, text marquee animate doesn't pretty work

// There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons.-->
let animate_element = document.createElement('div');
Expand Down
4 changes: 2 additions & 2 deletions resources/views/settings/currencies/index.blade.php
Expand Up @@ -58,9 +58,9 @@

<x-table.td class="w-6/12 sm:w-4/12">
<x-slot name="first" class="flex font-bold" override="class">
<span class="font-bold truncate">
<div class="font-bold truncate">
{{ $item->name }}
</span>
</div>

@if (! $item->enabled)
<x-index.disable text="{{ trans_choice('general.currencies', 1) }}" />
Expand Down

0 comments on commit ec46f8b

Please sign in to comment.