dev_aliyun2
杨树明 5 years ago committed by harry
parent 869f5bdced
commit e054e2dfb4

@ -368,9 +368,9 @@ class Repository extends Component {
{/* })}*/} {/* })}*/}
{/*</div>*/} {/*</div>*/}
{/*{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?*/} { this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
{/* <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}><Icon type="delete" /></Button>:""}*/} <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}>删除</Button>:""}
{/*<div className={"both"}></div>*/} <div className={"both"}></div>
<style> <style>
{ {
@ -385,11 +385,11 @@ class Repository extends Component {
<DirectoryTree <DirectoryTree
className={"reposanttreeswitcher"} className={"reposanttreeswitcher"}
// multiple multiple
defaultExpandAll defaultExpandAll
// checkable checkable={ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?true:false}
onSelect={this.onSelectDirectoryTree} onSelect={this.onSelectDirectoryTree}
// onCheck={this.onCheck} onCheck={this.onCheck}
> >
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => { { trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
return ( return (

@ -76,6 +76,24 @@ class RepositoryAddFile extends Component {
} }
componentDidMount(){ componentDidMount(){
if(this.props.newathArray){
if(this.props.newathArray.length>0){
let newfilspath="";
let list=this.props.newathArray;
list.map((item,key)=>{
if(key===0){
newfilspath=item;
}else{
newfilspath=newfilspath+'/'+item;
}
})
this.props.form.setFieldsValue({
path:newfilspath,
});
}
}
let cmOptions = createCMOptions(this.props.mirror_name) let cmOptions = createCMOptions(this.props.mirror_name)
const extend_editor = window.CodeMirror.fromTextArea(window.$('#codemirror-file-edit')[0] const extend_editor = window.CodeMirror.fromTextArea(window.$('#codemirror-file-edit')[0]
, cmOptions); , cmOptions);

@ -117,8 +117,8 @@ class RepositoryDirectories extends Component {
} }
}) })
} }
{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ? {/*{ this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?*/}
<Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}>删除</Button>:""} {/* <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}>删除</Button>:""}*/}
<div className={"both"}></div> <div className={"both"}></div>
</div> } </div> }

Loading…
Cancel
Save