|
|
|
@ -528,20 +528,31 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
axios.post(url,
|
|
|
|
|
{name:value}).then((result)=>{
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
// window.location.reload()
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
//
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
trigger('updateNavSuccess')
|
|
|
|
|
if(positiontype==="files"){
|
|
|
|
|
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
|
|
|
|
|
// this.props.history.push(`/courses/${coursesId}/file/${result.data.category_id}`)
|
|
|
|
|
if(result!=undefined){
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
// window.location.reload()
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
//
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
trigger('updateNavSuccess')
|
|
|
|
|
|
|
|
|
|
if(positiontype==="files"){
|
|
|
|
|
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(positiontype==="boards"){
|
|
|
|
|
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(positiontype==="course_groups"){
|
|
|
|
|
window.location.href=`/courses/${coursesId}/course_groups/${result.data.group_id}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
@ -549,17 +560,19 @@ class Coursesleftnav extends Component{
|
|
|
|
|
saveboardpost=(url,value)=>{
|
|
|
|
|
axios.put(url,
|
|
|
|
|
{name:value}).then((result)=>{
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
// window.location.reload()
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
trigger('updateNavSuccess')
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if(result!=undefined){
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
// window.location.reload()
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
trigger('updateNavSuccess')
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
@ -599,7 +612,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
let newid=this.props.match.params.coursesId;
|
|
|
|
|
let url="/courses/"+newid+"/course_groups.json";
|
|
|
|
|
this.saveNavmodapost(url,NavmodalValue)
|
|
|
|
|
this.saveNavmodapost(url,NavmodalValue,this.state.positiontype,this.props.match.params.coursesId)
|
|
|
|
|
|
|
|
|
|
}else if(Navmodaltypename===3){
|
|
|
|
|
|
|
|
|
@ -620,7 +633,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
let newid=this.props.match.params.coursesId;
|
|
|
|
|
let url = "/courses/"+newid+"/boards.json";
|
|
|
|
|
this.saveNavmodapost(url,NavmodalValue)
|
|
|
|
|
this.saveNavmodapost(url,NavmodalValue,this.state.positiontype,this.props.match.params.coursesId)
|
|
|
|
|
|
|
|
|
|
}else if(Navmodaltypename===7) {
|
|
|
|
|
|
|
|
|
@ -708,13 +721,15 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
droppablepost=(url,list)=>{
|
|
|
|
|
axios.post(url,{position: list}).then((result)=>{
|
|
|
|
|
// this.updasaveNavmoda(result.data.message)
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
//
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
if(result!=undefined){
|
|
|
|
|
// this.updasaveNavmoda(result.data.message)
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
//
|
|
|
|
|
notification.open({
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|