mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-16 05:42:13 +08:00
Fix hound
This commit is contained in:
parent
f31d2b8912
commit
e66968357a
4 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export default {
|
|||
this.$emit('attachment:moved', attachmentId, targetId);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue