From ba0e24ae94c4ae1cd3345ea7a5577a29151c9948 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Mon, 10 Oct 2022 13:43:28 +0300 Subject: [PATCH] hash control for form posting --- public/css/app.css | 4 ++++ resources/assets/js/plugins/form.js | 4 ++++ resources/views/components/dropdown/index.blade.php | 2 +- safelist.txt | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/public/css/app.css b/public/css/app.css index b1dddb84d..0b9857f30 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -50034,6 +50034,10 @@ body{ width: 20rem; } + .lg\:w-9{ + width: 2.25rem; + } + .lg\:w-8\/12{ width: 66.666667%; } diff --git a/resources/assets/js/plugins/form.js b/resources/assets/js/plugins/form.js index d955c6c19..94ea0bf1d 100644 --- a/resources/assets/js/plugins/form.js +++ b/resources/assets/js/plugins/form.js @@ -479,6 +479,10 @@ export default class Form { this.loading = true; window.location.href = response.data.redirect; + + if (window.location.hash !== undefined) { + location.reload(); + } } this.response = response.data; diff --git a/resources/views/components/dropdown/index.blade.php b/resources/views/components/dropdown/index.blade.php index c18955a28..d26e5e456 100644 --- a/resources/views/components/dropdown/index.blade.php +++ b/resources/views/components/dropdown/index.blade.php @@ -3,7 +3,7 @@ @if ($trigger->attributes->has('override') && in_array('class', explode(',', $trigger->attributes->get('override')))) class="{{ $trigger->attributes->get('class') }}" @else - class="w-9 h-9 flex items-center justify-center px-2 py-2 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-sm font-medium leading-6" + class="w-full lg:w-9 h-9 flex items-center justify-center px-2 py-2 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-sm font-medium leading-6" @endif data-dropdown-toggle="{{ $id }}" {{ $trigger->attributes }} diff --git a/safelist.txt b/safelist.txt index e247972a3..d667e08b7 100644 --- a/safelist.txt +++ b/safelist.txt @@ -4,5 +4,6 @@ lg:pl-24 lg:my-12 lg:mt-4 lg:pl-6 +lg:w-9 ltr:-right-1.5 rtl:-left-1.5 \ No newline at end of file