diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb index a310bc8d1..ce1ef3409 100644 --- a/app/controllers/assets_controller.rb +++ b/app/controllers/assets_controller.rb @@ -68,10 +68,10 @@ class AssetsController < ApplicationController def move_targets if @assoc.is_a?(Step) protocol = @assoc.protocol - render json: { targets: protocol.steps.order(:position).where.not(id: @assoc.id).map{|i| [i.id, i.name] } } + render json: { targets: protocol.steps.order(:position).where.not(id: @assoc.id).map { |i| [i.id, i.name] } } elsif @assoc.is_a?(Result) my_module = @assoc.my_module - render json: { targets: my_module.results.where.not(id: @assoc.id).map{ |i| [i.id, i.name] } } + render json: { targets: my_module.results.where.not(id: @assoc.id).map { |i| [i.id, i.name] } } else render json: { targets: [] } end diff --git a/app/javascript/vue/shared/content/attachments.vue b/app/javascript/vue/shared/content/attachments.vue index 98847c281..d1472b9c0 100644 --- a/app/javascript/vue/shared/content/attachments.vue +++ b/app/javascript/vue/shared/content/attachments.vue @@ -144,7 +144,7 @@ return `${attachment.attributes.view_mode}Attachment` }, deleteAttachment(id) { - this.$emit('attachment:deleted', id, ) + this.$emit('attachment:deleted', id) }, initMarvinJS() { // legacy logic from app/assets/javascripts/sitewide/marvinjs_editor.js diff --git a/app/javascript/vue/shared/content/attachments/mixins/attachment_moved.js b/app/javascript/vue/shared/content/attachments/mixins/attachment_moved.js index f3e9c59d8..88eb9c0d1 100644 --- a/app/javascript/vue/shared/content/attachments/mixins/attachment_moved.js +++ b/app/javascript/vue/shared/content/attachments/mixins/attachment_moved.js @@ -4,4 +4,4 @@ export default { this.$emit('attachment:moved', attachmentId, targetId); } } -} +}; diff --git a/app/javascript/vue/shared/content/attachments/mixins/move.js b/app/javascript/vue/shared/content/attachments/mixins/move.js index ae406d7ea..16fb516a0 100644 --- a/app/javascript/vue/shared/content/attachments/mixins/move.js +++ b/app/javascript/vue/shared/content/attachments/mixins/move.js @@ -9,16 +9,16 @@ export default { methods: { showMoveModal(event) { event.stopPropagation(); - this.movingAttachment= true; + this.movingAttachment = true; }, closeMoveModal() { this.movingAttachment = false; }, - moveAttachment(target_id) { - axios.post(this.attachment.attributes.urls.move, { target_id: target_id }). - then(() => { + moveAttachment(targetId) { + axios.post(this.attachment.attributes.urls.move, { target_id: targetId }) + .then(() => { this.movingAttachment = false; - this.$emit('attachment:moved', this.attachment.id, target_id); + this.$emit('attachment:moved', this.attachment.id, targetId); }); } }