aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorRon Lucke <lucke@elan-ev.de>2024-11-04 07:35:37 +0000
committerJan-Hendrik Willms <tleilax+github@gmail.com>2024-11-05 15:09:15 +0100
commit07d705575d63742c793d70f965c4827796698199 (patch)
treeec101b1af43ad135b348691ffa829ef3983533cf /resources
parentc89f2acb1f0d888f0fee0070a9f7f5b0473214e4 (diff)
Fix Courseware Sort issue
Closes #4766 Merge request studip/studip!3585
Diffstat (limited to 'resources')
-rw-r--r--resources/vue/mixins/courseware/container.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/vue/mixins/courseware/container.js b/resources/vue/mixins/courseware/container.js
index 7022cbd..d213a55 100644
--- a/resources/vue/mixins/courseware/container.js
+++ b/resources/vue/mixins/courseware/container.js
@@ -31,12 +31,12 @@ const containerMixin = {
containerUpdate: 'courseware-containers/update'
}),
dropBlock(e) {
- this.isDragging = false; // implemented bei echt container type
+ this.isDragging = false; // implemented by each container type
let data = {};
data.originContainerId = e.from.__vue__.$attrs.containerId;
data.targetContainerId = e.to.__vue__.$attrs.containerId;
if (data.originContainerId === data.targetContainerId) {
- this.storeSort(); // implemented bei echt container type
+ this.storeSort(); // implemented by each container type
} else {
data.originSectionId = e.from.__vue__.$attrs.sectionId;
data.originSectionBlockList = e.from.__vue__.$children.map(b => { return b.$attrs.blockId; });
@@ -45,7 +45,7 @@ const containerMixin = {
data.blockId = e.item._underlying_vm_.id;
data.newPos = e.newIndex;
const indexInBlockList = data.targetSectionBlockList.findIndex(b => b === data.blockId);
- data.targetSectionBlockList.splice(data.newPos, 0, data.targetSectionBlockList.splice(indexInBlockList,1));
+ data.targetSectionBlockList.splice(data.newPos, 0, data.targetSectionBlockList.splice(indexInBlockList,1)[0]); // move block id to new position
this.storeInAnotherContainer(data);
}
},