diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/base.scss | 25 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/layout.scss | 6 | ||||
-rw-r--r-- | web/js/fixmystreet.js | 4 |
3 files changed, 21 insertions, 14 deletions
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss index 03ae1af65..43cf82617 100644 --- a/web/cobrands/fixmystreet/base.scss +++ b/web/cobrands/fixmystreet/base.scss @@ -388,22 +388,24 @@ div.form-error, p.form-error { background:#ff0000; color:#fff; - padding:0.5em; - margin:0 1em 0 0; + padding:0 0.5em; + margin:0 0.6em 0 -0.5em; width:auto; - margin-bottom:0.5em; - @include border-radius(0.25em); + @include border-radius(0.25em 0.25em 0 0); } input.form-error, textarea.form-error { border-color:#ff0000; - background-color:#ffeeee; + @include border-radius(0 0 0.25em 0.25em); } -// XXX This is a repeat from core -div.label-valid { - background-color: white; +// don't display valid error boxes as now the jump won't be +// until the user submits, which is fine +div.label-valid, +p.label-valid { + display:none !important; + visibility: hidden; } /* LAYOUT */ @@ -849,7 +851,7 @@ a:hover.button-left { } -// only on mobile, this is a sidebar on desk (#report-a-poblem-sidebar) +// only on mobile, this is a sidebar on desk (#report-a-problem-sidebar) a.rap-notes-trigger, a:hover.rap-notes-trigger { display:block; @@ -915,6 +917,11 @@ a:hover.rap-notes-trigger { display:none !important; } +// hide anything with this class if js is working +.js .hidden-js { + display: none !important; + visibility: hidden; +} /* Front page */ diff --git a/web/cobrands/fixmystreet/layout.scss b/web/cobrands/fixmystreet/layout.scss index 42330266c..1347c4482 100644 --- a/web/cobrands/fixmystreet/layout.scss +++ b/web/cobrands/fixmystreet/layout.scss @@ -325,7 +325,7 @@ textarea{ } /* Report a problem sidebar notes */ -#report-a-poblem-sidebar { +#report-a-problem-sidebar { position:absolute; left:29.5em; top:2em; @@ -345,7 +345,7 @@ textarea{ } } .ie6, .ie7 { - #report-a-poblem-sidebar { + #report-a-problem-sidebar { top:5em; } } @@ -697,7 +697,7 @@ body.frontpage { } //put the RAP notes into the main copy area - #report-a-poblem-sidebar { + #report-a-problem-sidebar { position: static; width: auto; @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js index 513d6da29..47ca6efb7 100644 --- a/web/js/fixmystreet.js +++ b/web/js/fixmystreet.js @@ -139,13 +139,13 @@ $(function(){ }, messages: validation_strings, onkeyup: false, + onfocusout: false, errorElement: 'div', errorClass: 'form-error', // we do this to stop things jumping around on blur success: function (err) { if ( form_submitted ) { err.addClass('label-valid').removeClass('label-valid-hidden').html( ' ' ); } else { err.addClass('label-valid-hidden'); } }, errorPlacement: function( error, element ) { - var l = element.prev('label') || element; - l.before( error ); + element.before( error ); }, submitHandler: function(form) { if (form.submit_problem) { |