@ -496,6 +496,15 @@ class Coursesleftnav extends Component{
saveNavmoda = ( ) => {
saveNavmoda = ( ) => {
let { Navmodaltypename , setnavid , NavmodalValue } = this . state ;
let { Navmodaltypename , setnavid , NavmodalValue } = this . state ;
let id = setnavid ;
let id = setnavid ;
if ( Navmodaltypename === 5 && NavmodalValue === "未分班" || Navmodaltypename === 2 && NavmodalValue === "未分班" ) {
this . setState ( {
NavmodalValuetype : true ,
NavmodalValues : "名称不能和未分班一样"
} )
return
}
if ( NavmodalValue === "" ) {
if ( NavmodalValue === "" ) {
this . setState ( {
this . setState ( {
NavmodalValuetype : true ,
NavmodalValuetype : true ,
@ -639,6 +648,7 @@ class Coursesleftnav extends Component{
}
}
onDragEnd = ( result ) => {
onDragEnd = ( result ) => {
debugger
// console.log(result)
// console.log(result)
// let {course_modules}=this.props;
// let {course_modules}=this.props;
// let newcourse_modules=course_modules;
// let newcourse_modules=course_modules;
@ -681,10 +691,10 @@ class Coursesleftnav extends Component{
this . droppablepost ( url , result . destination . index + 1 )
this . droppablepost ( url , result . destination . index + 1 )
} else if ( result . source . droppableId === "course_group" ) {
} else if ( result . source . droppableId === "course_group" ) {
if ( result . draggableId != 1 ) {
let url = "/course_groups/" + result . draggableId + "/move_category.json"
let url = "/course_groups/" + result . draggableId + "/move_category.json"
this . droppablepost ( url , result . destination . index + 1 )
this . droppablepost ( url , result . destination . index + 1 )
}
}
}
}
}
@ -820,8 +830,16 @@ class Coursesleftnav extends Component{
onInput = { this . setNavmodalValue }
onInput = { this . setNavmodalValue }
/ >
/ >
< / d i v >
< / d i v >
< style >
{ this . state . NavmodalValuetype === true ? < span className = { "color-red" } >
{
`
. ml70 {
margin - left : 70 px ;
}
`
}
< / s t y l e >
{ this . state . NavmodalValuetype === true ? < span className = { "ml70 color-red" } >
{ this . state . NavmodalValues }
{ this . state . NavmodalValues }
< / s p a n > : " " }
< / s p a n > : " " }
< div className = { this . state . NavmodalValuetype === true ? "clearfix mt20 edu-txt-center" : "clearfix mt50 edu-txt-center" } >
< div className = { this . state . NavmodalValuetype === true ? "clearfix mt20 edu-txt-center" : "clearfix mt50 edu-txt-center" } >
@ -928,9 +946,9 @@ class Coursesleftnav extends Component{
< a className = "fl pl46 pd0 Draggablelichild" >
< 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 } < / s p a n >
< 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 } < / s p a n >
< 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 } < / s p a n >
< 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 } < / s p a n >
{ item . type === twosandiantypes && twosandiantype === index ?
{ item . type === twosandiantypes && twosandiantype === index ?
iem . category _ name=== "未分班" ? "" :
iem . category _ id=== 0 ? "" :
iem . category _type === "graduation_topics" || iem . category _type === "graduation_tasks" ?
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 } < / s p a n >
< span className = { "fr mr20 color999 Draggablelichild font-14" } > { iem . category _count === 0 ? "" : iem . category _count } < / s p a n >
: < Popover placement = "right" content = { this . content ( item , iem , index ) } trigger = "hover" key = { index } >
: < Popover placement = "right" content = { this . content ( item , iem , index ) } trigger = "hover" key = { index } >