From afd82a4dc7d1335495c7a7899b836a39c7a3a9e5 Mon Sep 17 00:00:00 2001 From: Giuseppe Criscione <18699708+giuscris@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:22:41 +0100 Subject: [PATCH] Rename css class `.form-input-reset` to `.form-input-action` --- panel/src/scss/components/forms/_forms-base.scss | 9 ++------- panel/src/ts/components/inputs.ts | 2 +- panel/views/fields/date.php | 4 ++-- panel/views/fields/image.php | 4 ++-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/panel/src/scss/components/forms/_forms-base.scss b/panel/src/scss/components/forms/_forms-base.scss index ce044b6d..8dcf3532 100644 --- a/panel/src/scss/components/forms/_forms-base.scss +++ b/panel/src/scss/components/forms/_forms-base.scss @@ -26,11 +26,6 @@ background-color: var(--color-base-700); color: var(--color-base-300); } - - &[readonly] { - // Safari Mobile bug - @include user-select-none; - } } .form-input[type="checkbox"], @@ -129,7 +124,7 @@ margin-bottom: 0; } -.form-input-reset { +.form-input-action { position: absolute; top: 50%; right: 0.5rem; @@ -159,7 +154,7 @@ padding-left: 1.75rem; } -.form-input-wrap .form-input:has(+ .form-input-reset) { +.form-input-wrap .form-input:has(+ .form-input-action) { padding-right: 1.625rem; } diff --git a/panel/src/ts/components/inputs.ts b/panel/src/ts/components/inputs.ts index 6c5b47d0..cc5a0540 100644 --- a/panel/src/ts/components/inputs.ts +++ b/panel/src/ts/components/inputs.ts @@ -35,7 +35,7 @@ export class Inputs { $$("select:not([hidden])", parent).forEach((element: HTMLSelectElement) => (this[element.name] = new SelectInput(element, app.config.SelectInput))); - $$(".form-input-reset", parent).forEach((element) => { + $$(".form-input-action[data-reset]", parent).forEach((element) => { const targetId = element.dataset.reset; if (targetId) { element.addEventListener("click", () => { diff --git a/panel/views/fields/date.php b/panel/views/fields/date.php index 54339179..53774740 100644 --- a/panel/views/fields/date.php +++ b/panel/views/fields/date.php @@ -12,5 +12,5 @@ 'disabled' => $field->isDisabled(), 'hidden' => $field->isHidden(), ]) ?>> - icon('times-circle') ?> - \ No newline at end of file + icon('times-circle') ?> + diff --git a/panel/views/fields/image.php b/panel/views/fields/image.php index ed35077e..de4413f5 100644 --- a/panel/views/fields/image.php +++ b/panel/views/fields/image.php @@ -13,5 +13,5 @@ 'disabled' => $field->isDisabled(), 'hidden' => $field->isHidden(), ]) ?>> - icon('times-circle') ?> - \ No newline at end of file + icon('times-circle') ?> +