|
|
|
@ -565,7 +565,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updatadeleteSecondary=(url)=>{
|
|
|
|
|
this.props.updataleftNavfun();
|
|
|
|
|
// this.setState({
|
|
|
|
@ -648,7 +648,6 @@ class Coursesleftnav extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onDragEnd=(result)=>{
|
|
|
|
|
debugger
|
|
|
|
|
// console.log(result)
|
|
|
|
|
// let {course_modules}=this.props;
|
|
|
|
|
// let newcourse_modules=course_modules;
|
|
|
|
@ -683,21 +682,14 @@ class Coursesleftnav extends Component{
|
|
|
|
|
if(result.source.droppableId==="shixun_homework"||result.source.droppableId==="graduation"||result.source.droppableId==="attachment"){
|
|
|
|
|
|
|
|
|
|
let url ="/course_second_categories/"+result.draggableId+"/move_category.json";
|
|
|
|
|
if(result.destination.index!=null){
|
|
|
|
|
this.droppablepost(url,result.destination.index+1)
|
|
|
|
|
}
|
|
|
|
|
this.droppablepost(url,result.destination.index+1)
|
|
|
|
|
}else if(result.source.droppableId==="board"){
|
|
|
|
|
|
|
|
|
|
let url ="/boards/"+result.draggableId+"/move_category.json";
|
|
|
|
|
if(result.destination.index!=null) {
|
|
|
|
|
this.droppablepost(url, result.destination.index + 1)
|
|
|
|
|
}
|
|
|
|
|
this.droppablepost(url, result.destination.index + 1)
|
|
|
|
|
}else if(result.source.droppableId==="course_group"){
|
|
|
|
|
if(result.draggableId!=1){
|
|
|
|
|
let url ="/course_groups/"+result.draggableId+"/move_category.json";
|
|
|
|
|
if(result.destination.index!=null) {
|
|
|
|
|
this.droppablepost(url, result.destination.index + 1)
|
|
|
|
|
}
|
|
|
|
|
this.droppablepost(url, result.destination.index + 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|