Skip to content

Commit 7a1ffd4

Browse files
authored
Further UI tidy (hestiacp#2941)
* Tidy .vst-text usage * Refactor .step-top and .input-label to utility classes * Remove unused .step-right * Tidy .data class * Migrate .step-left to .u-pl50 * Tidy clearfix
1 parent d8ad453 commit 7a1ffd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+679
-718
lines changed

web/css/src/themes/dark.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,6 @@ a.vst-text:active b {
854854

855855
.additional-control.remove-ns {}
856856

857-
.data .step-left {}
858-
859857
.hide-password {}
860858

861859
.toggle-psw-visibility-icon {}
@@ -1383,10 +1381,6 @@ form#vstobjects.suspended {
13831381

13841382
}
13851383

1386-
.shortcuts ul li.step-top {
1387-
1388-
}
1389-
13901384
.shortcuts ul li span {
13911385

13921386
}

web/css/src/themes/default.css

Lines changed: 26 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,6 @@ a {
198198
color: #7c7c7c;
199199
}
200200

201-
.clearfix::before,
202-
.clearfix::after {
203-
content: "";
204-
display: table;
205-
}
206-
207-
.clearfix::after {
208-
clear: both;
209-
}
210-
211201
.text-right {
212202
text-align: right;
213203
}
@@ -1011,18 +1001,6 @@ div.l-content > div.l-separator:nth-of-type(4) {
10111001
padding-left: 96px;
10121002
}
10131003

1014-
.l-sort-toolbar td.step-right:first-of-type {
1015-
padding-right: 20px;
1016-
}
1017-
1018-
.l-sort-toolbar td:nth-of-type(2) {
1019-
/* padding-right: 60px; */
1020-
}
1021-
1022-
.l-sort-toolbar td:last-of-type {
1023-
/* padding-left: 40px; */
1024-
}
1025-
10261004
.l-sort-toolbar__filter-apply {
10271005
float: left;
10281006
width: 32px;
@@ -1442,10 +1420,6 @@ div.l-content > div.l-separator:nth-of-type(4) {
14421420
vertical-align: top;
14431421
}
14441422

1445-
.l-unit__col--left.step-left {
1446-
padding-left: 30px;
1447-
}
1448-
14491423
.l-unit__col--right.total {
14501424
padding-left: 16px;
14511425
}
@@ -1454,14 +1428,6 @@ div.l-content > div.l-separator:nth-of-type(4) {
14541428
padding-left: 78px;
14551429
}
14561430

1457-
.l-sort-toolbar .step-left {
1458-
padding-left: 40px;
1459-
}
1460-
1461-
.step-right {
1462-
padding-right: 40px;
1463-
}
1464-
14651431
.l-unit__date {
14661432
font-size: 11px;
14671433
margin-top: 10px;
@@ -2257,23 +2223,11 @@ body.mobile .l-icon-shortcuts {
22572223
font-weight: 600;
22582224
}
22592225

2260-
.input-label {
2261-
padding-top: 6px;
2262-
}
2263-
22642226
.data input[type="checkbox"] {
22652227
display: inline;
22662228
cursor: pointer;
22672229
}
22682230

2269-
.step-top {
2270-
padding-top: 18px;
2271-
}
2272-
2273-
.step-top-small {
2274-
padding-top: 14px;
2275-
}
2276-
22772231
.jump-top {
22782232
margin-top: -60px;
22792233
}
@@ -2380,10 +2334,6 @@ label:hover {
23802334
background-color: #fff;
23812335
}
23822336

2383-
.vst-text {
2384-
cursor: default;
2385-
}
2386-
23872337
a.vst-text,
23882338
a.vst-text b {
23892339
color: #326b9b;
@@ -2604,10 +2554,6 @@ a.vst-text:active b {
26042554
display: none;
26052555
}
26062556

2607-
.data .step-left {
2608-
padding-left: 50px;
2609-
}
2610-
26112557
.hide-password {
26122558
color: #aaa;
26132559
margin-left: -36px;
@@ -3546,10 +3492,6 @@ form#vstobjects.suspended {
35463492
padding: 5px 20px;
35473493
}
35483494

3549-
.shortcuts ul li.step-top {
3550-
padding-top: 30px;
3551-
}
3552-
35533495
.shortcuts ul li span {
35543496
color: #ff3478;
35553497
display: inline-block;
@@ -3935,6 +3877,16 @@ meter[value="4"]::-moz-meter-bar { background: green; }
39353877
/* Global utilities
39363878
========================================================================== */
39373879

3880+
.clearfix::before,
3881+
.clearfix::after {
3882+
content: " ";
3883+
display: table;
3884+
}
3885+
3886+
.clearfix::after {
3887+
clear: both;
3888+
}
3889+
39383890
.hidden {
39393891
display: none;
39403892
}
@@ -3947,6 +3899,22 @@ meter[value="4"]::-moz-meter-bar { background: green; }
39473899
margin-bottom: 20px !important;
39483900
}
39493901

3902+
.u-pt6 {
3903+
padding-top: 6px !important;
3904+
}
3905+
3906+
.u-pt18 {
3907+
padding-top: 18px !important;
3908+
}
3909+
3910+
.u-pt30 {
3911+
padding-top: 30px !important;
3912+
}
3913+
3914+
.u-pl50 {
3915+
padding-left: 50px !important;
3916+
}
3917+
39503918
.u-inputWidth {
39513919
width: 380px !important;
39523920
}

web/css/src/themes/vestia.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ meter {
577577
margin-right: 15px;
578578
}
579579

580-
td.vst-text.input-label.step-top.advanced-options .fas {
580+
td.advanced-options .fas {
581581
display: none !important;
582582
}
583583

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/vestia.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/js/pages/edit_web.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ App.Listeners.WEB.keypress_ftp_username = function() {
5656
if (current_val.trim() != '') {
5757
App.Actions.WEB.update_ftp_username_hint(ref, current_val);
5858
}
59-
59+
6060
ref.bind('keypress input', function(evt) {
6161
clearTimeout(window.frp_usr_tmt);
6262
window.frp_usr_tmt = setTimeout(function() {
@@ -78,7 +78,7 @@ App.Actions.WEB.update_ftp_path_hint = function(elm, hint) {
7878
if (hint[0] != '/') {
7979
hint = '/' + hint;
8080
}
81-
81+
8282
hint = hint.replace(/\/(\/+)/g, '/');
8383

8484
$(elm).parent().find('.v-ftp-path-hint').text(hint);
@@ -92,7 +92,7 @@ App.Listeners.WEB.keypress_ftp_path = function() {
9292
if (current_val.trim() != '') {
9393
App.Actions.WEB.update_ftp_path_hint(ref, current_val);
9494
}
95-
95+
9696
ref.bind('keypress input', function(evt) {
9797
clearTimeout(window.frp_usr_tmt);
9898
window.frp_usr_tmt = setTimeout(function() {
@@ -108,16 +108,16 @@ App.Listeners.WEB.keypress_ftp_path = function() {
108108
App.Actions.WEB.add_ftp_user_form = function() {
109109
var ref = $('#templates').find('.ftptable-nrm').clone(true);
110110
var index = $('.data-col2 .ftptable').length + 1;
111-
111+
112112
ref.find('input').each(function(i, elm) {
113113
var attr_value = $(elm).prop('name').replace('%INDEX%', index);
114114
$(elm).prop('name', attr_value);
115115
});
116-
116+
117117
ref.find('.ftp-user-number').text(index);
118-
118+
119119
$('#ftp_users').append(ref);
120-
120+
121121
var index = 1;
122122
$('.data-col2 .ftp-user-number:visible').each(function(i, o) {
123123
$(o).text(index);
@@ -134,13 +134,13 @@ App.Actions.WEB.remove_ftp_user = function(elm) {
134134
}
135135
ref.removeClass('ftptable-nrm');
136136
ref.hide();
137-
137+
138138
var index = 1;
139139
$('.data-col2 .ftp-user-number:visible').each(function(i, o) {
140140
$(o).text(index);
141141
index += 1;
142142
});
143-
143+
144144
if ($('.ftptable-nrm:visible').length == 0) {
145145
$('.add-new-ftp-user-button').hide();
146146
$('input[name="v_ftp"]').prop('checked', false);
@@ -193,22 +193,22 @@ App.Actions.WEB.toggle_letsencrypt = function(elm) {
193193
}
194194
}
195195

196-
App.Actions.WEB.randomPasswordGenerated = function(elm) {
196+
App.Actions.WEB.randomPasswordGenerated = function(elm) {
197197
return App.Actions.WEB.passwordChanged(elm);
198198
}
199199

200-
App.Actions.WEB.passwordChanged = function(elm) {
200+
App.Actions.WEB.passwordChanged = function(elm) {
201201
var ref = $(elm).parents('.ftptable');
202202
if (ref.find('.vst-email-alert-on-psw').length == 0) {
203203
var inp_name = ref.find('.v-ftp-user-is-new').prop('name');
204204
inp_name = inp_name.replace('is_new', 'v_ftp_email');
205205
ref.find('tr:last').after('<tr>\
206-
<td class="vst-text step-left input-label">\
206+
<td class="u-pl50 u-pt6">\
207207
Send FTP credentials to email\
208208
</td>\
209209
</tr>\
210210
<tr>\
211-
<td class="step-left">\
211+
<td class="u-pl50">\
212212
<input type="text" value="" name="' + inp_name + '" class="vst-input vst-email-alert-on-psw">\
213213
</td>\
214214
</tr>');
@@ -237,19 +237,19 @@ $(function() {
237237
$('.stats-auth').show();
238238
}
239239
});
240-
240+
241241
$('select[name="v_nginx_cache"]').change(function(evt){
242242
var select = $(evt.target);
243-
243+
244244
if(select.val() != 'yes'){
245245
$('#v-clear-cache').hide();
246246
$('#v_nginx_cache_length').hide();
247247
} else {
248248
$('#v-clear-cache').show();
249249
$('#v_nginx_cache_length').show();
250250
}
251-
});
252-
251+
});
252+
253253
$('select[name="v_proxy_template"]').change(function(evt){
254254
var select = $(evt.target);
255255

@@ -263,7 +263,7 @@ $(function() {
263263
} else {
264264
$('#v-clear-cache').show();
265265
}
266-
});
266+
});
267267

268268
$('#vstobjects').on('submit', function(evt) {
269269
$('input[disabled]').each(function(i, elm) {
@@ -292,7 +292,7 @@ function elementHideShow(element){
292292
}
293293

294294
$('.v-redirect-custom-value').change( function(){
295-
295+
296296
if(this.value == "custom"){
297297
$('#custom_redirect').show();
298298
}else{

web/templates/footer.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div style="margin-top: 4px;"></div><a href="javascript:elementHideShow('banner');">Hide</a></div>
1111
</div>
1212
<?php
13-
}
13+
}
1414
}
1515
?>
1616
<div title="<?=_('Confirmation');?>" class="confirmation-text-redirect hidden">
@@ -29,7 +29,7 @@
2929
<li><span class="key">Ctrl + Enter</span><?=_('Save Form')?></li>
3030
<li><span class="key">Ctrl + Backspace</span><?=_('Cancel saving form')?></li>
3131

32-
<li class="step-top"><span class="key">1</span><?=_('Go to WEB list')?></li>
32+
<li class="u-pt30"><span class="key">1</span><?=_('Go to WEB list')?></li>
3333
<li><span class="key">2</span><?=_('Go to DNS list')?></li>
3434
<li><span class="key">3</span><?=_('Go to MAIL list')?></li>
3535
<li><span class="key">4</span><?=_('Go to DB list')?></li>
@@ -38,13 +38,13 @@
3838
</ul>
3939
<ul>
4040
<li><span class="key">f</span><?=_('Focus on search')?></li>
41-
<li class="step-top"><span class="key">h</span><?=_('Display/Close shortcuts')?></li>
41+
<li class="u-pt30"><span class="key">h</span><?=_('Display/Close shortcuts')?></li>
4242

43-
<li class="step-top"><span class="key bigger">&larr;</span><?=_('Move backward through top menu')?></li>
43+
<li class="u-pt30"><span class="key bigger">&larr;</span><?=_('Move backward through top menu')?></li>
4444
<li><span class="key bigger">&rarr;</span><?=_('Move forward through top menu')?></li>
4545
<li><span class="key">Enter</span><?=_('Enter focused element')?></li>
4646

47-
<li class="step-top"><span class="key bigger">&uarr;</span><?=_('Move up through elements list')?></li>
47+
<li class="u-pt30"><span class="key bigger">&uarr;</span><?=_('Move up through elements list')?></li>
4848
<li><span class="key bigger">&darr;</span><?=_('Move down through elements list')?></li>
4949
</ul>
5050
</div>

0 commit comments

Comments
 (0)