Skip to content

Commit

Permalink
Configuration page aesthetic patch.
Browse files Browse the repository at this point in the history
Changelog excerpt:
- Added flexrow for dropdown menus with included input fields for other
  values at the configuration page.
  • Loading branch information
Maikuolan committed Apr 19, 2024
1 parent 9bcf0f2 commit 04deab9
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,9 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
[2023.12.26; Maikuolan]: Refactored the page greeting.

[2023.12.29; Bug-fix; Maikuolan]: Some of the more unusual available number formatting choices (e.g., choices not using base-10 or Arabic numerals) didn't mesh well with the JavaScript code responsible for using them; Fixed.

### v3.5.1

[2024.04.12; Maikuolan]: Code-style patch.

[2024.04.18; Maikuolan]: Added flexrow for dropdown menus with included input fields for other values at the configuration page.
2 changes: 2 additions & 0 deletions assets/bluemetal/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#ffc}
.txtGn::selection,.txtGn>*:not(.txtOe,.txtRd)::selection{color:#dfc}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/default/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#f88}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
input[type=file]::file-selector-button{background-image:url(data:image/svg+xml;base64,{Base64Encode}{Asset:folder.svg}{/Base64Encode});padding-{FE_Align}:20px;background-repeat:no-repeat;background-position:top 1px {FE_Align} 4px}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/fullmoon/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#fcefcf}
.txtGn::selection,.txtGn>*:not(.txtOe,.txtRd)::selection{color:#dfc}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/moss/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#b77}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
input[type=file]::file-selector-button{background-image:url(data:image/svg+xml;base64,{Base64Encode}{Asset:folder.svg}{/Base64Encode});padding-{FE_Align}:20px;background-repeat:no-repeat;background-position:top 1px {FE_Align} 4px}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/primer/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#f88}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
input[type=file]::file-selector-button{position:relative;top:-2px}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/primerdark/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#eaa}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
input[type=file]::file-selector-button{position:relative;top:-2px}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/rbi/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#f88}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
input[type=file]::file-selector-button{background-image:url(data:image/svg+xml;base64,{Base64Encode}{Asset:folder.svg}{/Base64Encode});padding-{FE_Align}:20px;background-repeat:no-repeat;background-position:top 1px {FE_Align} 4px}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
2 changes: 2 additions & 0 deletions assets/slate/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,5 @@ input[type=button].reset:hover,input[type=button].reset:active{color:#fa7}
.txtOe::selection,.txtOe>*:not(.txtGn,.txtRd)::selection{color:#fec}
.txtRd::selection,.txtRd>*:not(.txtGn,.txtOe)::selection{color:#fcc}
input[type=file]::file-selector-button{background-image:url(data:image/svg+xml;base64,{Base64Encode}{Asset:folder.svg}{/Base64Encode});padding-{FE_Align}:20px;background-repeat:no-repeat;background-position:top 1px {FE_Align} 4px}
.flexrow{display:flex}
.flexin{margin-{FE_Align}:-1px;margin-{FE_Align_Reverse}:1px;width:auto;flex-grow:1}
7 changes: 5 additions & 2 deletions src/pages/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* License: GNU/GPLv2
* @see LICENSE.txt
*
* This file: The configuration page (last modified: 2023.12.29).
* This file: The configuration page (last modified: 2024.04.18).
*/

namespace phpMussel\FrontEnd;
Expand Down Expand Up @@ -306,6 +306,9 @@
$ThisDir['DirLangKey'],
$ThisDir['Trigger']
);
if (!empty($DirValue['allow_other'])) {
$ThisDir['FieldOut'] = '<div class="flexrow">' . $ThisDir['FieldOut'];
}
}
$DirValue['gridH'] = 'gridHB';
foreach ($DirValue['choices'] as $ChoiceKey => $ChoiceValue) {
Expand Down Expand Up @@ -434,7 +437,7 @@
} else {
$ThisDir['SelectOther'] = !isset($DirValue['choices'][$this->Loader->Configuration[$CatKey][$DirKey]]);
$ThisDir['FieldOut'] .= empty($DirValue['allow_other']) ? '</select>' : sprintf(
'<option value="Other"%1$s>%2$s</option></select><input type="text"%3$s class="auto" name="%4$s" id="%4$s_field" value="%5$s" />',
'<option value="Other"%1$s>%2$s</option></select><input type="text"%3$s class="flexin" name="%4$s" id="%4$s_field" value="%5$s" /></div>',
$ThisDir['SelectOther'] ? ' selected' : '',
$this->Loader->L10N->getString('label.Other'),
$ThisDir['SelectOther'] ? '' : ' style="display:none"',
Expand Down

0 comments on commit 04deab9

Please sign in to comment.