Skip to content

Commit d53c7d8

Browse files
committed
fixed checkboxes in edit forms (issue hestiacp#41)
static prototype: http://dl.dropbox.com/u/1750887/projects/vesta2/web-domain.html
1 parent 5f83af2 commit d53c7d8

File tree

3 files changed

+47
-33
lines changed

3 files changed

+47
-33
lines changed

web/css/main.css

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Title : Vesta
33
Author : Eugen Lobicov, eugen.lobicov@gmail.com
44
55
created : November 27, 2009
6-
last updated : January 30, 2012
6+
last updated : February 1, 2012
77
- - - - - - - - - - - - - - - - - - */
88

99
html{
@@ -594,7 +594,8 @@ input::-moz-focus-inner{
594594
width:11px;
595595
height:11px;
596596
margin:2px 2px 0 0;
597-
background:url(../images/checkbox-selector-2012-01-29.png) no-repeat;
597+
/*background:url(../i/checkbox-selector-2012-01-29.png) no-repeat;*/
598+
background:url(../images/checkbox-selector-2012-01-31.png) no-repeat;
598599
cursor:pointer;
599600
}
600601
.checkbox-selector .selector-title{
@@ -1674,17 +1675,30 @@ input::-moz-focus-inner{
16741675
}
16751676

16761677

1677-
.b-new-entry .checkbox{
1678+
/*.b-new-entry .checkbox,*/
1679+
.b-new-entry span.ui-checkbox{
16781680
display:block;
16791681
float:left;
16801682
width:18px;
16811683
height:18px;
16821684
margin:6px 0 0;
1683-
background:url(/images/form-checkboxes.png) no-repeat;
1685+
/*background:url(../i/checkbox-1.png) no-repeat;*/
1686+
/*background:url(../i/form-checkboxes.png) no-repeat;*/
1687+
background:url(../images/checkbox-selector-2012-01-31.png) no-repeat -12px 0;
16841688
}
1685-
.b-new-entry .checkbox:hover{
1686-
background-position:0 -100px;
1689+
.b-new-entry .ui-checkbox-hover{
1690+
cursor:pointer;
1691+
}
1692+
.b-new-entry span.ui-checkbox-hover{
1693+
background-position:-12px -20px;
1694+
}
1695+
.b-new-entry span.ui-checkbox-state-checked{
1696+
background-position:-12px -40px;
16871697
}
1698+
.b-new-entry span.ui-checkbox-state-checked-hover{
1699+
background-position:-12px -60px;
1700+
}
1701+
16881702
.b-new-entry .stats-settings{
16891703
padding-left:40px;
16901704
}
1.49 KB
Loading

web/js/templates.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ App.Templates.html = {
153153
<input type="text" value="~!:SOA~!" id="soa" name="SOA" class="text-field rule-required rule-ns">\
154154
</div>\
155155
<div class="form-row suspended cc">\
156-
<label for="#" class="field-label">Suspended:</label>\
157-
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
156+
<label for="suspended" class="field-label">Suspended:</label>\
157+
<input id="suspended" type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="cust-checkbox do_action_toggle_suspend" name="SUSPEND" />\
158158
</div>\
159159
<div class="form-row buttons-row cc">\
160160
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
@@ -420,8 +420,8 @@ App.Templates.html = {
420420
<input type="text" name="CONTACT" class="text-field rule-email rule-required" value="~!:CONTACT~!">\
421421
</div>\
422422
<div class="form-row ~!:REPORTS_ENABLED_EDITABLE~! cc">\
423-
<label for="#" class="field-label">Reports:</label>\
424-
<input type="checkbox" name="REPORTS_ENABLED" ~!:CHECKED~! class="styled" value="~!:REPORTS_ENABLED~!">\
423+
<label for="user-reports" class="field-label">Reports:</label>\
424+
<input id="user-reports" class="cust-checkbox" type="checkbox" name="REPORTS_ENABLED" ~!:CHECKED~! value="~!:REPORTS_ENABLED~!">\
425425
</div>\
426426
<div class="form-row cc">\
427427
<label for="#" class="field-label"><span class="mandatory">First name:</span></label>\
@@ -441,8 +441,8 @@ App.Templates.html = {
441441
</div>\
442442
~!:NS~!\
443443
<div class="form-row suspended cc">\
444-
<label for="#" class="field-label">Suspended:</label>\
445-
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND"/>\
444+
<label for="suspended" class="field-label">Suspended:</label>\
445+
<input id="suspended" type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="cust-checkbox do_action_toggle_suspend" name="SUSPEND"/>\
446446
</div>\
447447
<div class="form-row buttons-row cc">\
448448
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
@@ -616,8 +616,8 @@ App.Templates.html = {
616616
</select>\
617617
</div>\
618618
<div class="form-row suspended cc">\
619-
<label for="#" class="field-label">Suspended:</label>\
620-
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND"/>\
619+
<label for="suspended" class="field-label">Suspended:</label>\
620+
<input id="suspended" type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="cust-checkbox do_action_toggle_suspend" name="SUSPEND"/>\
621621
</div>\
622622
<!-- advanced options -->\
623623
<div class="form-options-group">\
@@ -630,12 +630,12 @@ App.Templates.html = {
630630
</div>\
631631
<div class="sub_section hidden">\
632632
<div class="form-row cc">\
633-
<label for="#" class="field-label">CGI Support:</label>\
634-
<input type="checkbox" value="~!:CGI~!" ~!:CHECKED_CGI~! name="CGI" class="styled">\
633+
<label for="domain-cgi" class="field-label">CGI Support:</label>\
634+
<input id="domain-cgi" type="checkbox" value="~!:CGI~!" ~!:CHECKED_CGI~! name="CGI" class="cust-checkbox">\
635635
</div>\
636636
<div class="form-row cc">\
637-
<label for="#" class="field-label">Error Logging:</label>\
638-
<input type="checkbox" value="~!:ELOG~!" ~!:CHECKED_ELOG~! name="ELOG" class="styled">\
637+
<label for="domain-errlogging" class="field-label">Error Logging:</label>\
638+
<input id="domain-errlogging" type="checkbox" value="~!:ELOG~!" ~!:CHECKED_ELOG~! name="ELOG" class="cust-checkbox">\
639639
</div>\
640640
<div class="form-row cc">\
641641
<label for="#" class="field-label">Domain Aliases:</label>\
@@ -651,7 +651,7 @@ App.Templates.html = {
651651
</div>\
652652
<div class="stats-settings">\
653653
<!-- div class="form-row cc">\
654-
<label for="#" class="field-label">Password Protection:</label>\
654+
<label for="stats-auth-enable" class="field-label">Password Protection:</label>\
655655
<input id="stats-auth-enable" type="checkbox" name="STATS_AUTH" ~!:stats_auth_checked~!="" value="~!:STATS_AUTH~!" class="styled do_action_toggle_stats_block">\
656656
</div -->\
657657
<div class="form-row stats-block ~!:ACTIVE_LOGIN~! cc">\
@@ -665,12 +665,12 @@ App.Templates.html = {
665665
</div>\
666666
</div><!-- // stats settings -->\
667667
<div class="form-row cc">\
668-
<label for="#" class="field-label">SSL Support:</label>\
669-
<input type="checkbox" name="SSL" class="styled do_action_toggle_ssl_support ssl_support" ~!:ssl_checked~! value="~!SSL~!">\
668+
<label for="domain-ssl" class="field-label">SSL Support:</label>\
669+
<input id="domain-ssl" type="checkbox" name="SSL" class="cust-checkbox do_action_toggle_ssl_support ssl_support" ~!:ssl_checked~! value="~!SSL~!">\
670670
</div>\
671671
<div class="form-row cc ssl-crtfct-box">\
672-
<label for="#" class="field-label">SSL Shared DocRoot:</label>\
673-
<input type="checkbox" name="SSL_HOME" class="styled" ~!:ssl_home_checked~! value="~!SSL_HOME~!">\
672+
<label for="domain-ssl-docroot" class="field-label">SSL Shared DocRoot:</label>\
673+
<input id="domain-ssl-docroot" type="checkbox" name="SSL_HOME" class="cust-checkbox" ~!:ssl_home_checked~! value="~!SSL_HOME~!">\
674674
</div>\
675675
<div class="form-row ssl-crtfct-box cc">\
676676
<label for="#" class="field-label">SSL Crtificate: <span class="remark">(upload file or paste as text)</span></label>\
@@ -697,8 +697,8 @@ App.Templates.html = {
697697
</div>\
698698
<div class="sub_section hidden">\
699699
<div class="form-row cc">\
700-
<label for="#" class="field-label">create DNS domain:</label>\
701-
<input type="checkbox" value="~!:DNS~!" ~!:CHECKED_DNS~! name="DNS" class="styled">\
700+
<label for="domain-dns" class="field-label">create DNS domain:</label>\
701+
<input id="domain-dns" type="checkbox" value="~!:DNS~!" ~!:CHECKED_DNS~! name="DNS" class="cust-checkbox">\
702702
</div>\
703703
</div><!-- DNS options -->\
704704
<div class="form-options-group hidden">\
@@ -709,15 +709,15 @@ App.Templates.html = {
709709
</div>\
710710
<div class="sub_section hidden">\
711711
<div class="form-row cc">\
712-
<label for="#" class="field-label">create mail domain:</label>\
713-
<input type="checkbox" value="~!:MAIL~!" ~!:CHECKED_MAIL~! name="MAIL" class="styled">\
712+
<label for="domain-mail" class="field-label">create mail domain:</label>\
713+
<input id="domain-mail" type="checkbox" value="~!:MAIL~!" ~!:CHECKED_MAIL~! name="MAIL" class="cust-checkbox">\
714714
</div>\
715715
</div>\
716716
</div>\
717717
</div><!-- Mail options -->\
718718
<div class="form-row cc ~!:DNS_DOMAIN_ALSO~!">\
719-
<label for="#" class="field-label">Create DNS domain also:</label>\
720-
<input type="checkbox" value="" name="DNS_DOMAIN" class="styled">\
719+
<label for="domain-mail-dns" class="field-label">Create DNS domain also:</label>\
720+
<input id="domain-mail-dns" type="checkbox" value="" name="DNS_DOMAIN" class="cust-checkbox">\
721721
</div>\
722722
<div class="form-row buttons-row cc">\
723723
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
@@ -869,8 +869,8 @@ App.Templates.html = {
869869
<select name="CHARSET" class="styled">~!:CHARSET_OPTIONS~!</select>\
870870
</div>\
871871
<div class="form-row suspended cc">\
872-
<label for="#" class="field-label">Suspended:</label>\
873-
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND" />\
872+
<label for="suspended" class="field-label">Suspended:</label>\
873+
<input id="suspended" type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="cust-checkbox do_action_toggle_suspend" name="SUSPEND" />\
874874
</div>\
875875
<div class="form-row buttons-row cc">\
876876
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\
@@ -983,8 +983,8 @@ App.Templates.html = {
983983
<textarea class="textarea" name="REPORT_TO"></textarea>\
984984
</div>\
985985
<div class="form-row suspended cc">\
986-
<label for="#" class="field-label">Suspended:</label>\
987-
<input type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="styled do_action_toggle_suspend" name="SUSPEND"/>\
986+
<label for="suspended" class="field-label">Suspended:</label>\
987+
<input id="suspended" type="checkbox" ~!:SUSPENDED_CHECKED~! value="~!:SUSPENDED_VALUE~!" class="cust-checkbox do_action_toggle_suspend" name="SUSPEND"/>\
988988
</div>\
989989
<div class="form-row buttons-row cc">\
990990
<input class="add-entry-btn do_action_save_form" type="submit" value="~!:save_button~!"/>\

0 commit comments

Comments
 (0)