杨树林 5 years ago
commit 8e28985a4b

@ -88,6 +88,7 @@
"webpack": "3.8.1", "webpack": "3.8.1",
"webpack-dev-server": "2.9.4", "webpack-dev-server": "2.9.4",
"webpack-manifest-plugin": "1.3.2", "webpack-manifest-plugin": "1.3.2",
"webpack-parallel-uglify-plugin": "^1.1.0",
"whatwg-fetch": "2.0.3", "whatwg-fetch": "2.0.3",
"wrap-md-editor": "^0.2.20" "wrap-md-editor": "^0.2.20"
}, },
@ -164,6 +165,7 @@
"concat": "^1.0.3", "concat": "^1.0.3",
"happypack": "^5.0.1", "happypack": "^5.0.1",
"videojs-for-react": "^0.0.3", "videojs-for-react": "^0.0.3",
"webpack-bundle-analyzer": "^3.0.3" "webpack-bundle-analyzer": "^3.0.3",
"webpack-parallel-uglify-plugin": "^1.1.0"
} }
} }

@ -75,13 +75,13 @@ class PathModal extends Component{
if(patheditarry===undefined){ if(patheditarry===undefined){
this.setState({ this.setState({
patheditarrytype:true, patheditarrytype:true,
patheditarryvalue:"请先选择实课程" patheditarryvalue:"请先选择实课程"
}) })
return return
}else if(patheditarry.length===0){ }else if(patheditarry.length===0){
this.setState({ this.setState({
patheditarrytype:true, patheditarrytype:true,
patheditarryvalue:"请先选择实课程" patheditarryvalue:"请先选择实课程"
}) })
return return
} }
@ -137,7 +137,7 @@ class PathModal extends Component{
/>:""} />:""}
<Modal <Modal
keyboard={false} keyboard={false}
title="选择实课程" title="选择实课程"
visible={visible} visible={visible}
closable={false} closable={false}
footer={null} footer={null}

@ -572,10 +572,10 @@ class ShixunStudentWork extends Component {
</div> </div>
<div className="educontent mb30"> <div className="educontent mb30">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}> <p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{data&&data.homework_name} {jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p> </p>
<CoursesListType <CoursesListType
typelist={data&&data.homework_status} typelist={jobsettingsdata === undefined ? [] : jobsettingsdata.data.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" <a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a> href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>

@ -1074,7 +1074,7 @@ class ShixunHomework extends Component{
{/*<WordsBtn style="blue" onClick={()=>this.editname(datas&&datas.main_category_name)} className={"mr30"}>目录重命名</WordsBtn>*/} {/*<WordsBtn style="blue" onClick={()=>this.editname(datas&&datas.main_category_name)} className={"mr30"}>目录重命名</WordsBtn>*/}
</span>: </span>:
<WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""} <WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""}
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实课程</WordsBtn>:"":""} {this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实课程</WordsBtn>:"":""}
{this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.createCommonWork()}>选用实训</a>:""} {this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.createCommonWork()}>选用实训</a>:""}
</li> </li>
</p> </p>

@ -189,7 +189,7 @@ class ShixunsHome extends Component {
{/*实训路径*/} {/*实训路径*/}
<div className="clearfix pt20 educontent pr pb20"> <div className="clearfix pt20 educontent pr pb20">
<div className="edu-txt-center"> <div className="edu-txt-center">
<p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>课程</p> <p className="color-dark edu-txt-center font-24" style={{lineHeight: '30px'}}>课程</p>
<p className="color-grey-cd font-12">TRAINING COURSE</p> <p className="color-grey-cd font-12">TRAINING COURSE</p>
</div> </div>
<Link to={"/paths"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link> <Link to={"/paths"} className="moreitem">更多<i className="fa fa-angle-right ml5"></i></Link>

@ -94,7 +94,7 @@ class PathNew extends Component{
submitNewPath=()=>{ submitNewPath=()=>{
let {pathName} = this.state; let {pathName} = this.state;
if(pathName===""){ if(pathName===""){
this.props.showSnackbar("请输入实课程名称"); this.props.showSnackbar("请输入实课程名称");
window.location.href="#part_Name"; window.location.href="#part_Name";
this.setState({ this.setState({
flag_name:false flag_name:false
@ -103,23 +103,23 @@ class PathNew extends Component{
} }
let des=this.Des_editMD.getValue(); let des=this.Des_editMD.getValue();
if(des===""){ if(des===""){
this.props.showSnackbar("请输入实课程的简介"); this.props.showSnackbar("请输入实课程的简介");
window.location.href="#part_Des"; window.location.href="#part_Des";
return; return;
} }
if (des.length > 5000) { if (des.length > 5000) {
this.props.showSnackbar("实课程的简介最大限制5000个字符"); this.props.showSnackbar("实课程的简介最大限制5000个字符");
window.location.href="#part_Des"; window.location.href="#part_Des";
return; return;
} }
let point = this.Point_editMD.getValue(); let point = this.Point_editMD.getValue();
if(point===""){ if(point===""){
this.props.showSnackbar("请输入实课程的学习须知"); this.props.showSnackbar("请输入实课程的学习须知");
window.location.href="#part_point"; window.location.href="#part_point";
return; return;
} }
if(point.length > 500){ if(point.length > 500){
this.props.showSnackbar("实课程的学习须知最大限制500个字符"); this.props.showSnackbar("实课程的学习须知最大限制500个字符");
window.location.href="#part_point"; window.location.href="#part_point";
return; return;
} }
@ -177,10 +177,10 @@ class PathNew extends Component{
}) })
const Des_editMD = create_editorMD("shixun_introduction","100%","490px" const Des_editMD = create_editorMD("shixun_introduction","100%","490px"
,"请在此输入实课程的简介最大限制5000个字符","/api/attachments.json", response.data.description,""); ,"请在此输入实课程的简介最大限制5000个字符","/api/attachments.json", response.data.description,"");
this.Des_editMD=Des_editMD; this.Des_editMD=Des_editMD;
const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px" const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px"
,"请在此输入实课程的学习须知最大限制500个字符","/api/attachments.json",response.data.learning_notes,""); ,"请在此输入实课程的学习须知最大限制500个字符","/api/attachments.json",response.data.learning_notes,"");
this.Point_editMD=Point_editMD; this.Point_editMD=Point_editMD;
} }
}).catch((error)=>{ }).catch((error)=>{
@ -189,9 +189,9 @@ class PathNew extends Component{
} else { } else {
this.isEditPage = false this.isEditPage = false
const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实课程的简介最大限制5000个字符","/api/attachments.json","",""); const Des_editMD = create_editorMD("shixun_introduction","100%","490px","请在此输入实课程的简介最大限制5000个字符","/api/attachments.json","","");
this.Des_editMD=Des_editMD; this.Des_editMD=Des_editMD;
const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实课程的学习须知最大限制500个字符","/api/attachments.json","",""); const Point_editMD = create_editorMD("shixun_propaedeutics","100%","260px","请在此输入实课程的学习须知最大限制500个字符","/api/attachments.json","","");
this.Point_editMD=Point_editMD; this.Point_editMD=Point_editMD;
} }
@ -210,9 +210,9 @@ class PathNew extends Component{
<div className="newMain clearfix"> <div className="newMain clearfix">
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<div className="mb10 edu-back-white"> <div className="mb10 edu-back-white">
<p className="padding20 bor-bottom-greyE font-18 color-grey-3">创建实课程</p> <p className="padding20 bor-bottom-greyE font-18 color-grey-3">创建实课程</p>
<div className="padding30-20" id="part_Name"> <div className="padding30-20" id="part_Name">
<p className="color-grey-6 font-16 mb15">课程名称</p> <p className="color-grey-6 font-16 mb15">课程名称</p>
<div className="df"> <div className="df">
<span className="mr30 color-orange pt10">*</span> <span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20"> <div className="flex1 mr20">
@ -233,7 +233,7 @@ class PathNew extends Component{
<span className="mr30 color-orange pt10">*</span> <span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20"> <div className="flex1 mr20">
<div id="shixun_introduction" className="new_li editormd editormd-vertical"> <div id="shixun_introduction" className="new_li editormd editormd-vertical">
<textarea className="input-100-45" name="description" placeholder="请在此输入实课程的简介" value={description}></textarea> <textarea className="input-100-45" name="description" placeholder="请在此输入实课程的简介" value={description}></textarea>
</div> </div>
<p id="e_tip_shixun_introduction" className="edu-txt-right color-grey-cd font-12"></p> <p id="e_tip_shixun_introduction" className="edu-txt-right color-grey-cd font-12"></p>
<p id="e_tips_shixun_introduction" className="edu-txt-right color-grey-cd font-12"></p> <p id="e_tips_shixun_introduction" className="edu-txt-right color-grey-cd font-12"></p>
@ -247,7 +247,7 @@ class PathNew extends Component{
<span className="mr30 color-orange pt10">*</span> <span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20"> <div className="flex1 mr20">
<div id="shixun_propaedeutics" className="new_li editormd editormd-vertical"> <div id="shixun_propaedeutics" className="new_li editormd editormd-vertical">
<textarea name="learning_notes" placeholder="请在此输入实课程的学习须知" value={point}></textarea> <textarea name="learning_notes" placeholder="请在此输入实课程的学习须知" value={point}></textarea>
</div> </div>
<p id="e_tip_shixun_propaedeutics" className="edu-txt-right color-grey-cd font-12"></p> <p id="e_tip_shixun_propaedeutics" className="edu-txt-right color-grey-cd font-12"></p>
<p id="e_tips_shixun_propaedeutics" className="edu-txt-right color-grey-cd font-12"></p> <p id="e_tips_shixun_propaedeutics" className="edu-txt-right color-grey-cd font-12"></p>

@ -751,7 +751,7 @@ submittojoinclass=(value)=>{
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>我的课堂</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/courses`}>我的课堂</Link></li>
{/* p 老师 l 学生 */} {/* p 老师 l 学生 */}
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实课程</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li> <li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/} {/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
@ -788,7 +788,7 @@ submittojoinclass=(value)=>{
<ul className="fl with50 edu-txt-center pr ul-leftline"> <ul className="fl with50 edu-txt-center pr ul-leftline">
<li><Link to={"/courses/new"}>新建课堂</Link></li> <li><Link to={"/courses/new"}>新建课堂</Link></li>
<li><a href="/shixuns/new">新建实训</a></li> <li><a href="/shixuns/new">新建实训</a></li>
<li><a href={this.props.Headertop===undefined?"":"/paths/new"}>新建实课程</a></li> <li><a href={this.props.Headertop===undefined?"":"/paths/new"}>新建实课程</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li> <li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li>
</ul> </ul>
<ul className="fl with50 edu-txt-center"> <ul className="fl with50 edu-txt-center">

@ -60,7 +60,7 @@ a{
#exercisememoMD .CodeMirror { #exercisememoMD .CodeMirror {
margin-top: 31px !important; margin-top: 31px !important;
height: 700px !important; height: 374px !important;
/*width: 579px !important;*/ /*width: 579px !important;*/
} }
@ -125,7 +125,7 @@ a{
#neweditanswer .editormd-preview { #neweditanswer .editormd-preview {
top: 40px !important; top: 40px !important;
height: 364px !important; height: 364px !important;
width: 578px !important; width: 551px !important;
} }
#repository_url_tip { #repository_url_tip {

@ -151,7 +151,7 @@ class TPMRightSection extends Component {
<div className="padding20 edu-back-white mb10 mt10" style={{ <div className="padding20 edu-back-white mb10 mt10" style={{
display: TPMRightSectionData === undefined?"none":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "none" : "block" display: TPMRightSectionData === undefined?"none":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.length === 0 ? "none" : "block"
}}> }}>
<p className="mb20 font-16 clearfix">相关实课程</p> <p className="mb20 font-16 clearfix">相关实课程</p>
<div className="recommend-list" > <div className="recommend-list" >
{ {
TPMRightSectionData===undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.map((i,k)=>{ TPMRightSectionData===undefined?"":TPMRightSectionData.paths===undefined?"":TPMRightSectionData.paths.map((i,k)=>{

@ -330,7 +330,7 @@ class Infos extends Component{
<li className={`${moduleName == 'paths' ? 'active' : '' }`}> <li className={`${moduleName == 'paths' ? 'active' : '' }`}>
<Link <Link
onClick={() => this.setState({moduleName: 'paths'})} onClick={() => this.setState({moduleName: 'paths'})}
to={`/users/${username}/paths`}>课程</Link> to={`/users/${username}/paths`}>课程</Link>
</li> </li>
<li className={`${moduleName == 'projects' ? 'active' : '' }`}> <li className={`${moduleName == 'projects' ? 'active' : '' }`}>
<Link <Link

@ -143,13 +143,13 @@ class InfosPath extends Component{
</div> </div>
} }
<div className="pl25 pr25 clearfix font-12 mb20 mt20"> <div className="pl25 pr25 clearfix font-12 mb20 mt20">
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实课程"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实课程"}</span>
<span className="fr color-grey-9">时间最新</span> <span className="fr color-grey-9">时间最新</span>
</div> </div>
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
!isStudent && page == 1 && !category && is_current && !isStudent && page == 1 && !category && is_current &&
<Create href={"/paths/new"} name={"新建实课程"} index="3"></Create> <Create href={"/paths/new"} name={"新建实课程"} index="3"></Create>
} }
{ {
(!data || data.subjects.length==0) && (isStudent || category) && <NoneData></NoneData> (!data || data.subjects.length==0) && (isStudent || category) && <NoneData></NoneData>

Loading…
Cancel
Save