|
|
|
@ -496,6 +496,15 @@ class Coursesleftnav extends Component{
|
|
|
|
|
saveNavmoda=()=>{
|
|
|
|
|
let {Navmodaltypename,setnavid,NavmodalValue}=this.state;
|
|
|
|
|
let id =setnavid;
|
|
|
|
|
|
|
|
|
|
if(Navmodaltypename===5&&NavmodalValue==="未分班"){
|
|
|
|
|
this.setState({
|
|
|
|
|
NavmodalValuetype:true,
|
|
|
|
|
NavmodalValues:"名称不能和未分班一样"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(NavmodalValue===""){
|
|
|
|
|
this.setState({
|
|
|
|
|
NavmodalValuetype:true,
|
|
|
|
@ -639,6 +648,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onDragEnd=(result)=>{
|
|
|
|
|
debugger
|
|
|
|
|
// console.log(result)
|
|
|
|
|
// let {course_modules}=this.props;
|
|
|
|
|
// let newcourse_modules=course_modules;
|
|
|
|
@ -681,10 +691,10 @@ class Coursesleftnav extends Component{
|
|
|
|
|
this.droppablepost(url,result.destination.index+1)
|
|
|
|
|
|
|
|
|
|
}else if(result.source.droppableId==="course_group"){
|
|
|
|
|
|
|
|
|
|
let url ="/course_groups/"+result.draggableId+"/move_category.json"
|
|
|
|
|
this.droppablepost(url,result.destination.index+1)
|
|
|
|
|
|
|
|
|
|
if(result.draggableId!=1){
|
|
|
|
|
let url ="/course_groups/"+result.draggableId+"/move_category.json"
|
|
|
|
|
this.droppablepost(url,result.destination.index+1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -928,9 +938,9 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
<a className="fl pl46 pd0 Draggablelichild">
|
|
|
|
|
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"}>{iem.category_name}</span>
|
|
|
|
|
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&twosandiantype===index&&iem.category_name!="未分班"?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
|
|
|
|
|
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&twosandiantype===index&&iem.category_id===0?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
|
|
|
|
|
{item.type===twosandiantypes&&twosandiantype===index?
|
|
|
|
|
iem.category_name==="未分班"?"":
|
|
|
|
|
iem.category_id===0?"":
|
|
|
|
|
iem.category_type==="graduation_topics"||iem.category_type==="graduation_tasks"?
|
|
|
|
|
<span className={"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
|
|
|
|
|
:<Popover placement="right" content={this.content(item,iem,index)} trigger="hover" key={index}>
|
|
|
|
|