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

@@ -7,9 +7,9 @@ App.Annotatable =
annotator.ui.editor.Editor.template = [
'<div class="annotator-outer annotator-editor annotator-hide">',
' <form class="annotator-widget">',
' ' + _t('Unregistered'),
" #{_t('Unregistered')}",
' <div class="annotator-controls">',
' <a href="#cancel" class="annotator-cancel">' + _t('Cancel') + '</a>',
" <a href='#cancel' class='annotator-cancel'>#{_t('Cancel')}</a>",
' </div>',
' </form>',
'</div>'
@@ -23,7 +23,7 @@ App.Annotatable =
app = new annotator.App()
.include ->
beforeAnnotationCreated: (ann) ->
ann[ann_type + "_id"] = ann_id
ann["#{ann_type}_id"] = ann_id
ann.permissions = ann.permissions || {}
ann.permissions.admin = []
.include(annotator.ui.main, { element: this })
@@ -34,5 +34,5 @@ App.Annotatable =
app.ident.identity = current_user_id
options = {}
options[ann_type + "_id"] = ann_id
options["#{ann_type}_id"] = ann_id
app.annotations.load(options)