Browse files

Disable all input while fetching charts

  • Loading branch information...
1 parent f6c9d3a commit f1cdc839b3538e49c573accb83b69bfdcf41c6f6 @georgehemmings committed Mar 8, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 views/application.coffee
View
16 views/application.coffee
@@ -3,10 +3,11 @@ parse_csv_omit_empty = (values)->
value isnt ''
)
-jQuery ->
- $compare = $('#compare')
-
- $compare.click (event)->
+jQuery ->
+ $('form').submit ->
+ false
+
+ $('#compare').click (event)->
$charts = $('#charts')
$charts.empty()
@@ -18,9 +19,10 @@ jQuery ->
unless bands.length is 0
event.preventDefault()
- $compare.attr("disabled", true)
- $compare.ajaxStop( ->
- $compare.attr("disabled", false)
+ $input = $('input')
+ $input.attr("disabled", true)
+ $input.ajaxStop( ->
+ $input.attr("disabled", false)
)
for type in [

0 comments on commit f1cdc83

Please sign in to comment.