Use string interpolation in CoffeeScript

We use it in Ruby, and it will make it easier to change all quotes to
double quotes in CoffeeScript files.
This commit is contained in:
Javi Martín
2019-03-04 15:14:36 +01:00
parent cbc6ce44de
commit 9e80c75032
14 changed files with 37 additions and 37 deletions

View File

@@ -69,7 +69,7 @@ App.Documentable =
progress: (e, data) ->
progress = parseInt(data.loaded / data.total * 100, 10)
$(data.progressBar).find('.loading-bar').css 'width', progress + '%'
$(data.progressBar).find('.loading-bar').css 'width', "#{progress}%"
return
buildFileUploadData: (e, data) ->
@@ -112,7 +112,7 @@ App.Documentable =
$(data.titleField).val(title)
setInputErrors: (data) ->
errors = '<small class="error">' + data.jqXHR.responseJSON.errors + '</small>'
errors = "<small class='error'>#{data.jqXHR.responseJSON.errors}</small>"
$(data.errorContainer).append(errors)
lockUploads: ->
@@ -157,4 +157,4 @@ App.Documentable =
App.Documentable.doDeleteCachedAttachmentRequest(this.href, data)
removeDocument: (id) ->
$('#' + id).remove()
$("##{id}").remove()