|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import { Link } from "react-router-dom";
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import {Checkbox,Modal,Input,Tooltip,notification,Popover} from 'antd';
|
|
|
|
|
import {Checkbox,Modal,Input,Tooltip,notification,Popover,Dropdown,Menu,TreeSelect} from 'antd';
|
|
|
|
|
import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import { on, off, trigger } from 'educoder';
|
|
|
|
@ -11,7 +11,8 @@ const CheckboxGroup = Checkbox.Group;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let navidtype=true;
|
|
|
|
|
|
|
|
|
|
const { SubMenu } = Menu;
|
|
|
|
|
const { TreeNode } = TreeSelect;
|
|
|
|
|
|
|
|
|
|
//a little function to help us with reordering the result
|
|
|
|
|
const reorder = (list, startIndex, endIndex) => {
|
|
|
|
@ -62,9 +63,26 @@ class Coursesleftnav extends Component{
|
|
|
|
|
antIcon:false,
|
|
|
|
|
chapterupdate:false,
|
|
|
|
|
|
|
|
|
|
successFunc:undefined
|
|
|
|
|
successFunc:undefined,
|
|
|
|
|
|
|
|
|
|
//用来判断 是不是资源点击进入的
|
|
|
|
|
Navmodalziyname:'',
|
|
|
|
|
treeData:undefined,
|
|
|
|
|
//默认为0主目录
|
|
|
|
|
parentid:0,
|
|
|
|
|
//判断3级目录是否显示三个点
|
|
|
|
|
sanshow:'',
|
|
|
|
|
sansandiantype:undefined,
|
|
|
|
|
//新增参数判断打开关闭 默认关闭
|
|
|
|
|
showPreson:false,
|
|
|
|
|
//获取资源id 判断是否选中的事资源来判控
|
|
|
|
|
treeDataid:'',
|
|
|
|
|
//默认值
|
|
|
|
|
treedefaultValue:'',
|
|
|
|
|
dropdownStyleshow:''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// updataleftNav=()=>{
|
|
|
|
|
//
|
|
|
|
@ -182,7 +200,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
this.Navmodalnames(e,5,"editSecondname", data.id, data.name);
|
|
|
|
|
}
|
|
|
|
|
attachmentAddlog=(e,data)=>{
|
|
|
|
|
this.Navmodalnames(e,1,"attachment",data);
|
|
|
|
|
this.Navmodalnames(e,1,"attachment",data.id,data.name,data.coursesecondcategoryid,data.coursesecondcategoryid===undefined?false:true);
|
|
|
|
|
}
|
|
|
|
|
flieseditDir=(e, data)=>{
|
|
|
|
|
this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
|
|
|
|
@ -208,7 +226,6 @@ class Coursesleftnav extends Component{
|
|
|
|
|
on('editcommon_homeworks',this.editcommon_homeworks)
|
|
|
|
|
|
|
|
|
|
let courstype=this.props.match.url;
|
|
|
|
|
|
|
|
|
|
courstype = courstype.split('/');
|
|
|
|
|
|
|
|
|
|
courstype=courstype[3];
|
|
|
|
@ -234,7 +251,6 @@ class Coursesleftnav extends Component{
|
|
|
|
|
newselectnavid:parseInt(category_id),
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
if(isNaN(category_id)){
|
|
|
|
|
this.setState({
|
|
|
|
|
positiontype:courstype,
|
|
|
|
@ -286,7 +302,36 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//请求接口获取资源列表数据
|
|
|
|
|
getatahcment(){
|
|
|
|
|
let coursesId=this.props.match.params.coursesId;
|
|
|
|
|
let url="/courses/"+coursesId+"/attahcment_category_list.json";
|
|
|
|
|
axios.get(url, {params:{
|
|
|
|
|
no_child: true,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if(response!=undefined){
|
|
|
|
|
if(response.data&&response.data) {
|
|
|
|
|
if (response.data.status != 401) {
|
|
|
|
|
|
|
|
|
|
let tr=response.data.course_modules;
|
|
|
|
|
this.setState({
|
|
|
|
|
treeData:tr
|
|
|
|
|
})
|
|
|
|
|
tr.map((iem,index)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
treeDataid:iem.value
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setnavid=(e,key,id,type,url)=>{
|
|
|
|
|
// this.props.getleftNavid && this.props.getleftNavid(key,type);
|
|
|
|
@ -359,7 +404,8 @@ class Coursesleftnav extends Component{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
selectnavids=(e,key,id,type,urls,index)=>{
|
|
|
|
|
selectnavids=(e,key,id,type,urls,index,santype)=>{
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
selectnavid:true,
|
|
|
|
|
newselectnavid:id,
|
|
|
|
@ -384,7 +430,6 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
// console.log("twosandianshow");
|
|
|
|
|
// console.log(key);
|
|
|
|
|
// console.log(type);
|
|
|
|
|
this.setState({
|
|
|
|
|
toopvisibleindexs:key,
|
|
|
|
|
twosandiantype:key,
|
|
|
|
@ -394,6 +439,23 @@ class Coursesleftnav extends Component{
|
|
|
|
|
})
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sansandianshow=(e,key,type,name)=>{
|
|
|
|
|
|
|
|
|
|
// console.log("twosandianshow");
|
|
|
|
|
// console.log(key);
|
|
|
|
|
this.setState({
|
|
|
|
|
toopvisibleindexs:key,
|
|
|
|
|
sansandiantype:key,
|
|
|
|
|
toopvisible:false,
|
|
|
|
|
sanshow:name,
|
|
|
|
|
toopvisibleindex:undefined,
|
|
|
|
|
twosandiantypes:type
|
|
|
|
|
})
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
twosandianshowys=(e,key,type)=>{
|
|
|
|
|
// console.log("twosandianshow");
|
|
|
|
|
// console.log(key);
|
|
|
|
@ -403,6 +465,17 @@ class Coursesleftnav extends Component{
|
|
|
|
|
})
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sansandianshowys=(e,key,type)=>{
|
|
|
|
|
// console.log("twosandianshow");
|
|
|
|
|
// console.log(key);
|
|
|
|
|
// console.log(type);
|
|
|
|
|
this.setState({
|
|
|
|
|
toopvisibleindexs:key,
|
|
|
|
|
})
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
twosandianshowyss=(e,key,type)=>{
|
|
|
|
|
// console.log("twosandianshow");
|
|
|
|
|
// console.log(key);
|
|
|
|
@ -413,6 +486,16 @@ class Coursesleftnav extends Component{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sansandianshowyss=(e,key,type)=>{
|
|
|
|
|
// console.log("twosandianshow");
|
|
|
|
|
// console.log(key);
|
|
|
|
|
// console.log(type);
|
|
|
|
|
this.setState({
|
|
|
|
|
toopvisibleindexs:undefined,
|
|
|
|
|
})
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
twosandianhide=(e,index,type)=>{
|
|
|
|
|
// console.log(index)
|
|
|
|
|
this.setState({
|
|
|
|
@ -426,6 +509,20 @@ class Coursesleftnav extends Component{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sansandianhide=(e,index,type)=>{
|
|
|
|
|
// console.log(index)
|
|
|
|
|
this.setState({
|
|
|
|
|
toopvisibleindexs:undefined,
|
|
|
|
|
sansandiantype:undefined,
|
|
|
|
|
twosandiantypenum:undefined,
|
|
|
|
|
toopvisible:true,
|
|
|
|
|
sanshow:'',
|
|
|
|
|
toopvisibleindex:index,
|
|
|
|
|
twosandiantypes:type
|
|
|
|
|
})
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
twosandianhideys=(e,index,type)=>{
|
|
|
|
|
// console.log(index)
|
|
|
|
|
this.setState({
|
|
|
|
@ -442,6 +539,9 @@ class Coursesleftnav extends Component{
|
|
|
|
|
navid:undefined,
|
|
|
|
|
sandiantype:undefined,
|
|
|
|
|
twosandiantype:undefined,
|
|
|
|
|
sansandiantype:undefined,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let url="/course_modules/"+id+"/sticky_module.json"
|
|
|
|
@ -461,6 +561,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
navid:undefined,
|
|
|
|
|
sandiantype:undefined,
|
|
|
|
|
twosandiantype:undefined,
|
|
|
|
|
sansandiantype:undefined,
|
|
|
|
|
ModalsType:false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -481,6 +582,8 @@ class Coursesleftnav extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
edithidden=(e,id)=>{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
let {course_modules}=this.props;
|
|
|
|
@ -505,8 +608,9 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Navmodalnames=(e,id,type,setnavid,name)=>{
|
|
|
|
|
Navmodalnames=(e,id,type,setnavid,name,towid,showPreson)=>{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
this.getatahcment()
|
|
|
|
|
navidtype=false
|
|
|
|
|
if(id===1||id===2||id===6){
|
|
|
|
|
this.setState({
|
|
|
|
@ -515,7 +619,11 @@ class Coursesleftnav extends Component{
|
|
|
|
|
Navplaceholder:"请输入名称,最大限制60个字符",
|
|
|
|
|
Navmodalnametype:true,
|
|
|
|
|
Navmodaltypename:id,
|
|
|
|
|
Navmodalziyname:name,
|
|
|
|
|
treedefaultValue:towid,
|
|
|
|
|
showPreson:showPreson,
|
|
|
|
|
setnavid:setnavid,
|
|
|
|
|
parentid:towid,
|
|
|
|
|
NavmodalValue:""
|
|
|
|
|
})
|
|
|
|
|
}else if(id===3||id===4||id===5||id===7){
|
|
|
|
@ -527,6 +635,10 @@ class Coursesleftnav extends Component{
|
|
|
|
|
Navmodalnametype:true,
|
|
|
|
|
Navmodaltypename:id,
|
|
|
|
|
setnavid:setnavid,
|
|
|
|
|
treedefaultValue:towid,
|
|
|
|
|
showPreson:showPreson,
|
|
|
|
|
Navmodalziyname:'',
|
|
|
|
|
parentid:towid,
|
|
|
|
|
NavmodalValue:name
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -565,7 +677,9 @@ class Coursesleftnav extends Component{
|
|
|
|
|
saveNavmodapost=(url,value,positiontype,coursesId,type)=>{
|
|
|
|
|
console.log(positiontype)
|
|
|
|
|
axios.post(url,
|
|
|
|
|
{name:value}).then((result)=>{
|
|
|
|
|
{name:value,
|
|
|
|
|
parent_id:this.state.parentid
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result!=undefined){
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
|
|
|
|
@ -604,11 +718,9 @@ class Coursesleftnav extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(positiontype==="files"||positiontype==="file"){
|
|
|
|
|
|
|
|
|
|
if(type===true){
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
trigger('files')
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.updasaveNavmoda()
|
|
|
|
|
this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
|
|
|
|
@ -798,7 +910,23 @@ class Coursesleftnav extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
tronChange=(value)=>{
|
|
|
|
|
|
|
|
|
|
console.log(this.state.dropdownStyleshow)
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
parentid:this.state.treeDataid===value?0:value,
|
|
|
|
|
dropdownStyleshow:'none'
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
tronclick=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
dropdownStyleshow:'inline-block'
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
droppablepost=(url,list)=>{
|
|
|
|
|
axios.post(url,{position: list}).then((result)=>{
|
|
|
|
@ -871,6 +999,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hidesandian=(e,key)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
sandiantypes:undefined
|
|
|
|
@ -885,9 +1014,11 @@ class Coursesleftnav extends Component{
|
|
|
|
|
e.stopPropagation();//阻止冒泡
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showsandians=(e,key,urls,num,id,type,index)=> {
|
|
|
|
|
let {url}=this.state;
|
|
|
|
|
if (key === this.props.indexs) {
|
|
|
|
|
|
|
|
|
|
this.props.unlocationNavfun(undefined)
|
|
|
|
|
} else {
|
|
|
|
|
this.props.updataleftNavfun();
|
|
|
|
@ -923,7 +1054,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
{/*/!* 分组作业 *!/*/}
|
|
|
|
|
{item.type==="group_homework"?<div onClick={e=>this.Navmodalnames(e,1,"group_homeworks",item.id)}>新建目录</div>:""}
|
|
|
|
|
{/*资源*/}
|
|
|
|
|
{item.type==="attachment"?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id)}>新建目录</div>:""}
|
|
|
|
|
{item.type==="attachment"?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源")}>新建目录</div>:""}
|
|
|
|
|
{/* 视频 */}
|
|
|
|
|
{item.type==="video"?<div onClick={e=>this.Navmodalnames(e,1,"video",item.id)}>新建目录</div>:""}
|
|
|
|
|
{/*毕业设计*/}
|
|
|
|
@ -948,10 +1079,11 @@ class Coursesleftnav extends Component{
|
|
|
|
|
<div onClick={e=>this.editSetup(e,item.id)}>置顶</div>
|
|
|
|
|
</div>)
|
|
|
|
|
}
|
|
|
|
|
content=(item,iem,index)=>{
|
|
|
|
|
content=(item,iem,index,san)=>{
|
|
|
|
|
let {twosandiantypes,twosandiantypenum}=this.state;
|
|
|
|
|
return (item.type==="graduation"?"": <div className={item.type===twosandiantypes&&twosandiantypenum===index?"sandianboxs":"sandianboxs"} >
|
|
|
|
|
{/*作业/资源*/}
|
|
|
|
|
{item.type==="attachment"&&san!=='san'?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源",iem.category_id,true)}>新建目录</div>:""}
|
|
|
|
|
{item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"||item.type==="common_homework"||item.type==="group_homework"?<div onClick={e=>this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名</div>:""}
|
|
|
|
|
{item.type==="shixun_homework"||item.type==="attachment"||item.type==="common_homework"||item.type==="group_homework"?<div onClick={e=>this.deleteSecondary(e,1,iem.category_id)}>删除</div>:""}
|
|
|
|
|
{/*分班*/}
|
|
|
|
@ -980,6 +1112,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
|
|
|
|
|
let {
|
|
|
|
|
twosandiantype,
|
|
|
|
|
Navmodalname,
|
|
|
|
@ -991,7 +1124,8 @@ class Coursesleftnav extends Component{
|
|
|
|
|
ModalSave,
|
|
|
|
|
loadtype,
|
|
|
|
|
twosandiantypes,
|
|
|
|
|
toopvisibleindexs
|
|
|
|
|
toopvisibleindexs,
|
|
|
|
|
sansandiantype
|
|
|
|
|
}=this.state;
|
|
|
|
|
|
|
|
|
|
let {course_modules,hidden_modules,is_teacher} =this.props;
|
|
|
|
@ -1003,6 +1137,9 @@ class Coursesleftnav extends Component{
|
|
|
|
|
// console.log("CoursesLeftNav");
|
|
|
|
|
// console.log(course_modules);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
|
|
|
|
|
<ul className="mb10 newedu-class-leftnav">
|
|
|
|
@ -1059,14 +1196,35 @@ class Coursesleftnav extends Component{
|
|
|
|
|
destroyOnClose={true}
|
|
|
|
|
centered={true}
|
|
|
|
|
>
|
|
|
|
|
<div className="df">
|
|
|
|
|
<div className={"fl mt5"}>{this.state.Navtitles}:</div>
|
|
|
|
|
<div>
|
|
|
|
|
{this.state.Navmodalziyname==="资源"?<div className="df" style={{marginBottom:50}}>
|
|
|
|
|
<div className={"fl mt5"} >上级目录:</div>
|
|
|
|
|
|
|
|
|
|
<TreeSelect
|
|
|
|
|
className={"input-flex-35 greyInput fl"}
|
|
|
|
|
style={{width:300,color:'#000000'}}
|
|
|
|
|
|
|
|
|
|
dropdownClassName={{display:this.state.dropdownStyleshow}}
|
|
|
|
|
// dropdownMenuStyle={{display:this.state.dropdownStyleshow}}
|
|
|
|
|
treeData={this.state.treeData}
|
|
|
|
|
placeholder="资源(根目录)"
|
|
|
|
|
disabled={this.state.showPreson}
|
|
|
|
|
defaultValue={this.state.treedefaultValue}
|
|
|
|
|
treeDefaultExpandAll
|
|
|
|
|
onChange={this.tronChange}
|
|
|
|
|
onClick={this.tronclick}
|
|
|
|
|
/>
|
|
|
|
|
</div>:''}
|
|
|
|
|
|
|
|
|
|
<div className="df" >
|
|
|
|
|
<div className={"fl mt5"} >{this.state.Navtitles}:</div>
|
|
|
|
|
<Input placeholder={this.state.Navplaceholder}
|
|
|
|
|
className={"input-flex-35 greyInput fl"}
|
|
|
|
|
maxLength="60"
|
|
|
|
|
value={NavmodalValue}
|
|
|
|
|
onInput={this.setNavmodalValue}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
@ -1077,6 +1235,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
{this.state.NavmodalValuetype===true?<span className={"ml70 color-red"}>
|
|
|
|
|
{this.state.NavmodalValues}
|
|
|
|
|
</span>:""}
|
|
|
|
@ -1182,7 +1341,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
>
|
|
|
|
|
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
|
|
|
|
|
<a className={"Draggablelichild"} key={index}>
|
|
|
|
|
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
|
|
|
|
|
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key,'san')} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
|
|
|
|
|
key={index}
|
|
|
|
|
ref={provided.innerRef}
|
|
|
|
|
{...provided.draggableProps}
|
|
|
|
@ -1193,6 +1352,7 @@ class Coursesleftnav extends Component{
|
|
|
|
|
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"} onMouseEnter={(e)=>this.twosandianshowys(e,index,item.type)}>{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_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_id===0?"":
|
|
|
|
|
iem.category_type==="graduation_topics"||iem.category_type==="graduation_tasks"?
|
|
|
|
@ -1222,8 +1382,55 @@ class Coursesleftnav extends Component{
|
|
|
|
|
{provided.placeholder}
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
{
|
|
|
|
|
iem.third_category===undefined?"":iem.third_category.map((itt,index)=>{
|
|
|
|
|
if(itt.category_type!=="attachment"){
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return(
|
|
|
|
|
<div onClick={this.getatahcment} style={{display:this.state.newselectnavid===undefined?'none':itt.parent_id===this.state.newselectnavid?'block':'none'}}>
|
|
|
|
|
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
|
|
|
|
|
<a className={"Draggablelichild"} key={index}>
|
|
|
|
|
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,itt.parent_id,item.type+"child",itt.second_category_url,key)} onMouseLeave={(e)=>this.sansandianhide(e,index,item.type)} onMouseEnter={(e)=>this.sansandianshow(e,index,item.type,itt.category_name)}
|
|
|
|
|
key={index}
|
|
|
|
|
ref={provided.innerRef}
|
|
|
|
|
{...provided.draggableProps}
|
|
|
|
|
{...provided.dragHandleProps}
|
|
|
|
|
// title={iem.category_name.length<10?"":iem.category_name}
|
|
|
|
|
>
|
|
|
|
|
<a className="fl pl46 pd0 Draggablelichild">
|
|
|
|
|
<span style={{marginLeft:15}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"} onMouseEnter={(e)=>this.sansandianshowys(e,index,item.type)}>{itt.category_name}</span>
|
|
|
|
|
|
|
|
|
|
<span className={sansandiantype===undefined?this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&sansandiantype===index&&itt.category_id!=0?"none":this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{itt.category_count===0?"":itt.category_count}</span>
|
|
|
|
|
|
|
|
|
|
{iem.category_type===twosandiantypes&&sansandiantype===index?
|
|
|
|
|
itt.category_name!==this.state.sanshow?"":
|
|
|
|
|
(
|
|
|
|
|
itt.category_name&&itt.category_name.length<13?
|
|
|
|
|
<Popover placement="right" content={this.content(item,itt,index,'san')} trigger="hover" key={index} onMouseEnter={(e)=>this.sansandianshowyss(e)}>
|
|
|
|
|
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
|
|
|
|
|
</Popover>
|
|
|
|
|
:
|
|
|
|
|
<Tooltip placement="right" key={index} title={itt.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
|
|
|
|
|
<Popover placement="right" content={this.content(item,itt,index,'san')} trigger="hover" key={index} onMouseEnter={(e)=>this.sansandianshowyss(e)}>
|
|
|
|
|
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
|
|
|
|
|
</Popover>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
)
|
|
|
|
|
:""}
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</Tooltip>
|
|
|
|
|
)}
|
|
|
|
|
</Draggable>
|
|
|
|
@ -1312,10 +1519,53 @@ class Coursesleftnav extends Component{
|
|
|
|
|
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14":twosandiantype===index&&item.type!="graduation"?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14"}>{iem.category_count===0?"":iem.category_count}</span>
|
|
|
|
|
</a>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
iem.third_category===undefined?"":iem.third_category.map((itt,index)=>{
|
|
|
|
|
if(itt.category_type!=="attachment"){
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return(
|
|
|
|
|
<div onClick={this.getatahcment} style={{display:this.state.newselectnavid===undefined?'none':itt.parent_id===this.state.newselectnavid?'block':'none'}}>
|
|
|
|
|
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
|
|
|
|
|
<a className={"Draggablelichild"} key={index}>
|
|
|
|
|
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,itt.parent_id,item.type+"child",itt.second_category_url,key)} onMouseLeave={(e)=>this.sansandianhide(e,index,item.type)} onMouseEnter={(e)=>this.sansandianshow(e,index,item.type,itt.category_name)}
|
|
|
|
|
key={index}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// title={iem.category_name.length<10?"":iem.category_name}
|
|
|
|
|
>
|
|
|
|
|
<a className="fl pl46 pd0 Draggablelichild">
|
|
|
|
|
<span style={{marginLeft:15}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"} onMouseEnter={(e)=>this.sansandianshowys(e,index,item.type)}>{itt.category_name}</span>
|
|
|
|
|
|
|
|
|
|
<span className={sansandiantype===undefined?this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&sansandiantype===index&&itt.category_id!=0?"none":this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{itt.category_count===0?"":itt.category_count}</span>
|
|
|
|
|
|
|
|
|
|
{iem.category_type===twosandiantypes&&sansandiantype===index?
|
|
|
|
|
itt.category_name!==this.state.sanshow?"":
|
|
|
|
|
(
|
|
|
|
|
itt.category_name&&itt.category_name.length<13?
|
|
|
|
|
''
|
|
|
|
|
:
|
|
|
|
|
<Tooltip placement="right" key={index} title={itt.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
|
|
|
|
|
|
|
|
|
|
</Tooltip>
|
|
|
|
|
)
|
|
|
|
|
:""}
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|