diff options
author | Struan Donald <struan@exo.org.uk> | 2012-10-31 10:43:24 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-10-31 10:43:24 +0000 |
commit | 79c8eb9bb2d02655b241ca0636208f4b64a96e34 (patch) | |
tree | 7702a7a6c731e2b4b748f1c4d406038f7c7bac01 /www/js | |
parent | b6b6c3f710052bb40cbbef78318e6560298319da (diff) |
correctly display submit buttons on submit page if saved account details
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/fixmystreet.js | 1 | ||||
-rw-r--r-- | www/js/mobile.js | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/www/js/fixmystreet.js b/www/js/fixmystreet.js index 1e283db..878706e 100644 --- a/www/js/fixmystreet.js +++ b/www/js/fixmystreet.js @@ -293,7 +293,6 @@ $(document).bind('pageshow', function(){ /* * Show stuff on input focus */ - $('.form-focus-hidden').hide(); $('.form-focus-trigger').on('focus', function(){ $('.form-focus-hidden').fadeIn(500); }); diff --git a/www/js/mobile.js b/www/js/mobile.js index f902baa..8a9d0e4 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -525,6 +525,14 @@ function display_saved_report() { } } +function submit_problem_show() { + if ( localStorage.name ) { + $('.form-focus-hidden').show(); + } else { + $('.form-focus-hidden').hide(); + } +} + $(document).bind('pageinit', function() { $('#postcodeForm').submit(locate); $('#mapForm').submit(postReport); @@ -546,4 +554,5 @@ $(document).delegate('#report-created', 'pageshow',function() { $(document).delegate('#account-page', 'pageshow', display_account_page); $(document).delegate('#my-reports-page', 'pageshow', display_saved_reports); $(document).delegate('#report-page', 'pageshow', display_saved_report); +$(document).delegate('#submit-problem', 'pageshow', submit_problem_show); $(document).delegate('.saved-report', 'click', open_saved_report_page); |