aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-21 12:31:17 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-21 12:31:17 +0000
commite2bf144a6aaa19779fc55a04081a3c269b9d0f81 (patch)
tree00318d801d35948938743608252fccd2d1b4e585 /web/js/fixmystreet.js
parenteb0c0d42f3596c5dc21e9bcdcc02a4008a541c34 (diff)
parentf8a8948ddb790e7e7593d538c55a3a278fbf3973 (diff)
Merge remote branch 'origin/zurich'
(locale ignored, will rerun .po extraction after to get all changes.) Conflicts: locale/FixMyStreet.po locale/cy_GB.UTF-8/LC_MESSAGES/EmptyHomes.po locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po locale/nn_NO.UTF-8/LC_MESSAGES/FixMyStreet.po templates/web/fixmystreet/report/banner.html templates/web/zurich/faq/faq-de-ch.html
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index e25c2a571..838351e8b 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -52,7 +52,8 @@ $(function(){
var form_submitted = 0;
var submitted = false;
- $("form.validate").validate({
+ $("form.validate").each(function(){
+ $(this).validate({
rules: validation_rules,
messages: translation_strings,
onkeyup: false,
@@ -85,6 +86,7 @@ $(function(){
submitted = false;
},
invalidHandler: function(form, validator) { submitted = true; }
+ });
});
$('input[type=submit]').click( function(e) { form_submitted = 1; } );
@@ -142,7 +144,8 @@ $(function(){
if($('.mobile').length){
$link.append(' <img src="/cobrands/fixmystreet/images/spinner-black.gif" alt="" align="bottom">');
}else{
- $link.append(' <img src="/cobrands/fixmystreet/images/spinner-yellow.gif" alt="" align="bottom">');
+ var spincolor = $('<span>').css("color","white").css("color") === $('#front-main').css("background-color")? 'white' : 'yellow';
+ $link.append(' <img src="/cobrands/fixmystreet/images/spinner-' + spincolor + '.gif" alt="" align="bottom">');
}
geo_position_js.getCurrentPosition(function(pos) {
$link.find('img').remove();