Skip to content

Commit

Permalink
Fixed issue #13067: question groups reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Dec 21, 2017
1 parent 061112c commit fe8d927
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 22 deletions.
27 changes: 17 additions & 10 deletions assets/packages/adminpanel/build/lsadminpanel.js
Expand Up @@ -37119,11 +37119,14 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
startDraggingGroup($event, questiongroupObject) {
this.draggedQuestionGroup = questiongroupObject;
this.questiongroupDragging = true;
$event.dataTransfer.setData('text/plain', 'node');
},
endDraggingGroup($event, questiongroupObject) {
this.draggedQuestionGroup = null;
this.questiongroupDragging = false;
this.$emit('questiongrouporder');
if (this.draggedQuestionGroup !== null) {
this.draggedQuestionGroup = null;
this.questiongroupDragging = false;
this.$emit('questiongrouporder');
}
},
dragoverQuestiongroup($event, questiongroupObject) {
if (this.questiongroupDragging) {
Expand Down Expand Up @@ -37164,15 +37167,19 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
this.draggedQuestionsGroup = questionGroupObject;
},
endDraggingQuestion($event, question) {
this.questionDragging = false;
this.draggedQuestion = null;
this.draggedQuestionsGroup = null;
this.$emit('questiongrouporder');
if (this.questionDragging) {
this.questionDragging = false;
this.draggedQuestion = null;
this.draggedQuestionsGroup = null;
this.$emit('questiongrouporder');
}
},
dragoverQuestion($event, questionObject, questionGroupObject) {
let orderSwap = questionObject.question_order;
questionObject.question_order = this.draggedQuestion.question_order;
this.draggedQuestion.question_order = orderSwap;
if (this.questionDragging) {
let orderSwap = questionObject.question_order;
questionObject.question_order = this.draggedQuestion.question_order;
this.draggedQuestion.question_order = orderSwap;
}
}
},
mounted() {
Expand Down
2 changes: 1 addition & 1 deletion assets/packages/adminpanel/build/lsadminpanel.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/packages/adminpanel/build/lsadminpanel.min.js

Large diffs are not rendered by default.

Expand Up @@ -96,11 +96,14 @@ export default {
startDraggingGroup($event, questiongroupObject){
this.draggedQuestionGroup = questiongroupObject;
this.questiongroupDragging = true;
$event.dataTransfer.setData('text/plain', 'node');
},
endDraggingGroup($event, questiongroupObject){
this.draggedQuestionGroup = null;
this.questiongroupDragging = false;
this.$emit('questiongrouporder');
if(this.draggedQuestionGroup !== null){
this.draggedQuestionGroup = null;
this.questiongroupDragging = false;
this.$emit('questiongrouporder');
}
},
dragoverQuestiongroup($event, questiongroupObject){
if(this.questiongroupDragging){
Expand Down Expand Up @@ -140,15 +143,19 @@ export default {
this.draggedQuestionsGroup = questionGroupObject;
},
endDraggingQuestion($event, question){
this.questionDragging = false;
this.draggedQuestion = null;
this.draggedQuestionsGroup = null;
this.$emit('questiongrouporder');
if(this.questionDragging){
this.questionDragging = false;
this.draggedQuestion = null;
this.draggedQuestionsGroup = null;
this.$emit('questiongrouporder');
}
},
dragoverQuestion($event, questionObject, questionGroupObject){
let orderSwap = questionObject.question_order;
questionObject.question_order = this.draggedQuestion.question_order;
this.draggedQuestion.question_order = orderSwap;
if(this.questionDragging){
let orderSwap = questionObject.question_order;
questionObject.question_order = this.draggedQuestion.question_order;
this.draggedQuestion.question_order = orderSwap;
}
},
},
mounted(){
Expand Down

0 comments on commit fe8d927

Please sign in to comment.