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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user