[#7660] added missing type:button attribute and replaced form tag with div to minimize future regressions
This commit is contained in:
1
ui/dist/assets/index-2kemIEr6.css
vendored
1
ui/dist/assets/index-2kemIEr6.css
vendored
File diff suppressed because one or more lines are too long
1
ui/dist/assets/index-CGid8tZ1.css
vendored
Normal file
1
ui/dist/assets/index-CGid8tZ1.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
ui/dist/index.html
vendored
4
ui/dist/index.html
vendored
@@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
<!-- prism -->
|
<!-- prism -->
|
||||||
<script src="./libs/prism/prism.js" data-manual></script>
|
<script src="./libs/prism/prism.js" data-manual></script>
|
||||||
<script type="module" crossorigin src="./assets/index-Cd_LELY_.js"></script>
|
<script type="module" crossorigin src="./assets/index-D8D-K7hW.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-2kemIEr6.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-CGid8tZ1.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export function appHeader() {
|
|||||||
colorSchemeButton(),
|
colorSchemeButton(),
|
||||||
t.button(
|
t.button(
|
||||||
{
|
{
|
||||||
|
type: "button",
|
||||||
className: "header-link logged-user txt-normal",
|
className: "header-link logged-user txt-normal",
|
||||||
"html-popovertarget": "logged-user-dropdown",
|
"html-popovertarget": "logged-user-dropdown",
|
||||||
},
|
},
|
||||||
@@ -108,6 +109,7 @@ function colorSchemeButton() {
|
|||||||
return [
|
return [
|
||||||
t.button(
|
t.button(
|
||||||
{
|
{
|
||||||
|
type: "button",
|
||||||
className: "header-link color-scheme-picker",
|
className: "header-link color-scheme-picker",
|
||||||
"html-popovertarget": "color-scheme-dropdown",
|
"html-popovertarget": "color-scheme-dropdown",
|
||||||
title: "Color scheme",
|
title: "Color scheme",
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ function initSearch(selectFunc = null) {
|
|||||||
if (data.searchTerm.length) {
|
if (data.searchTerm.length) {
|
||||||
return t.button(
|
return t.button(
|
||||||
{
|
{
|
||||||
|
type: "button",
|
||||||
className: "link-hint",
|
className: "link-hint",
|
||||||
title: "Clear search",
|
title: "Clear search",
|
||||||
onclick: () => reset(),
|
onclick: () => reset(),
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ function addToast(textOrElem, options = {}) {
|
|||||||
textOrElem,
|
textOrElem,
|
||||||
t.button(
|
t.button(
|
||||||
{
|
{
|
||||||
|
type: "button",
|
||||||
className: "m-l-auto btn circle sm transparent secondary toast-remove",
|
className: "m-l-auto btn circle sm transparent secondary toast-remove",
|
||||||
title: "Clear",
|
title: "Clear",
|
||||||
onclick: () => removeToast(toastRef),
|
onclick: () => removeToast(toastRef),
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
[data-color-scheme="dark"],
|
[data-color-scheme="dark"],
|
||||||
[data-color-scheme="dark"] .dropdown {
|
[data-color-scheme="dark"] .dropdown {
|
||||||
--surfaceColor: #1f1f1f;
|
--surfaceColor: #1f1f1f;
|
||||||
--surfaceAlt1Color: color-mix(in srgb, var(--surfaceColor), white 3%);
|
--surfaceAlt1Color: color-mix(in srgb, var(--surfaceColor), white 2%);
|
||||||
--surfaceAlt2Color: color-mix(in srgb, var(--surfaceColor), white 7%);
|
--surfaceAlt2Color: color-mix(in srgb, var(--surfaceColor), white 7%);
|
||||||
--surfaceAlt3Color: color-mix(in srgb, var(--surfaceColor), white 12%);
|
--surfaceAlt3Color: color-mix(in srgb, var(--surfaceColor), white 12%);
|
||||||
--surfaceAlt4Color: color-mix(in srgb, var(--surfaceColor), white 14%);
|
--surfaceAlt4Color: color-mix(in srgb, var(--surfaceColor), white 14%);
|
||||||
@@ -193,6 +193,7 @@
|
|||||||
scrollbar-color: var(--surfaceAlt5Color) transparent;
|
scrollbar-color: var(--surfaceAlt5Color) transparent;
|
||||||
|
|
||||||
--modalOverlayColor: rgb(0,0,0, 0.45);
|
--modalOverlayColor: rgb(0,0,0, 0.45);
|
||||||
|
--tooltipSurfaceColor: rgb(22,22,22, 0.9);
|
||||||
|
|
||||||
--boxShadow: 0px 8px 5px -5px rgba(0,0,0, 0.3);
|
--boxShadow: 0px 8px 5px -5px rgba(0,0,0, 0.3);
|
||||||
--leftBoxShadow: -1px 0px 5px 0 rgba(0,0,0, 0.3);
|
--leftBoxShadow: -1px 0px 5px 0 rgba(0,0,0, 0.3);
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ export function input(props) {
|
|||||||
{ className: "actions" },
|
{ className: "actions" },
|
||||||
t.button(
|
t.button(
|
||||||
{
|
{
|
||||||
|
type: "button",
|
||||||
className: "btn sm secondary transparent circle",
|
className: "btn sm secondary transparent circle",
|
||||||
ariaLabel: app.attrs.tooltip("Remove"),
|
ariaLabel: app.attrs.tooltip("Remove"),
|
||||||
onclick: () => remove(record.id),
|
onclick: () => remove(record.id),
|
||||||
|
|||||||
@@ -199,13 +199,13 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
|||||||
data.initialDraft = getDraft();
|
data.initialDraft = getDraft();
|
||||||
|
|
||||||
draftWatcher?.unwatch();
|
draftWatcher?.unwatch();
|
||||||
draftWatcher = watch(() => data.recordHash, (newVal, oldVal) => {
|
draftWatcher = watch(() => data.recordHash, (newHash, oldHash) => {
|
||||||
if (typeof oldVal == "undefined") {
|
if (typeof oldHash == "undefined") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.hasChanges) {
|
if (data.hasChanges) {
|
||||||
saveDraft(data.recordHash);
|
saveDraft(newHash);
|
||||||
} else {
|
} else {
|
||||||
deleteDraft();
|
deleteDraft();
|
||||||
}
|
}
|
||||||
@@ -395,15 +395,11 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
|||||||
return [
|
return [
|
||||||
t.div(
|
t.div(
|
||||||
{ className: "modal-content" },
|
{ className: "modal-content" },
|
||||||
t.form(
|
t.div(
|
||||||
{
|
{
|
||||||
id: uniqueId + "form",
|
id: uniqueId + "form",
|
||||||
className: "grid",
|
className: "grid",
|
||||||
inert: () => data.isLoading || data.isSaving,
|
inert: () => data.isLoading || data.isSaving,
|
||||||
onsubmit: (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
// save(); // don't allow to prevent accidental save on input enter
|
|
||||||
},
|
|
||||||
onmount: (el) => {
|
onmount: (el) => {
|
||||||
el._quickSaveHandler = (e) => {
|
el._quickSaveHandler = (e) => {
|
||||||
if ((e.ctrlKey || e.metaKey) && e.code == "KeyS") {
|
if ((e.ctrlKey || e.metaKey) && e.code == "KeyS") {
|
||||||
|
|||||||
Reference in New Issue
Block a user