Skip to content

Commit d06e102

Browse files
AlecRustjaapmarcus
andauthored
Start refactoring <select> (hestiacp#2907)
* Add new <select> HTML/CSS and apply to Edit User form * Apply new selects to Edit Cron form * Apply new selects to Add Cron form * Apply new selects to Add User form * Apply new selects to Add/Edit Web forms * Remove hidden/unused field * Due to change in last commit * Apply new selects to Edit Server form * Time to clean up a lot of old code Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 5a0a002 commit d06e102

File tree

17 files changed

+404
-1526
lines changed

17 files changed

+404
-1526
lines changed

web/add/web/index.php

Lines changed: 15 additions & 452 deletions
Large diffs are not rendered by default.

web/css/src/themes/dark.css

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ label:hover {
678678

679679
.vst-input:disabled,
680680
.vst-list:disabled,
681+
.form-select:disabled,
681682
.vst-textinput:disabled {
682683
background-color: #303030;
683684
text-shadow: 1px 1px rgb(0 0 0 / 30%);
@@ -690,6 +691,7 @@ label:hover {
690691

691692
.vst-input:disabled:hover,
692693
.vst-list:disabled:hover,
694+
.form-select:disabled:hover,
693695
.vst-textinput:disabled:hover {
694696
border-color: #606060 !important;
695697
}
@@ -711,7 +713,8 @@ label:hover {
711713
box-shadow: none !important;
712714
}
713715

714-
.vst-list {
716+
.vst-list,
717+
.form-select {
715718
background-color: #454545;
716719
border: 1px solid #606060;
717720
color: #d4d4d4;
@@ -735,43 +738,20 @@ textarea:focus::placeholder {
735738
color: #909090 !important;
736739
}
737740

738-
select.vst-list:-moz-focusring {
739-
740-
}
741-
742-
.vst-list.long-2 {
743-
744-
}
745-
746-
.vst-list option {
747-
748-
}
749-
750-
.vst-list:hover {
741+
.vst-list:hover,
742+
.form-select:hover {
751743
border-color: #0090ff;
752744
background-color: #494949;
753745
}
754746

755-
.vst-list:focus {
747+
.vst-list:focus,
748+
.form-select:focus {
756749
background-color: #222;
757750
border-color: #0080df;
758751
color: #fff;
759752
box-shadow: 0 1px 6px rgb(0 52 91 / 75%);
760753
}
761754

762-
.vst-list.flat {
763-
border: 1px solid #454545;
764-
color: #fff;
765-
}
766-
767-
.vst-list.flat:hover {
768-
color: #ff3478;
769-
}
770-
771-
.vst-list.flat option {
772-
color: #d4d4d4;
773-
}
774-
775755
a.vst-text,
776756
a.vst-text b {
777757
color: #fff;

web/css/src/themes/default.css

Lines changed: 54 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,6 +2322,7 @@ label:hover {
23222322

23232323
.vst-input:disabled,
23242324
.vst-list:disabled,
2325+
.form-select:disabled,
23252326
.vst-textinput:disabled {
23262327
background-color: #e7e7e7;
23272328
text-shadow: 1px 1px rgb(255 255 255 / 100%);
@@ -2335,7 +2336,9 @@ label:hover {
23352336
}
23362337

23372338
.vst-input:disabled:hover,
2338-
.vst-list:disabled:hover .vst-textinput:disabled:hover {
2339+
.vst-list:disabled:hover,
2340+
.form-select:disabled:hover,
2341+
.vst-textinput:disabled:hover {
23392342
border-color: #cfcfcf;
23402343
}
23412344

@@ -2359,7 +2362,7 @@ label:hover {
23592362
}
23602363

23612364
.vst-input.vst-list-editor:focus {
2362-
background-color: white;
2365+
background-color: #fff;
23632366
}
23642367

23652368
.vst-list {
@@ -2384,19 +2387,6 @@ label:hover {
23842387
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
23852388
}
23862389

2387-
select.vst-list:-moz-focusring {
2388-
color: transparent;
2389-
}
2390-
2391-
.vst-list.long-2 {
2392-
width: 486px;
2393-
background-position: 465px;
2394-
}
2395-
2396-
.vst-list option {
2397-
padding: 6px 1px 6px 15px;
2398-
}
2399-
24002390
.vst-list:hover {
24012391
border: 1px solid #94c8f0;
24022392
}
@@ -2406,25 +2396,6 @@ select.vst-list:-moz-focusring {
24062396
color: #333;
24072397
}
24082398

2409-
.vst-list.flat {
2410-
border: 1px solid #fff;
2411-
color: #326b9b;
2412-
text-transform: uppercase;
2413-
font-weight: 600;
2414-
font-size: 0.8rem;
2415-
margin-left: -10px;
2416-
text-shadow: none !important;
2417-
box-shadow: none !important;
2418-
}
2419-
2420-
.vst-list.flat:hover {
2421-
color: #c36;
2422-
}
2423-
2424-
.vst-list.flat option {
2425-
color: #4e4e4e;
2426-
}
2427-
24282399
.vst-text {
24292400
cursor: default;
24302401
}
@@ -2586,6 +2557,39 @@ a.vst-text:active b {
25862557
border: none !important;
25872558
}
25882559

2560+
.form-label {
2561+
margin-bottom: 6px;
2562+
display: inline-block;
2563+
}
2564+
2565+
.form-select {
2566+
display: block;
2567+
cursor: pointer;
2568+
width: 100%;
2569+
font-weight: normal;
2570+
font-size: .8rem;
2571+
padding: 8px 35px 7px 10px;
2572+
line-height: 1.5;
2573+
border-radius: 4px;
2574+
background-color: #fff;
2575+
border: 1px solid #ccc;
2576+
color: #4e4e4e;
2577+
appearance: none;
2578+
background-image: url(/images/arrow.png);
2579+
background-repeat: no-repeat;
2580+
background-position: right 8px center;
2581+
text-shadow: 0 0 0 #4b4b4b;
2582+
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
2583+
}
2584+
2585+
.form-select:hover {
2586+
border: 1px solid #94c8f0;
2587+
}
2588+
2589+
.form-select:focus {
2590+
border: 1px solid #008fee;
2591+
}
2592+
25892593
.form-check {
25902594
padding-left: 20px;
25912595
margin-bottom: 2px;
@@ -3793,29 +3797,32 @@ li[aria-expanded="true"] a {
37933797
color: #c36;
37943798
}
37953799

3796-
.cron-helper-tabs select.short {
3797-
background-position: -388px -604px;
3798-
min-width: 30px;
3799-
width: 70px;
3800-
}
3801-
38023800
.cron-helper-tabs p {
38033801
color: #777;
38043802
font-size: 0.8rem;
38053803
}
38063804

3807-
.cron-helper-tabs p span {
3805+
.cron-helper-tabs .form-label {
38083806
padding-right: 15px;
38093807
padding-left: 25px;
38103808
}
38113809

3812-
.cron-helper-tabs p span.first {
3810+
.cron-helper-tabs .form-label.first {
38133811
display: inline-block;
3814-
padding-right: 15px;
38153812
width: 100px;
38163813
padding-left: 0;
38173814
}
38183815

3816+
.cron-helper-tabs .form-select {
3817+
display: inline-block;
3818+
width: 379px;
3819+
}
3820+
3821+
.cron-helper-tabs .form-select.short {
3822+
min-width: 30px;
3823+
width: 70px;
3824+
}
3825+
38193826
.cron-helper-tabs .button {
38203827
width: auto;
38213828
background-color: #3b9de8;
@@ -3995,3 +4002,7 @@ meter[value="4"]::-moz-meter-bar { background: green; }
39954002
.u-mt15 {
39964003
margin-top: 15px !important;
39974004
}
4005+
4006+
.u-mb20 {
4007+
margin-bottom: 20px !important;
4008+
}

web/css/src/themes/flat.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ strong {
9393
box-shadow: none;
9494
}
9595

96-
.vst-list {
96+
.vst-list,
97+
.form-select {
9798
box-shadow: none;
9899
}
99100

web/css/src/themes/vestia.css

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ strong {
283283
border-radius: 0 !important;
284284
}
285285

286-
.vst-list {
286+
.vst-list,
287+
.form-select {
287288
box-shadow: none;
288289
border-radius: 0 !important;
289290
}
@@ -363,14 +364,16 @@ a.vst-text:hover b,
363364
color: #333;
364365
}
365366

366-
.vst-list:focus {
367+
.vst-list:focus,
368+
.form-select:focus {
367369
border: 1px solid #ff6701;
368370
color: #333;
369371
}
370372

371373
.vst-input:hover,
372-
.vst-textinput:hover,
373-
.vst-list:hover {
374+
.vst-list:hover,
375+
.form-select:hover,
376+
.vst-textinput:hover {
374377
border: 1px solid #e95e00;
375378
}
376379

@@ -512,6 +515,7 @@ meter {
512515

513516
.vst-input,
514517
.vst-list,
518+
.form-select,
515519
.vst-textinput {
516520
font-family: Arial, Helvetica, sans-serif !important;
517521
}
@@ -617,12 +621,6 @@ a#btn-back:focus {
617621
text-transform: none !important;
618622
}
619623

620-
.vst-list.flat:hover,
621-
.vst-list.flat:focus {
622-
color: #ff6701 !important;
623-
border: 1px solid #fff !important;
624-
}
625-
626624
a.ui-button:hover,
627625
a.ui-button:active,
628626
a.ui-button:focus {

web/css/themes/dark.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/css/themes/default.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/css/themes/flat.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)