Fix bug that prevented dropping new courses
This commit is contained in:
parent
315794ec86
commit
d265774546
2
amd/build/studyplan-editor-components.min.js
vendored
2
amd/build/studyplan-editor-components.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1302,6 +1302,13 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
trashbin_accepts(type){
|
||||
if(type.item){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
countLineLayers(line){
|
||||
// For some optimization, we cache the value of this calculation for about a second
|
||||
// Would be a lot nicer if we could use a computed property for this.....
|
||||
|
@ -1509,7 +1516,7 @@ export default {
|
|||
mode='copy'
|
||||
class='t-item-deletebox text-danger border-danger'
|
||||
@drop='deleteStudyItem'
|
||||
:accepts-type="['gradable-item','filter-item']"
|
||||
:accepts-type="trashbin_accepts"
|
||||
><i class='fa fa-trash'></i>
|
||||
</drop>
|
||||
<span class='control deletable'>
|
||||
|
@ -1960,6 +1967,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
onDrop(event) {
|
||||
debug.info(event);
|
||||
this.hover.component = null;
|
||||
this.hover.type = null;
|
||||
|
||||
|
@ -1985,7 +1993,7 @@ export default {
|
|||
}
|
||||
else if(event.type.component){
|
||||
|
||||
if(event.type.type == "course"){
|
||||
if(event.type.type == "gradable"){
|
||||
call([{
|
||||
methodname: 'local_treestudyplan_add_studyitem',
|
||||
args: {
|
||||
|
@ -2325,7 +2333,7 @@ export default {
|
|||
}} <b-form-select
|
||||
class=""
|
||||
size="sm" @change="change_span" v-model="value.span">
|
||||
<b-form-select-option v-for="(n,i) in maxspan" :value='n'
|
||||
<b-form-select-option v-for="(n,i) in maxspan" :value='n' :key='i'
|
||||
>{{ n }}</b-form-select-option>
|
||||
</b-form-select
|
||||
> {{
|
||||
|
|
Loading…
Reference in New Issue
Block a user