diff --git a/app/assets/javascripts/legislation_annotatable.js.coffee b/app/assets/javascripts/legislation_annotatable.js.coffee index 141bcb858..34385bc1e 100644 --- a/app/assets/javascripts/legislation_annotatable.js.coffee +++ b/app/assets/javascripts/legislation_annotatable.js.coffee @@ -38,7 +38,7 @@ App.LegislationAnnotatable = renderAnnotationComments: (event) -> if event.offset - $("#comments-box").css({top: event.offset - $('.calc-comments').offset().top}) + $("#comments-box").css({ top: event.offset - $('.calc-comments').offset().top }) if App.LegislationAnnotatable.isMobile() return @@ -105,7 +105,7 @@ App.LegislationAnnotatable = dataType: 'script').done (-> $('#new_legislation_annotation #legislation_annotation_quote').val(@annotation.quote) $('#new_legislation_annotation #legislation_annotation_ranges').val(JSON.stringify(@annotation.ranges)) - $('#comments-box').css({top: position.top - $('.calc-comments').offset().top}) + $('#comments-box').css({ top: position.top - $('.calc-comments').offset().top }) unless $('[data-legislation-open-phase]').data('legislation-open-phase') == false App.LegislationAnnotatable.highlight('#7fff9a') @@ -143,7 +143,7 @@ App.LegislationAnnotatable = el.addClass('current-annotation') $('#comments-box').html('') App.LegislationAllegations.show_comments() - $('html,body').animate({scrollTop: el.offset().top}) + $('html,body').animate({ scrollTop: el.offset().top }) $.event.trigger type: "renderLegislationAnnotation" annotation_id: ann_id diff --git a/app/assets/javascripts/sortable.js.coffee b/app/assets/javascripts/sortable.js.coffee index 1af543f6a..2070aa2ba 100644 --- a/app/assets/javascripts/sortable.js.coffee +++ b/app/assets/javascripts/sortable.js.coffee @@ -2,8 +2,8 @@ App.Sortable = initialize: -> $(".sortable").sortable update: (event, ui) -> - new_order = $(this).sortable('toArray', {attribute: 'data-answer-id'}); + new_order = $(this).sortable('toArray', { attribute: 'data-answer-id' }); $.ajax url: $('.sortable').data('js-url'), - data: {ordered_list: new_order}, + data: { ordered_list: new_order }, type: 'POST' diff --git a/app/assets/javascripts/stats.js.coffee b/app/assets/javascripts/stats.js.coffee index 7fcdfb00a..5a2f6c188 100644 --- a/app/assets/javascripts/stats.js.coffee +++ b/app/assets/javascripts/stats.js.coffee @@ -3,7 +3,7 @@ buildGraph = (el) -> url = $(el).data 'graph' - conf = bindto: el, data: {x: 'x', url: url, mimeType: 'json'}, axis: { x: {type: 'timeseries',tick: { format: '%Y-%m-%d' } }} + conf = bindto: el, data: { x: 'x', url: url, mimeType: 'json' }, axis: { x: { type: 'timeseries',tick: { format: '%Y-%m-%d' } } } graph = c3.generate conf App.Stats = diff --git a/app/assets/javascripts/suggest.js.coffee b/app/assets/javascripts/suggest.js.coffee index de42fd998..3fbfa8a73 100644 --- a/app/assets/javascripts/suggest.js.coffee +++ b/app/assets/javascripts/suggest.js.coffee @@ -9,7 +9,7 @@ App.Suggest = callback = -> $.ajax url: $this.data('js-url') - data: {search: $this.val()}, + data: { search: $this.val() }, type: 'GET', dataType: 'html' success: (stHtml) -> diff --git a/app/assets/javascripts/tag_autocomplete.js.coffee b/app/assets/javascripts/tag_autocomplete.js.coffee index be27cd81c..695f38bd8 100644 --- a/app/assets/javascripts/tag_autocomplete.js.coffee +++ b/app/assets/javascripts/tag_autocomplete.js.coffee @@ -11,7 +11,7 @@ App.TagAutocomplete = source: (request, response) -> $.ajax url: $('.tag-autocomplete').data('js-url'), - data: {search: App.TagAutocomplete.extractLast( request.term )}, + data: { search: App.TagAutocomplete.extractLast( request.term ) }, type: 'GET', dataType: 'json' success: ( data ) ->