From 5ae875711e0bb8aa75d386e45b017adf87b054d3 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 14 Oct 2022 17:20:21 +0300 Subject: [PATCH 01/26] pointer events ejected from menu close icon --- resources/views/components/layouts/admin/menu.blade.php | 2 +- resources/views/components/layouts/portal/menu.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/components/layouts/admin/menu.blade.php b/resources/views/components/layouts/admin/menu.blade.php index 9fae4781c..328aecfb9 100644 --- a/resources/views/components/layouts/admin/menu.blade.php +++ b/resources/views/components/layouts/admin/menu.blade.php @@ -222,7 +222,7 @@ expand_circle_down - + diff --git a/resources/views/components/layouts/portal/menu.blade.php b/resources/views/components/layouts/portal/menu.blade.php index 1c11b7b8f..40965da02 100644 --- a/resources/views/components/layouts/portal/menu.blade.php +++ b/resources/views/components/layouts/portal/menu.blade.php @@ -169,7 +169,7 @@ expand_circle_down - + From 6e1ee934e95ed017eaa86da62a9346a61ba57030 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 09:33:09 +0300 Subject: [PATCH 02/26] margue animation added --- presets.js | 7 ++++- public/akaunting-js/generalAction.js | 22 +++++++++++++++ public/css/app.css | 28 ++++++++++++++++++++ resources/views/common/items/index.blade.php | 2 +- 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/presets.js b/presets.js index 10633d38c..2a1054ec4 100644 --- a/presets.js +++ b/presets.js @@ -231,6 +231,10 @@ module.exports = { '0%': { boxShadow: '0 28px 0 -28px #55588b' }, '100%': { boxShadow: '0 28px 0 #55588b' }, }, + marquee: { + '0%': { transform: 'translateX(0%)' }, + '100%': { transform: 'translateX(-100%)' }, + } }, animation: { @@ -239,7 +243,8 @@ module.exports = { pulsate: 'pulsate 1500ms ease infinite;', spin: 'spin 1000ms infinite', submit: 'submit 0.7s ease alternate infinite', - submit_second: 'submit_second 0.7s ease alternate infinite' + submit_second: 'submit_second 0.7s ease alternate infinite', + marquee: 'marquee 15s linear infinite' }, transitionProperty: { diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 994b4eb15..13aaf4dbc 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -357,3 +357,25 @@ if (navigator.userAgent.search("Firefox") >= 0) { } } //Firefox show modal for icon set + +document.querySelectorAll('[data-truncate]').forEach((truncate) => { + let truncateText = truncate.textContent.split(" ").join(""); + + truncate.addEventListener('mouseover', function () { + if (truncateText.length > 20) { + truncate.style.animationPlayState = 'running'; + truncate.classList.add('animate-marquee'); + + if (truncate.classList.contains('truncate')) { + truncate.classList.remove('truncate'); + } + } + }); + + truncate.addEventListener('mouseout', function () { + if (truncateText.length > 20) { + truncate.style.animationPlayState = 'paused'; + truncate.classList.add('truncate'); + } + }); +}); diff --git a/public/css/app.css b/public/css/app.css index 95fd198af..5e3feba67 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -10011,6 +10011,34 @@ input[type="date"]::-webkit-inner-spin-button, -webkit-animation: submit_second 0.7s ease alternate infinite; animation: submit_second 0.7s ease alternate infinite; } +@-webkit-keyframes marquee{ + + 0%{ + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 100%{ + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } +} +@keyframes marquee{ + + 0%{ + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 100%{ + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } +} +.animate-marquee{ + -webkit-animation: marquee 15s linear infinite; + animation: marquee 15s linear infinite; +} .cursor-auto{ cursor: auto; } diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index b7fb34935..5ef72b42f 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -85,7 +85,7 @@ -
+
{{ $item->name }}
From 18b269a102c33931e99df3101b601bf49add4eb2 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 10:32:07 +0300 Subject: [PATCH 03/26] long text control --- presets.js | 2 +- public/akaunting-js/generalAction.js | 9 +++++++++ public/css/app.css | 4 ++-- resources/views/common/items/index.blade.php | 6 ++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/presets.js b/presets.js index 2a1054ec4..fbb3bc00d 100644 --- a/presets.js +++ b/presets.js @@ -244,7 +244,7 @@ module.exports = { spin: 'spin 1000ms infinite', submit: 'submit 0.7s ease alternate infinite', submit_second: 'submit_second 0.7s ease alternate infinite', - marquee: 'marquee 15s linear infinite' + marquee: 'marquee 5s linear infinite' }, transitionProperty: { diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 13aaf4dbc..500f91f5e 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -358,6 +358,7 @@ if (navigator.userAgent.search("Firefox") >= 0) { } //Firefox show modal for icon set +//margue animation for truncated text document.querySelectorAll('[data-truncate]').forEach((truncate) => { let truncateText = truncate.textContent.split(" ").join(""); @@ -376,6 +377,14 @@ document.querySelectorAll('[data-truncate]').forEach((truncate) => { if (truncateText.length > 20) { truncate.style.animationPlayState = 'paused'; truncate.classList.add('truncate'); + truncate.classList.remove('animate-marquee'); } }); + + if (document.body.clientWidth <= 991) { + if (truncate.parentElement.getAttribute('data-truncate-parent')) { + truncate.parentElement.remove(); + } + } }); +//margue animation for truncated text diff --git a/public/css/app.css b/public/css/app.css index 5e3feba67..47369554b 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -10036,8 +10036,8 @@ input[type="date"]::-webkit-inner-spin-button, } } .animate-marquee{ - -webkit-animation: marquee 15s linear infinite; - animation: marquee 15s linear infinite; + -webkit-animation: marquee 5s linear infinite; + animation: marquee 5s linear infinite; } .cursor-auto{ cursor: auto; diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index 5ef72b42f..22b2a43c8 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -85,8 +85,10 @@ -
- {{ $item->name }} +
+
+ {{ $item->name }} +
@if (! $item->enabled) From 37c83d3c0210061b831beb0cf08465583fa5d470 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 11:19:48 +0300 Subject: [PATCH 04/26] convert to view component --- presets.js | 2 +- public/akaunting-js/generalAction.js | 14 ++++++-------- public/css/app.css | 4 ++-- resources/views/common/items/index.blade.php | 8 ++------ resources/views/components/marguee-text.blade.php | 5 +++++ resources/views/components/table/td.blade.php | 12 +++++++++--- 6 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 resources/views/components/marguee-text.blade.php diff --git a/presets.js b/presets.js index fbb3bc00d..5d701e8a2 100644 --- a/presets.js +++ b/presets.js @@ -244,7 +244,7 @@ module.exports = { spin: 'spin 1000ms infinite', submit: 'submit 0.7s ease alternate infinite', submit_second: 'submit_second 0.7s ease alternate infinite', - marquee: 'marquee 5s linear infinite' + marquee: 'marquee 9s linear infinite' }, transitionProperty: { diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 500f91f5e..938a1819c 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -362,8 +362,12 @@ if (navigator.userAgent.search("Firefox") >= 0) { document.querySelectorAll('[data-truncate]').forEach((truncate) => { let truncateText = truncate.textContent.split(" ").join(""); + if (truncateText.length > 30) { + truncate.classList.add('truncate'); + } + truncate.addEventListener('mouseover', function () { - if (truncateText.length > 20) { + if (truncateText.length > 30) { truncate.style.animationPlayState = 'running'; truncate.classList.add('animate-marquee'); @@ -374,17 +378,11 @@ document.querySelectorAll('[data-truncate]').forEach((truncate) => { }); truncate.addEventListener('mouseout', function () { - if (truncateText.length > 20) { + if (truncateText.length > 30) { truncate.style.animationPlayState = 'paused'; truncate.classList.add('truncate'); truncate.classList.remove('animate-marquee'); } }); - - if (document.body.clientWidth <= 991) { - if (truncate.parentElement.getAttribute('data-truncate-parent')) { - truncate.parentElement.remove(); - } - } }); //margue animation for truncated text diff --git a/public/css/app.css b/public/css/app.css index 47369554b..853582455 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -10036,8 +10036,8 @@ input[type="date"]::-webkit-inner-spin-button, } } .animate-marquee{ - -webkit-animation: marquee 5s linear infinite; - animation: marquee 5s linear infinite; + -webkit-animation: marquee 9s linear infinite; + animation: marquee 9s linear infinite; } .cursor-auto{ cursor: auto; diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index 22b2a43c8..ad7cca862 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -85,12 +85,8 @@ -
-
- {{ $item->name }} -
-
- + {{ $item->name }} + @if (! $item->enabled) @endif diff --git a/resources/views/components/marguee-text.blade.php b/resources/views/components/marguee-text.blade.php new file mode 100644 index 000000000..7963a07c5 --- /dev/null +++ b/resources/views/components/marguee-text.blade.php @@ -0,0 +1,5 @@ +
+
+ {!! $slot !!} +
+
\ No newline at end of file diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index d6ae64e37..f059be20a 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -8,7 +8,9 @@ } @endphp
- {!! $first !!} + + {!! $first !!} +
@endif @@ -21,9 +23,13 @@ } @endphp
- {!! $second !!} + + {!! $second !!} +
@endif - {{ $slot }} + + {{ $slot }} + From ffcc34b646de413ac4f421e3644b97ef792a9c32 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 11:37:23 +0300 Subject: [PATCH 05/26] added th text --- public/akaunting-js/generalAction.js | 2 +- resources/views/banking/transactions/index.blade.php | 6 ++++-- resources/views/components/table/th.blade.php | 12 +++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 938a1819c..f6b40abb7 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -360,7 +360,7 @@ if (navigator.userAgent.search("Firefox") >= 0) { //margue animation for truncated text document.querySelectorAll('[data-truncate]').forEach((truncate) => { - let truncateText = truncate.textContent.split(" ").join(""); + let truncateText = truncate.innerText.split(" ").join(""); if (truncateText.length > 30) { truncate.classList.add('truncate'); diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index f469aa217..9106735ae 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -153,8 +153,10 @@ {{ $item->type_title }} - - + +
+ +
diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index e3d79db3f..a86ced55f 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -8,7 +8,9 @@ } @endphp
- {!! $first !!} + + {!! $first !!} +
@endif @@ -21,9 +23,13 @@ } @endphp
- {!! $second !!} + + {!! $second !!} +
@endif - {{ $slot }} + + {{ $slot }} + From e9aa7f81f47e3f24a7a939691266dc1714730358 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 12:05:03 +0300 Subject: [PATCH 06/26] connection back-end controller --- app/View/Components/MargueeText.php | 32 +++++++++++++++++++ .../views/components/marguee-text.blade.php | 5 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 app/View/Components/MargueeText.php diff --git a/app/View/Components/MargueeText.php b/app/View/Components/MargueeText.php new file mode 100644 index 000000000..00617ab44 --- /dev/null +++ b/app/View/Components/MargueeText.php @@ -0,0 +1,32 @@ +width = $width; + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|string + */ + public function render() + { + return view('components.marguee-text'); + } +} diff --git a/resources/views/components/marguee-text.blade.php b/resources/views/components/marguee-text.blade.php index 7963a07c5..4abe36d4d 100644 --- a/resources/views/components/marguee-text.blade.php +++ b/resources/views/components/marguee-text.blade.php @@ -1,5 +1,8 @@
-
+
{!! $slot !!}
\ No newline at end of file From f755efa947b5232e68b6cad6f11dfc9f93da94af Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 12:44:22 +0300 Subject: [PATCH 07/26] disable/default icon control --- public/akaunting-js/generalAction.js | 7 +++++++ resources/views/banking/accounts/index.blade.php | 4 +--- resources/views/components/index/default.blade.php | 12 +++++++----- resources/views/components/index/disable.blade.php | 12 +++++++----- resources/views/components/marguee-text.blade.php | 2 +- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index f6b40abb7..0b2b93ede 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -385,4 +385,11 @@ document.querySelectorAll('[data-truncate]').forEach((truncate) => { } }); }); + +//disable/enable icons ejected from data-truncate +document.querySelectorAll('[data-index-icon]').forEach((defaultText) => { + defaultText.parentElement.parentElement.parentElement.appendChild(defaultText); +}); +//disable/enable icons ejected from data-truncate + //margue animation for truncated text diff --git a/resources/views/banking/accounts/index.blade.php b/resources/views/banking/accounts/index.blade.php index d961ce33c..d86e3d743 100644 --- a/resources/views/banking/accounts/index.blade.php +++ b/resources/views/banking/accounts/index.blade.php @@ -64,9 +64,7 @@ -
- {{ $item->name }} -
+ {{ $item->name }} @if (! $item->enabled) diff --git a/resources/views/components/index/default.blade.php b/resources/views/components/index/default.blade.php index d972ae1aa..f6ffc1d28 100644 --- a/resources/views/components/index/default.blade.php +++ b/resources/views/components/index/default.blade.php @@ -1,5 +1,7 @@ - - - {{ $icon }} - - +
+ + + {{ $icon }} + + +
diff --git a/resources/views/components/index/disable.blade.php b/resources/views/components/index/disable.blade.php index c2efd9fa0..c169e6c34 100644 --- a/resources/views/components/index/disable.blade.php +++ b/resources/views/components/index/disable.blade.php @@ -1,5 +1,7 @@ - - - {{ $icon }} - - +
+ + + {{ $icon }} + + +
diff --git a/resources/views/components/marguee-text.blade.php b/resources/views/components/marguee-text.blade.php index 4abe36d4d..b645e38c1 100644 --- a/resources/views/components/marguee-text.blade.php +++ b/resources/views/components/marguee-text.blade.php @@ -1,4 +1,4 @@ -
+
Date: Mon, 17 Oct 2022 17:50:54 +0300 Subject: [PATCH 08/26] truncate control for index --- resources/views/banking/reconciliations/index.blade.php | 4 ++-- resources/views/common/companies/index.blade.php | 4 ++-- resources/views/settings/currencies/index.blade.php | 4 ++-- resources/views/settings/taxes/index.blade.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/banking/reconciliations/index.blade.php b/resources/views/banking/reconciliations/index.blade.php index 29a3a289e..2a3283ba8 100644 --- a/resources/views/banking/reconciliations/index.blade.php +++ b/resources/views/banking/reconciliations/index.blade.php @@ -78,9 +78,9 @@ -
+ -
+ @if (! $item->reconciled) diff --git a/resources/views/common/companies/index.blade.php b/resources/views/common/companies/index.blade.php index 9558ccaf6..10d4b3b59 100644 --- a/resources/views/common/companies/index.blade.php +++ b/resources/views/common/companies/index.blade.php @@ -81,9 +81,9 @@ -
+ {{ $item->name }} -
+ @if (! $item->enabled) diff --git a/resources/views/settings/currencies/index.blade.php b/resources/views/settings/currencies/index.blade.php index 92d94b8b4..8c2c570a7 100644 --- a/resources/views/settings/currencies/index.blade.php +++ b/resources/views/settings/currencies/index.blade.php @@ -58,9 +58,9 @@ -
+ {{ $item->name }} -
+ @if (! $item->enabled) diff --git a/resources/views/settings/taxes/index.blade.php b/resources/views/settings/taxes/index.blade.php index 745e70c80..53f38df33 100644 --- a/resources/views/settings/taxes/index.blade.php +++ b/resources/views/settings/taxes/index.blade.php @@ -73,9 +73,9 @@ -
+ {{ $item->name }} -
+ @if (! $item->enabled) From f5f69139d56c72912ef6b3b435337a7bc07401a4 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 17 Oct 2022 18:24:44 +0300 Subject: [PATCH 09/26] truncate html created only truncated text --- public/akaunting-js/generalAction.js | 4 ---- .../views/components/marguee-text.blade.php | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 0b2b93ede..a3bae8f4a 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -361,10 +361,6 @@ if (navigator.userAgent.search("Firefox") >= 0) { //margue animation for truncated text document.querySelectorAll('[data-truncate]').forEach((truncate) => { let truncateText = truncate.innerText.split(" ").join(""); - - if (truncateText.length > 30) { - truncate.classList.add('truncate'); - } truncate.addEventListener('mouseover', function () { if (truncateText.length > 30) { diff --git a/resources/views/components/marguee-text.blade.php b/resources/views/components/marguee-text.blade.php index b645e38c1..e71cc5567 100644 --- a/resources/views/components/marguee-text.blade.php +++ b/resources/views/components/marguee-text.blade.php @@ -1,8 +1,21 @@ +@php + $slot_text_length = strlen($slot); + + $slot_isHtml = strlen(strip_tags($slot)) < strlen($slot); +@endphp + +@if ($slot_text_length >= '30' && ! $slot_isHtml)
{!! $slot !!}
-
\ No newline at end of file +
+@else + {!! $slot !!} +@endif From 967ea50877885a0e59dd13c8e7417a70839e3cf3 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 18 Oct 2022 16:29:28 +0300 Subject: [PATCH 10/26] refactoring --- public/akaunting-js/generalAction.js | 37 ++++++++++--------- resources/views/common/items/index.blade.php | 2 +- resources/views/components/table/td.blade.php | 26 ++++++++----- resources/views/components/table/th.blade.php | 12 ++---- 4 files changed, 39 insertions(+), 38 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index a3bae8f4a..48ec55ebd 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -99,7 +99,7 @@ function expandSub(key, event) { //collapse accordion // run dropdown and tooltip functions for Virtual DOM -document.addEventListener("DOMContentLoaded", () => { +document.addEventListener("DOMContentLoaded", () => { const triggers = [ { event: "mouseover", checker: isHoverable }, { event: "mouseout", checker: isHoverable }, @@ -361,25 +361,26 @@ if (navigator.userAgent.search("Firefox") >= 0) { //margue animation for truncated text document.querySelectorAll('[data-truncate]').forEach((truncate) => { let truncateText = truncate.innerText.split(" ").join(""); + + if (truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.clientWidth) { + truncate.addEventListener('mouseover', function () { + truncate.parentElement.style.animationPlayState = 'running'; + truncate.parentElement.classList.add('animate-marquee'); - truncate.addEventListener('mouseover', function () { - if (truncateText.length > 30) { - truncate.style.animationPlayState = 'running'; - truncate.classList.add('animate-marquee'); + // if (truncate.parentElement.classList.contains('truncate')) { + // truncate.parentElement.classList.remove('truncate'); + // } + }); + + truncate.addEventListener('mouseout', function () { + truncate.parentElement.style.animationPlayState = 'paused'; + truncate.parentElement.classList.remove('animate-marquee'); + truncate.parentElement.classList.add('truncate'); + }); - if (truncate.classList.contains('truncate')) { - truncate.classList.remove('truncate'); - } - } - }); - - truncate.addEventListener('mouseout', function () { - if (truncateText.length > 30) { - truncate.style.animationPlayState = 'paused'; - truncate.classList.add('truncate'); - truncate.classList.remove('animate-marquee'); - } - }); + truncate.classList.add('truncate'); + truncate.parentElement.classList.add('truncate'); + } }); //disable/enable icons ejected from data-truncate diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index ad7cca862..65500b26e 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -84,7 +84,7 @@ - + {{ $item->name }} @if (! $item->enabled) diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index f059be20a..30c299253 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -8,9 +8,11 @@ } @endphp
- - {!! $first !!} - +
+ + {!! $first !!} + +
@endif @@ -23,13 +25,17 @@ } @endphp
- - {!! $second !!} - +
+ + {!! $second !!} + +
@endif - - - {{ $slot }} - + +
+ + {{ $slot }} + +
diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index a86ced55f..e3d79db3f 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -8,9 +8,7 @@ } @endphp
- - {!! $first !!} - + {!! $first !!}
@endif @@ -23,13 +21,9 @@ } @endphp
- - {!! $second !!} - + {!! $second !!}
@endif - - {{ $slot }} - + {{ $slot }} From 3ab2129a35e92ac9a1467647657c7e22a5a4618f Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 18 Oct 2022 16:50:27 +0300 Subject: [PATCH 11/26] js function refactoring --- public/akaunting-js/generalAction.js | 8 +++----- resources/views/common/items/index.blade.php | 2 +- resources/views/components/table/td.blade.php | 4 ++-- resources/views/components/table/th.blade.php | 18 +++++++++++++++--- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 48ec55ebd..337834b27 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -360,16 +360,14 @@ if (navigator.userAgent.search("Firefox") >= 0) { //margue animation for truncated text document.querySelectorAll('[data-truncate]').forEach((truncate) => { - let truncateText = truncate.innerText.split(" ").join(""); - if (truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; truncate.parentElement.classList.add('animate-marquee'); - // if (truncate.parentElement.classList.contains('truncate')) { - // truncate.parentElement.classList.remove('truncate'); - // } + if (truncate.parentElement.classList.contains('truncate')) { + truncate.parentElement.classList.remove('truncate'); + } }); truncate.addEventListener('mouseout', function () { diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index 65500b26e..f4cf11ea8 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -91,7 +91,7 @@ @endif
- + {{ $item->description }}
diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 30c299253..cef211941 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -1,4 +1,4 @@ - + @if (!empty($first)) @php $first_attributes = $first->attributes; @@ -32,7 +32,7 @@
@endif - +
{{ $slot }} diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index e3d79db3f..100e2e467 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -8,7 +8,11 @@ } @endphp
- {!! $first !!} +
+ + {!! $first !!} + +
@endif @@ -21,9 +25,17 @@ } @endphp
- {!! $second !!} +
+ + {!! $second !!} + +
@endif - {{ $slot }} +
+ + {{ $slot }} + +
From eb7dcbfb05ef6e88afc1d9e21095bc85ee6f2761 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 18 Oct 2022 17:18:32 +0300 Subject: [PATCH 12/26] unused developments ejected --- app/View/Components/MargueeText.php | 32 ------------------- public/akaunting-js/generalAction.js | 6 +++- .../banking/reconciliations/index.blade.php | 4 +-- .../banking/transactions/index.blade.php | 2 +- .../views/components/marguee-text.blade.php | 21 ------------ resources/views/components/table/td.blade.php | 2 +- .../views/settings/currencies/index.blade.php | 4 +-- .../views/settings/taxes/index.blade.php | 4 +-- 8 files changed, 13 insertions(+), 62 deletions(-) delete mode 100644 app/View/Components/MargueeText.php delete mode 100644 resources/views/components/marguee-text.blade.php diff --git a/app/View/Components/MargueeText.php b/app/View/Components/MargueeText.php deleted file mode 100644 index 00617ab44..000000000 --- a/app/View/Components/MargueeText.php +++ /dev/null @@ -1,32 +0,0 @@ -width = $width; - } - - /** - * Get the view / contents that represent the component. - * - * @return \Illuminate\Contracts\View\View|string - */ - public function render() - { - return view('components.marguee-text'); - } -} diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 337834b27..a2f229f71 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -359,7 +359,7 @@ if (navigator.userAgent.search("Firefox") >= 0) { //Firefox show modal for icon set //margue animation for truncated text -document.querySelectorAll('[data-truncate]').forEach((truncate) => { +function marqueeAnimation(truncate) { if (truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; @@ -379,6 +379,10 @@ document.querySelectorAll('[data-truncate]').forEach((truncate) => { truncate.classList.add('truncate'); truncate.parentElement.classList.add('truncate'); } +} + +document.querySelectorAll('[data-truncate]').forEach((truncate) => { + marqueeAnimation(truncate); }); //disable/enable icons ejected from data-truncate diff --git a/resources/views/banking/reconciliations/index.blade.php b/resources/views/banking/reconciliations/index.blade.php index 2a3283ba8..29a3a289e 100644 --- a/resources/views/banking/reconciliations/index.blade.php +++ b/resources/views/banking/reconciliations/index.blade.php @@ -78,9 +78,9 @@ - +
- +
@if (! $item->reconciled) diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index 9106735ae..7b5b17785 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -153,7 +153,7 @@ {{ $item->type_title }} - +
diff --git a/resources/views/components/marguee-text.blade.php b/resources/views/components/marguee-text.blade.php deleted file mode 100644 index e71cc5567..000000000 --- a/resources/views/components/marguee-text.blade.php +++ /dev/null @@ -1,21 +0,0 @@ -@php - $slot_text_length = strlen($slot); - - $slot_isHtml = strlen(strip_tags($slot)) < strlen($slot); -@endphp - -@if ($slot_text_length >= '30' && ! $slot_isHtml) -
-
- {!! $slot !!} -
-
-@else - {!! $slot !!} -@endif diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index cef211941..9e993a0da 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -1,4 +1,4 @@ - + @if (!empty($first)) @php $first_attributes = $first->attributes; diff --git a/resources/views/settings/currencies/index.blade.php b/resources/views/settings/currencies/index.blade.php index 8c2c570a7..92d94b8b4 100644 --- a/resources/views/settings/currencies/index.blade.php +++ b/resources/views/settings/currencies/index.blade.php @@ -58,9 +58,9 @@ - +
{{ $item->name }} - +
@if (! $item->enabled) diff --git a/resources/views/settings/taxes/index.blade.php b/resources/views/settings/taxes/index.blade.php index 53f38df33..745e70c80 100644 --- a/resources/views/settings/taxes/index.blade.php +++ b/resources/views/settings/taxes/index.blade.php @@ -73,9 +73,9 @@ - +
{{ $item->name }} - +
@if (! $item->enabled) From d793724599dbe81b9520eee2025e54cdf5f335c8 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 18 Oct 2022 17:25:16 +0300 Subject: [PATCH 13/26] unused developments ejected --- resources/views/common/companies/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/common/companies/index.blade.php b/resources/views/common/companies/index.blade.php index 10d4b3b59..9558ccaf6 100644 --- a/resources/views/common/companies/index.blade.php +++ b/resources/views/common/companies/index.blade.php @@ -81,9 +81,9 @@ - +
{{ $item->name }} - +
@if (! $item->enabled) From f84c0801b979629202d36b4b6c8889fb0b85851a Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 19 Oct 2022 10:23:01 +0300 Subject: [PATCH 14/26] disable animation controlled --- public/akaunting-js/generalAction.js | 8 +++++++- resources/views/components/table/index.blade.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index a2f229f71..55b4f3b91 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -360,6 +360,12 @@ if (navigator.userAgent.search("Firefox") >= 0) { //margue animation for truncated text function marqueeAnimation(truncate) { + if (truncate.closest('[data-disable-truncate]') !== null) { + truncate.parentElement.classList.add('truncate'); + return; + } + // 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.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; @@ -385,7 +391,7 @@ document.querySelectorAll('[data-truncate]').forEach((truncate) => { marqueeAnimation(truncate); }); -//disable/enable icons ejected from data-truncate +//disable/enable icons ejected from data-truncate, HTML of icons ejected from parent element (data-truncate) document.querySelectorAll('[data-index-icon]').forEach((defaultText) => { defaultText.parentElement.parentElement.parentElement.appendChild(defaultText); }); diff --git a/resources/views/components/table/index.blade.php b/resources/views/components/table/index.blade.php index 6c0f1907a..91d311568 100644 --- a/resources/views/components/table/index.blade.php +++ b/resources/views/components/table/index.blade.php @@ -1,6 +1,6 @@
- +
{{ $slot }}
From 41b933143b878a39e69e9dcf3c216b33a84d65b4 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Thu, 20 Oct 2022 16:32:13 +0300 Subject: [PATCH 15/26] code refactoring --- public/akaunting-js/generalAction.js | 5 ++-- resources/views/components/table/td.blade.php | 24 ++++++++++++------- resources/views/components/table/th.blade.php | 24 ++++++++++++------- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 55b4f3b91..ff57e3dfb 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -366,7 +366,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.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.clientWidth) { + if (truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; truncate.parentElement.classList.add('animate-marquee'); @@ -384,6 +384,7 @@ function marqueeAnimation(truncate) { truncate.classList.add('truncate'); truncate.parentElement.classList.add('truncate'); + truncate.parentElement.parentElement.classList.add('overflow-x-hidden'); } } @@ -393,7 +394,7 @@ document.querySelectorAll('[data-truncate]').forEach((truncate) => { //disable/enable icons ejected from data-truncate, HTML of icons ejected from parent element (data-truncate) document.querySelectorAll('[data-index-icon]').forEach((defaultText) => { - defaultText.parentElement.parentElement.parentElement.appendChild(defaultText); + defaultText.parentElement.parentElement.parentElement.parentElement.appendChild(defaultText); }); //disable/enable icons ejected from data-truncate diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 9e993a0da..35dbacf70 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -9,9 +9,11 @@ @endphp
- - {!! $first !!} - +
+ + {!! $first !!} + +
@endif @@ -26,16 +28,20 @@ @endphp
- - {!! $second !!} - +
+ + {!! $second !!} + +
@endif
- - {{ $slot }} - +
+ + {{ $slot }} + +
diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index 100e2e467..2bad428e2 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -9,9 +9,11 @@ @endphp
- - {!! $first !!} - +
+ + {!! $first !!} + +
@endif @@ -26,16 +28,20 @@ @endphp
- - {!! $second !!} - +
+ + {!! $second !!} + +
@endif
- - {{ $slot }} - +
+ + {{ $slot }} + +
From b7829cd19845f3fed2a5727b20a18989141d3e24 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Thu, 20 Oct 2022 16:49:39 +0300 Subject: [PATCH 16/26] added commands for text --- resources/views/components/table/td.blade.php | 3 +++ resources/views/components/table/th.blade.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 35dbacf70..da335fb33 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -8,8 +8,11 @@ } @endphp
+
+
+ {!! $first !!} diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index 2bad428e2..783f0b1d4 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -8,8 +8,11 @@ } @endphp
+
+
+ {!! $first !!} From aa614dedf9cf051d09e1a0ba1ef376d6bf28f5e6 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Thu, 20 Oct 2022 18:28:30 +0300 Subject: [PATCH 17/26] commands added --- resources/views/components/table/td.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index da335fb33..56ad48670 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -10,7 +10,7 @@
- +
From bb7288638072460fa6ba4c0a9572a28b1f55e298 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 21 Oct 2022 10:16:44 +0300 Subject: [PATCH 18/26] refactoring --- public/akaunting-js/generalAction.js | 8 ++++---- .../views/components/index/category.blade.php | 20 ++++++++++--------- resources/views/components/table/td.blade.php | 6 +++--- resources/views/components/table/th.blade.php | 6 +++--- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index ff57e3dfb..1abb05097 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -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 diff --git a/resources/views/components/index/category.blade.php b/resources/views/components/index/category.blade.php index 6268618e1..8033c2688 100644 --- a/resources/views/components/index/category.blade.php +++ b/resources/views/components/index/category.blade.php @@ -1,9 +1,11 @@ - - -{{ $name }} +
+ + + {{ $name }} +
diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 56ad48670..2505f7243 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -13,7 +13,7 @@
- + {!! $first !!}
@@ -32,7 +32,7 @@
- + {!! $second !!}
@@ -42,7 +42,7 @@
- + {{ $slot }}
diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index 783f0b1d4..3e935c028 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -13,7 +13,7 @@
- + {!! $first !!}
@@ -32,7 +32,7 @@
- + {!! $second !!}
@@ -42,7 +42,7 @@
- + {{ $slot }}
From 7a4d42ed56f913904385a2120f903bfadb80bbf8 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 21 Oct 2022 10:18:41 +0300 Subject: [PATCH 19/26] refactoring --- resources/views/banking/transactions/index.blade.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index 7b5b17785..f469aa217 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -154,9 +154,7 @@ {{ $item->type_title }} -
- -
+
From 29f92dce1847f25ddf50d80439dbbf18ba2c1b82 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 21 Oct 2022 10:56:33 +0300 Subject: [PATCH 20/26] refactoring --- public/akaunting-js/generalAction.js | 20 +++++++++++-- resources/views/components/table/td.blade.php | 30 ++++++++----------- resources/views/components/table/th.blade.php | 29 +++++++----------- 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 1abb05097..11bcdf050 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -383,7 +383,15 @@ function marqueeAnimation(truncate) { }); truncate.classList.add('truncate'); - truncate.parentElement.classList.add('truncate'); + + // 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'); + animate_element.classList.add('truncate'); + truncate.parentElement.append(animate_element); + animate_element.append(truncate); + // There needs to be two div for disable/enable icons. If I don't create this div, animation will work with disable/enable icons.--> + + //there is overflow class for the animation does not overflow the width truncate.parentElement.parentElement.classList.add('overflow-x-hidden'); } } @@ -394,7 +402,15 @@ document.querySelectorAll('[data-truncate-marquee]').forEach((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); + let icon_parents_element = defaultText.parentElement.parentElement.parentElement; + + if (icon_parents_element.classList.contains('flex')) { + icon_parents_element.appendChild(defaultText); + } else { + icon_parents_element.parentElement.appendChild(defaultText); + } + + // defaultText.parentElement.parentElement.parentElement.parentElement.appendChild(defaultText); }); //disable/enable icons ejected from data-truncate-marquee diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 2505f7243..92ea7ca84 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -8,15 +8,12 @@ } @endphp
- +
- -
- - - {!! $first !!} - -
+ + + {!! $first !!} +
@endif @@ -31,20 +28,17 @@ @endphp
-
- - {!! $second !!} - -
+ + {!! $second !!} +
+
@endif
-
- - {{ $slot }} - -
+ + {{ $slot }} +
diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index 3e935c028..ee0ad3350 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -8,15 +8,12 @@ } @endphp
- +
- -
- - - {!! $first !!} - -
+ + + {!! $first !!} +
@endif @@ -31,20 +28,16 @@ @endphp
-
- - {!! $second !!} - -
+ + {!! $second !!} +
@endif
-
- - {{ $slot }} - -
+ + {{ $slot }} +
From 82dd65aca50b825882ed396694c63eaf6c372a5b Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 24 Oct 2022 09:59:20 +0300 Subject: [PATCH 21/26] refactoring --- public/akaunting-js/generalAction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 11bcdf050..fa0ab1d43 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -360,8 +360,9 @@ if (navigator.userAgent.search("Firefox") >= 0) { //margue animation for truncated text function marqueeAnimation(truncate) { - if (truncate.closest('[data-disable-marquee]') !== null) { + if (truncate.closest('[disable-marquee]') !== null) { truncate.parentElement.classList.add('truncate'); + truncate.closest('[disable-marquee]').setAttribute('disable-marquee', 'data-disable-marquee'); return; } // offsetwidth = width of the text, clientWidth = width of parent text (div) From 07f80bdc7a03e54a579e1db27274b187d6b2ea1d Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 24 Oct 2022 14:15:06 +0300 Subject: [PATCH 22/26] refactoring for timing --- presets.js | 7 ++++++- public/akaunting-js/generalAction.js | 10 +++++++++- public/css/app.css | 28 ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/presets.js b/presets.js index 5d701e8a2..8b8f7c482 100644 --- a/presets.js +++ b/presets.js @@ -234,6 +234,10 @@ module.exports = { marquee: { '0%': { transform: 'translateX(0%)' }, '100%': { transform: 'translateX(-100%)' }, + }, + marquee_long: { + '0%': { transform: 'translateX(0%)' }, + '100%': { transform: 'translateX(-350%)' }, } }, @@ -244,7 +248,8 @@ module.exports = { spin: 'spin 1000ms infinite', submit: 'submit 0.7s ease alternate infinite', submit_second: 'submit_second 0.7s ease alternate infinite', - marquee: 'marquee 9s linear infinite' + marquee: 'marquee 9s linear infinite', + marquee_long: 'marquee_long 14s linear infinite' }, transitionProperty: { diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index fa0ab1d43..090449efe 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -370,7 +370,14 @@ function marqueeAnimation(truncate) { if (truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; - truncate.parentElement.classList.add('animate-marquee'); + + if (truncate.offsetWidth > 400 && truncate.parentElement.clientWidth < 150) { + truncate.parentElement.classList.remove('animate-marquee'); + truncate.parentElement.classList.add('animate-marquee_long'); + } else { + truncate.parentElement.classList.remove('animate-marquee_long'); + truncate.parentElement.classList.add('animate-marquee'); + } if (truncate.parentElement.classList.contains('truncate')) { truncate.parentElement.classList.remove('truncate'); @@ -380,6 +387,7 @@ function marqueeAnimation(truncate) { truncate.addEventListener('mouseout', function () { truncate.parentElement.style.animationPlayState = 'paused'; truncate.parentElement.classList.remove('animate-marquee'); + truncate.parentElement.classList.remove('animate-marquee_long'); truncate.parentElement.classList.add('truncate'); }); diff --git a/public/css/app.css b/public/css/app.css index 853582455..032dc448a 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -10039,6 +10039,34 @@ input[type="date"]::-webkit-inner-spin-button, -webkit-animation: marquee 9s linear infinite; animation: marquee 9s linear infinite; } +@-webkit-keyframes marquee_long{ + + 0%{ + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 100%{ + -webkit-transform: translateX(-350%); + transform: translateX(-350%); + } +} +@keyframes marquee_long{ + + 0%{ + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 100%{ + -webkit-transform: translateX(-350%); + transform: translateX(-350%); + } +} +.animate-marquee_long{ + -webkit-animation: marquee_long 14s linear infinite; + animation: marquee_long 14s linear infinite; +} .cursor-auto{ cursor: auto; } From 9879358138588e9b85693b446521355dd73e0db3 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 24 Oct 2022 14:20:34 +0300 Subject: [PATCH 23/26] refactoring --- resources/views/settings/currencies/index.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/settings/currencies/index.blade.php b/resources/views/settings/currencies/index.blade.php index 92d94b8b4..b22f60d7b 100644 --- a/resources/views/settings/currencies/index.blade.php +++ b/resources/views/settings/currencies/index.blade.php @@ -57,10 +57,10 @@ - -
+ + {{ $item->name }} -
+ @if (! $item->enabled) From ec46f8b12ea8945b12e0347a7746c3a3a0cd378b Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 24 Oct 2022 14:39:10 +0300 Subject: [PATCH 24/26] refactoring --- public/akaunting-js/generalAction.js | 13 +++++++++++++ resources/views/settings/currencies/index.blade.php | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index 090449efe..32c8aed66 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -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'); diff --git a/resources/views/settings/currencies/index.blade.php b/resources/views/settings/currencies/index.blade.php index b22f60d7b..330df7153 100644 --- a/resources/views/settings/currencies/index.blade.php +++ b/resources/views/settings/currencies/index.blade.php @@ -58,9 +58,9 @@ - +
{{ $item->name }} - +
@if (! $item->enabled) From 0e5bb65890c30045f3f22e092b922f5649d219ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:53:05 +0300 Subject: [PATCH 25/26] chart label formatter type updated --- app/Abstracts/Report.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 811d5f7eb..94b27db1f 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -56,6 +56,10 @@ abstract class Report public $loaded = false; + public $bar_formatter_type = 'money'; + + public $donut_formatter_type = 'percent'; + public $chart = [ 'bar' => [ 'colors' => [ @@ -310,12 +314,12 @@ abstract class Report continue; } - $this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); - $this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + $this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->bar_formatter_type); + $this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->donut_formatter_type); } } else { - $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); - $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->bar_formatter_type); + $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->donut_formatter_type); } } From 34326ed18bb725a9976dd60a7f43204e02ce7954 Mon Sep 17 00:00:00 2001 From: EnesSacid-Buker <73346401+EnesSacid-Buker@users.noreply.github.com> Date: Mon, 24 Oct 2022 16:59:00 +0300 Subject: [PATCH 26/26] Select component clear function added --- resources/views/components/form/group/select.blade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/views/components/form/group/select.blade.php b/resources/views/components/form/group/select.blade.php index f77ae8b03..2802fb0ef 100644 --- a/resources/views/components/form/group/select.blade.php +++ b/resources/views/components/form/group/select.blade.php @@ -139,6 +139,10 @@ @visible-change="{{ $attributes['visible-change'] }}" @endif + @if (! empty($attributes['clear'])) + @clear="{{ $attributes['clear'] }}($event)" + @endif + @if (isset($attributes['readonly'])) :readonly="{{ $attributes['readonly'] }}" @endif