From 082330b1666fc3bc1379e3e82dec0c53e7252770 Mon Sep 17 00:00:00 2001 From: dpilafian Date: Wed, 19 Jun 2024 04:18:13 -0700 Subject: [PATCH] Fix send invitation button not enabling --- src/gallery/console/admin.less | 1 + src/gallery/console/css/admin-accounts.less | 15 ++++++ .../console/css/gallery-setttings.less | 26 ++++++---- src/gallery/console/css/notice-box.less | 49 ++++++++++++++----- src/gallery/console/css/page-layout.less | 30 +----------- src/gallery/console/css/portfolio-image.less | 4 +- src/gallery/console/index.php | 17 ++++--- src/gallery/console/js/admin.js | 8 +-- src/gallery/css/page-layout.less | 4 +- src/gallery/css/static/utility-box.less | 30 ++++++++++++ 10 files changed, 117 insertions(+), 67 deletions(-) create mode 100755 src/gallery/console/css/admin-accounts.less diff --git a/src/gallery/console/admin.less b/src/gallery/console/admin.less index 4dae4ee..b97384e 100755 --- a/src/gallery/console/admin.less +++ b/src/gallery/console/admin.less @@ -5,6 +5,7 @@ // Administrator Console +@import "css/admin-accounts"; @import "css/gallery-setttings"; @import "css/gallery-uploader"; @import "css/notice-box"; diff --git a/src/gallery/console/css/admin-accounts.less b/src/gallery/console/css/admin-accounts.less new file mode 100755 index 0000000..03cfc77 --- /dev/null +++ b/src/gallery/console/css/admin-accounts.less @@ -0,0 +1,15 @@ +/////////////////////////////////////////////////////////////// +// Paradise ~ centerkey.com/paradise // +// GPLv3 ~ Copyright (c) Individual contributors to Paradise // +/////////////////////////////////////////////////////////////// + +// Console Administrator Accounts + +@import "../css/static/utility-box"; + +section#console-admin-accounts { + p { + font-size: 0.9rem; + font-style: italic; + } + } diff --git a/src/gallery/console/css/gallery-setttings.less b/src/gallery/console/css/gallery-setttings.less index 12ad549..a08494e 100755 --- a/src/gallery/console/css/gallery-setttings.less +++ b/src/gallery/console/css/gallery-setttings.less @@ -7,13 +7,19 @@ @import "../css/static/utility-box"; -.gallery-settings fieldset.settings-website input.dna-field-dark-mode+span { background-color: dimgray; color: white; padding: 0px 5px; } -.gallery-settings fieldset.settings-website input.dna-field-image-border+span { border: 1px solid black; padding: 0px 3px; } -.gallery-settings fieldset.settings-website input.dna-field-caption-caps+span { font-size: 0.8em; text-transform: uppercase; } -.gallery-settings fieldset.settings-website input.dna-field-caption-italic+span { font-style: italic; } -.gallery-settings fieldset.settings-website input.dna-field-show-description+span { font-weight: lighter; } -.gallery-settings fieldset.settings-tabs label { display: inline; } -.gallery-settings fieldset.settings-tabs label span { display: inline; } -.gallery-settings fieldset.settings-tabs label input[type=text] { width: 40%; margin-bottom: 1em; } -.gallery-settings fieldset.settings-tabs label input[type=checkbox] { margin-left: 3px; } -.gallery-settings fieldset.settings-tabs [data-item-type=page]:first-child label:last-child { display: none; } +.gallery-settings { + fieldset.settings-website { + input.dna-field-dark-mode+span { background-color: dimgray; color: white; padding: 0px 5px; } + input.dna-field-image-border+span { border: 1px solid black; padding: 0px 3px; } + input.dna-field-caption-caps+span { font-size: 0.8em; text-transform: uppercase; } + input.dna-field-caption-italic+span { font-style: italic; } + input.dna-field-show-description+span { font-weight: lighter; } + } + fieldset.settings-tabs { + label { display: inline; } + label span { display: inline; } + label input[type=text] { width: 40%; margin-bottom: 1em; } + label input[type=checkbox] { margin-left: 3px; } + [data-item-type=page]:first-child label:last-child { display: none; } + } + } diff --git a/src/gallery/console/css/notice-box.less b/src/gallery/console/css/notice-box.less index 94717d5..d968e6f 100755 --- a/src/gallery/console/css/notice-box.less +++ b/src/gallery/console/css/notice-box.less @@ -7,15 +7,40 @@ @import "../css/static/utility-box"; -notice-box.show { max-height: 100vh; opacity: 1; } -notice-box { max-height: 0vh; overflow: hidden; opacity: 0; transition: all 1000ms; } -notice-box { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); max-width: 500px; background-color: black; border-radius: 10px; padding: 18px 50px 12px 30px; } -notice-box >header { margin-bottom: 12px; } -notice-box >header >nav { position: absolute; top: 6px; right: 10px; } -notice-box >header >nav i[data-icon] { color: lightskyblue; } -notice-box >header >h2 { white-space: nowrap; color: crimson; padding-right: 100px; } -notice-box >div { color: white; } -notice-box >div >p {} -notice-box >div >b {} -notice-box >div >ul {} -notice-box >div >ul >li {} +notice-box { + max-height: 0vh; + overflow: hidden; + position: fixed; + top: 20px; + left: 50%; + transform: translateX(-50%); + max-width: 500px; + background-color: black; + border-radius: 10px; + padding: 18px 50px 12px 30px; + opacity: 0; + transition: all 1000ms; + &.show { + max-height: 100vh; + opacity: 1; + } + >header { + margin-bottom: 12px; + >nav { + position: absolute; + top: 6px; + right: 10px; + i[data-icon] { + color: lightskyblue; + } + } + >h2 { + white-space: nowrap; + color: crimson; + padding-right: 100px; + } + } + >div { + color: white; + } + } diff --git a/src/gallery/console/css/page-layout.less b/src/gallery/console/css/page-layout.less index acc0687..f811ea5 100755 --- a/src/gallery/console/css/page-layout.less +++ b/src/gallery/console/css/page-layout.less @@ -17,38 +17,10 @@ body { font-size: 1.3rem; } } - } - -body { button { font-size: 0.9rem; } - #status-msg { + output#status-msg { font-weight: bold; } } - -i.icon-popup-anchor { - &+div { - position: absolute; - visibility: hidden; - opacity: 0; - transition: all 400ms; - white-space: nowrap; - font-weight: bold; - text-align: right; - color: firebrick; - background-color: white; - border: 3px solid steelblue; - border-radius: 5px; - padding: 15px 25px; - } - &:hover+div, - &+div:hover { - visibility: visible; - opacity: 1; - } - } - -// Component: Administrator Accounts -.admin-accounts p { font-size: 0.9rem; font-style: italic; } diff --git a/src/gallery/console/css/portfolio-image.less b/src/gallery/console/css/portfolio-image.less index 75443b9..13a6800 100755 --- a/src/gallery/console/css/portfolio-image.less +++ b/src/gallery/console/css/portfolio-image.less @@ -27,7 +27,7 @@ .portfolio-image >form >label { padding-left: 0px; margin-bottom: 1em; } .portfolio-image >form >label:first-child span { display: inline-block; transition: color 400ms; } .portfolio-image >form >label:first-child input { margin: 0px 10px 0px 5px; } -.portfolio-image >form >label.display-off >span:first-child { color: rgb(16, 12, 12); } +.portfolio-image >form >label.display-off >span:first-child { color: firebrick; } .portfolio-image >form >label textarea { height: 3.2em; } .portfolio-image >form >p { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; } .portfolio-image >form >p label:last-child { white-space: nowrap; padding-left: 0px; } @@ -44,7 +44,7 @@ .portfolio-image >form .actions i.font-icon[data-icon=times] { font-size: 2.0rem; } .portfolio-image:first-child >form .actions i.font-icon[data-move=up], .portfolio-image:last-child >form .actions i.font-icon[data-move=down] { opacity: 0.2; pointer-events: none; } -.portfolio-image form .actions i.icon-popup-anchor+div { bottom: 15px; left: 85px; } +.portfolio-image form .actions i.icon-popup-anchor { .IconPopupAnchor(); } .portfolio-image >figure { flex: 0 0 180px; text-align: center; margin: 0px 0px 0px 10px; } .portfolio-image >figure >img { max-width: 100%; max-height: 210px; border: 2px solid darkgray; transition: all 400ms; } .portfolio-image >figure >img:hover { border-color: black; } diff --git a/src/gallery/console/index.php b/src/gallery/console/index.php index d812cc3..828582c 100755 --- a/src/gallery/console/index.php +++ b/src/gallery/console/index.php @@ -34,7 +34,7 @@

Paradise Photo Gallery

Administrator Console

@@ -45,7 +45,7 @@

Status

-
+
@@ -89,7 +89,7 @@

Permanently delete this image?

- +
@@ -256,7 +256,7 @@
-
+

Gallery Administrators

Accounts @@ -270,7 +270,8 @@ Pending invitations
- ~~expires~~: ~~to~~ + Expires ~~expires~~: + ~~to~~

No outstanding invitations.

@@ -283,17 +284,17 @@ - +
-
+

Gallery Backup

Create backup
- +
diff --git a/src/gallery/console/js/admin.js b/src/gallery/console/js/admin.js index 9803702..eea232d 100644 --- a/src/gallery/console/js/admin.js +++ b/src/gallery/console/js/admin.js @@ -120,7 +120,7 @@ admin.ui = { const uploadHelp = 'Or just drag photos here
(2 MB limit per file)'; const acceptedTypes = ['image/jpeg', 'image/png']; const options = { - dictDefaultMessage: '

' + uploadHelp, + dictDefaultMessage: '

' + uploadHelp, url: 'upload.php', acceptedFiles: acceptedTypes.join(','), maxFilesize: maxFileMB, @@ -159,11 +159,11 @@ admin.ui = { admin.invites = { elem: { - email: globalThis.document.querySelector('.admin-accounts .send-invite input[type=email]'), - sendButton: globalThis.document.querySelector('.admin-accounts .send-invite button'), + email: globalThis.document.querySelector('#console-admin-accounts .send-invite input[type=email]'), + sendButton: globalThis.document.querySelector('#console-admin-accounts .send-invite button'), }, validate(input) { - admin.invites.elem.sendButton.enable(libX.util.cleanupEmail(input.value)); + admin.invites.elem.sendButton.disabled = !libX.util.cleanupEmail(input.value); }, send(button) { button.disabled = true; diff --git a/src/gallery/css/page-layout.less b/src/gallery/css/page-layout.less index 33e07b8..a74aabe 100755 --- a/src/gallery/css/page-layout.less +++ b/src/gallery/css/page-layout.less @@ -94,10 +94,10 @@ body { >span:first-child { border-left: @navMenuDivider; } - >span.selected { + >span.dna-selected { cursor: auto; } - >span.selected, + >span.dna-selected, >span:hover { background-color: dimgray; } diff --git a/src/gallery/css/static/utility-box.less b/src/gallery/css/static/utility-box.less index 66b505d..051e56b 100644 --- a/src/gallery/css/static/utility-box.less +++ b/src/gallery/css/static/utility-box.less @@ -31,6 +31,36 @@ align-items: center; } +.IconPopupAnchor { + // + //
+ //

Delete?

+ // + //
+ &+div { + position: absolute; + bottom: 15px; + left: 85px; + white-space: nowrap; + font-weight: bold; + text-align: right; + color: firebrick; + background-color: white; + border: 3px solid steelblue; + border-radius: 5px; + padding: 15px 25px; + transition: all 400ms; + opacity: 0; + visibility: hidden; + } + &:hover+div, + &+div:hover { + visibility: visible; + opacity: 1; + } + } + + .MobileMode(@lessRules) { //selects iPhone 6/6s/7/8/SE2/SE3 landscape and anything narrower @media (max-width: 667px) { @lessRules(); } }