|
|
|
@ -358,6 +358,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
navid:undefined,
|
|
|
|
|
sandiantype:undefined,
|
|
|
|
|
twosandiantype:undefined,
|
|
|
|
|
ModalsType:false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let url="/course_modules/"+id+"/hidden_module.json"
|
|
|
|
@ -379,12 +380,25 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
edithidden=(e,id)=>{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
this.setState({
|
|
|
|
|
ModalsType:true,
|
|
|
|
|
Modalstopval:"隐藏后将不再显示此模块,",
|
|
|
|
|
ModalsBottomval:"后续可通过添加模块恢复显示",
|
|
|
|
|
ModalSave:()=>this.edithiddens(id),
|
|
|
|
|
})
|
|
|
|
|
let {course_modules}=this.props;
|
|
|
|
|
|
|
|
|
|
if(course_modules.length>1){
|
|
|
|
|
this.setState({
|
|
|
|
|
ModalsType:true,
|
|
|
|
|
Modalstopval:"隐藏后将不再显示此模块,",
|
|
|
|
|
ModalsBottomval:"后续可通过添加模块恢复显示",
|
|
|
|
|
ModalSave:()=>this.edithiddens(id),
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
ModalsType:true,
|
|
|
|
|
Modalstopval:"您不能隐藏所有课堂模块,请至少保留",
|
|
|
|
|
ModalsBottomval:"其中一个模块。",
|
|
|
|
|
loadtype:true,
|
|
|
|
|
ModalSave:()=>this.cannerNavmoda(),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Navmodalnames=(e,id,type,setnavid,name)=>{
|
|
|
|
|