Use spaces around curly braces in CoffeeScript
Just like we do in Ruby.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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) ->
|
||||
|
||||
@@ -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 ) ->
|
||||
|
||||
Reference in New Issue
Block a user