Merge branch 'newVersion_forge' into dev_military

This commit is contained in:
sylor_huang@126.com 2020-08-18 17:43:24 +08:00
commit ad3fe09cfb
28 changed files with 233 additions and 315 deletions

View File

@ -12,32 +12,25 @@ function ImageLayer2(props) {
setShowImage(false)
setImageSrc('')
}
const onDelegateClick = (event) => {
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
// 判断imageSrc是否是图片
const fileName = event.target.innerHTML.trim()
if (isImageExtension((imageSrc && imageSrc.trim())) || isImageExtension(fileName) || event.target.tagName == 'IMG' || (imageSrc && imageSrc.indexOf('base64,')) != -1) {
// 非回复里的头像图片; 非emoticons
if (imageSrc.indexOf('/images/avatars/User') === -1 &&
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
setShowImage(true)
setImageSrc(imageSrc)
}
event.stopPropagation()
event.preventDefault && event.preventDefault()
event.originalEvent.preventDefault()
// event.originalEvent.stopPropagation()
// event.originalEvent.cancelBubble = true
return false;
}
}
useEffect(() => {
$(parentSel)
.delegate(childSel, "click", onDelegateClick);
return () => {
$(parentSel).undelegate(childSel, "click", onDelegateClick )
}
$(parentSel).delegate(childSel, "click", (event) => {
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
// 判断imageSrc是否是图片
const fileName = event.target.innerHTML.trim();
if (isImageExtension((imageSrc && imageSrc.trim())) || isImageExtension(fileName) || event.target.tagName == 'IMG' || (imageSrc && imageSrc.indexOf('base64,')) != -1) {
// 非回复里的头像图片; 非emoticons
if (imageSrc.indexOf('/images/avatars/User') === -1 &&
imageSrc.indexOf('kindeditor/plugins/emoticons') === -1 ) {
setShowImage(true)
setImageSrc(imageSrc)
}
event.stopPropagation()
event.preventDefault && event.preventDefault()
event.originalEvent.preventDefault()
return false;
}
})
})
return (

View File

@ -31,7 +31,7 @@ class ActivityItem extends Component {
<span className="activity_type">{item.trend_type}</span>
</p >
}
<p className="itemLine mt15">
<p className="itemLine mt10">
<Link to={`/users/${item && item.login}`} className="show-user-link">
<img alt="" src={getImageUrl(`images/${item.user_avatar}`)} className="createImage" />
<span className="mr20">{item.user_name}</span>

View File

@ -66,6 +66,9 @@
display: flex;
align-items: flex-start;
}
.activity_list .activity_item:last-child{
border-bottom: none;
}
.prPercent > p{
position: absolute;
height: 100%;

View File

@ -289,7 +289,7 @@ class CoderRootDirectory extends Component {
<div className="commonBox-info">
{readMeContent[0].content ? (
<RenderHtml
className="break_word_comments"
className="break_word_comments imageLayerParent"
value={readMeContent[0].content}
/>
) : (

View File

@ -136,7 +136,7 @@ class CoderRootFileDetail extends Component {
.then((result) => {
if (result) {
this.props.showNotification("删除成功!");
this.props.history.push(`/projects/${projectsId}`);
this.props.history.push(`/projects/${owner}/${projectsId}`);
}
})
.catch((error) => {
@ -246,7 +246,7 @@ class CoderRootFileDetail extends Component {
) : (
md && readOnly ?
<div className="files-md">
<RenderHtml className="file-md" value={description} />
<RenderHtml className="file-md imageLayerParent" value={description} />
</div>
:
<Meditor

View File

@ -2,7 +2,8 @@ import React, { Component } from 'react';
import { Tooltip } from 'antd';
import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
import '../css/index.scss'
import '../css/index.scss';
import Nodata from '../Nodata';
import './list.css';
import img_parise from '../Images/parise.png';
@ -62,7 +63,7 @@ class IndexItem extends Component {
</div>
</div>
)
}) : ""
}) : <Nodata _html="暂无数据~"></Nodata>
)
return (
<div className="project-list minH-670">

View File

@ -98,9 +98,7 @@ class MergeItem extends Component {
<span className="ml15">
<Tag className="pr-branch-tag">
<Link
to={`/projects/${
item.is_original ? item.fork_project_id : projectsId
}/coders?branch=${item.pull_request_head}`}
to={`/projects/${owner}/${ item.is_original ? item.fork_project_id : projectsId }/coders?branch=${item.pull_request_head}`}
className="maxW200px hide-1 ver-middle"
>
{item.is_original

View File

@ -195,7 +195,7 @@ class MessageCount extends Component {
};
commentCtx = (v) => {
return <RenderHtml className="break_word_comments" value={v} />;
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
};
render() {
@ -359,7 +359,7 @@ class MessageCount extends Component {
<Button
type="success"
ghost
href={`/projects/${owner}/${projectsId}/merge/${mergeId}/UpdateMerge`}
onClick={()=>{this.props.history.push(`/projects/${owner}/${projectsId}/pulls/${mergeId}/UpdateMerge`);}}
>
编辑
</Button>

View File

@ -301,9 +301,6 @@ class NewMerge extends Component {
)}
</Spin>
</div>
{/* <div className=" main">
<MergeFooter footer_type="new" {...this.props}></MergeFooter>
</div> */}
</div>
);
}

View File

@ -273,7 +273,7 @@ class merge extends Component {
);
return (
<div className="main">
<div className="topWrapper">
<div className="topWrapper" style={{borderBottom:"1px solid #eee"}}>
<div className="target-detail-search">
<Search
placeholder="输入关键字搜索合并请求"
@ -425,61 +425,6 @@ class merge extends Component {
) : (
<NoneData _html="暂时还没有相关数据哦!" projectsId={projectsId} owner={owner} />
)}
{/* <div className="topWrapper" style={{ borderBottom: "none" }}>
<p className="topWrapper_type_infos">
<li className={status_type === "1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_count ? data.open_count : 0}个开启中</li>
<li className={status_type === "2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_count ? data.close_count : 0}个已关闭</li>
</p>
<div className="topWrapper_select">
<div>
<Search
placeholder="搜索"
enterButton
onSearch={this.searchFunc}
style={{ width: 300 }}
/>
</div>
<a className="topWrapper_btn ml10" onClick={() => this.islogin()}>创建合并请求</a>
</div>
</div>
<div className="f-wrap-between pb20" style={{borderBottom:"1px dashed #ddd"}}>
<div></div>
<ul className="topWrapper_select">
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag, '标签', 'issue_tag_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_version, '里程碑', 'fixed_version_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.fixed_version_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '指派人', 'assigned_to_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
</ul>
</div>
{
data && data.search_count && data.search_count > 0 ?
<div>
<Spin spinning={isSpin}>
<OrderItem issues={issues} search_count={search_count} page={select_params.page} limit={select_params.limit} {...this.props} {...this.state}></OrderItem>
{Paginations}
</Spin>
</div>
:
<NoneData _html="暂时还没有相关数据哦!" />
} */}
</div>
);
}

View File

@ -282,11 +282,9 @@ class MergeForm extends Component {
<Button
type="default"
className="ml30"
href={
merge_type === "new"
? `/projects/${owner}/${projectsId}/pulls`
: `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`
}
onClick={()=>{
this.props.history.push(merge_type === "new" ? `/projects/${owner}/${projectsId}/pulls` : `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`)
}}
>
<span className="plr10">取消</span>
</Button>

View File

@ -117,18 +117,12 @@ class UserSubmitComponent extends Component {
const { current_user, filepath, projectDetail } = this.props;
const { editor_type } = this.props;
return (
<div>
<span className="df mt30" style={{ alignItems: "center" }}>
<Link
to={`/users/${current_user && current_user.login}`}
className="show-user-link"
>
<Link to={`/users/${current_user && current_user.login}`} className="show-user-link" >
<img
src={getImageUrl(
`images/${current_user && current_user.image_url}`
)}
src={getImageUrl(`images/${current_user && current_user.image_url}`)}
alt=""
className="screwImg"
/>
@ -136,7 +130,6 @@ class UserSubmitComponent extends Component {
{current_user && current_user.username}
</span>
</Link>
<span className="color-grey-8">提交变更</span>
</span>
<Spin spinning={isSpin}>
@ -153,10 +146,8 @@ class UserSubmitComponent extends Component {
})(
<div className="setInputAddon">
<Input
addonBefore={`/${
projectDetail && projectDetail.identifier
}/`}
value={filename ? filename : filepath}
addonBefore={`/${ projectDetail && projectDetail.identifier }/`}
value={filename || filepath}
onChange={this.changeFileName}
placeholder="文件路径..."
/>

View File

@ -27,7 +27,7 @@ class UploadFile extends Component {
const { pathname } = this.props.location;
const { filename, editorValue, attachment_clean } = this.state;
const urlroot = pathname.split("uploadfile/")[1];
const file_path = !urlroot ? `${filename}` : `${urlroot}/${filename}`;
const file_path = !urlroot ? filename : `${urlroot}/${filename}`;
return (
<React.Fragment>

View File

@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
import axios from "axios";
import { getImageUrl } from "educoder";
import { Form , Popconfirm , Tag , Spin } from "antd";
import { Form, Popconfirm, Tag, Spin } from "antd";
import Attachments from "../Upload/attachment";
import RenderHtml from "../../components/render-html";
import Comments from "../comments/comments";
@ -44,7 +44,7 @@ class Detail extends Component {
};
getDetail = () => {
const { projectsId, orderId,owner } = this.props.match.params;
const { projectsId, orderId, owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
axios
.get(url)
@ -52,7 +52,7 @@ class Detail extends Component {
if (result) {
this.setState({
data: result.data,
isSpins:false
isSpins: false
});
}
})
@ -74,7 +74,7 @@ class Detail extends Component {
//删除任务信息
deletedetail = (id) => {
const { projectsId, orderId,owner } = this.props.match.params;
const { projectsId, orderId, owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
axios
.delete(url, {
@ -85,7 +85,7 @@ class Detail extends Component {
})
.then((result) => {
if (result) {
this.props.history.push(`/projects/${projectsId}/issues`);
this.props.history.push(`/projects/${owner}/${projectsId}/issues`);
}
})
.catch((error) => {
@ -95,7 +95,7 @@ class Detail extends Component {
//关闭任务
closedetail = (id) => {
const { projectsId, orderId , owner } = this.props.match.params;
const { projectsId, orderId, owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/issues/${orderId}/close_issue.json`;
axios
.post(url, {
@ -122,7 +122,7 @@ class Detail extends Component {
//复制
copydetail = () => {
const { projectsId, orderId , owner} = this.props.match.params;
const { projectsId, orderId, owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`;
axios
.post(url, {
@ -182,12 +182,12 @@ class Detail extends Component {
};
commentCtx = (v) => {
return <RenderHtml className="break_word_comments" value={v} />;
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
};
render() {
const { projectsId, orderId , owner } = this.props.match.params;
const { data , isSpins } = this.state;
const { projectsId, orderId, owner } = this.props.match.params;
const { data, isSpins } = this.state;
const get_color = (type) => {
if (type === "高") {
return "#e67e22";
@ -276,8 +276,8 @@ class Detail extends Component {
</Link>
</span>
) : (
""
)}
""
)}
</div>
</div>
</div>
@ -286,8 +286,8 @@ class Detail extends Component {
{data && data.description && data.description.length > 0 ? (
this.commentCtx(data.description)
) : (
<span className="color-grey-9 ml3 mr3">没有描述</span>
)}
<span className="color-grey-9 ml3 mr3">暂无描述</span>
)}
</div>
{data && data.attachments && data.attachments.length > 0 ? (
<Attachments
@ -295,8 +295,8 @@ class Detail extends Component {
showNotification={this.props.showNotification}
/>
) : (
""
)}
""
)}
</div>
</div>
@ -307,77 +307,66 @@ class Detail extends Component {
/>
</div>
<div className="list-left list-left-padding">
<div className="list-right-item-padding background-f boder-4">
<p className="grid-item-left pb15">
<span className="issue_detail_info">分支:</span>
<span>{data && data.branch_name ? data.branch_name : "--"}</span>
</p>
{/* <p className="grid-item pb15">
<span className="issue_detail_info">是否上链:</span>
<span>{data && data.issue_type==="2" ? '是' : "--"}</span>
</p>
{
data && data.issue_type==="2" &&
<p className="grid-item pb15">
<span className="issue_detail_info">token值:</span>
<span>{data && data.token ? data.token : "--"}</span>
</p>
} */}
<p className="grid-item-left pb15">
<span className="issue_detail_info">标签:</span>
<span>
{data && data.issue_tags ? (
<span className="grid-item">
<span
className="tagColor"
style={{ background: data.issue_tags[0].color }}
></span>
{data.issue_tags[0].name}
</span>
) : (
"--"
)}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">里程碑:</span>
<span className="title_overflow">
{data && data.version ? data.version : "--"}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">状态:</span>
<span>
{data && data.issue_status ? data.issue_status : "--"}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">分类:</span>
<span>{data && data.tracker ? data.tracker : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">负责人:</span>
<span>
{data && data.assign_user_name ? data.assign_user_name : "--"}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">开始日期:</span>
<span>{data && data.start_date ? data.start_date : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">结束日期:</span>
<span>{data && data.due_date ? data.due_date : "--"}</span>
</p>
<div className="list-right-item-padding background-f boder-4">
<p className="grid-item-left pb15">
<span className="issue_detail_info">分支:</span>
<span>{data && data.branch_name ? data.branch_name : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">标签:</span>
<span>
{data && data.issue_tags ? (
<span className="grid-item">
<span
className="tagColor"
style={{ background: data.issue_tags[0].color }}
></span>
{data.issue_tags[0].name}
</span>
) : (
"--"
)}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">里程碑:</span>
<span className="title_overflow">
{data && data.version ? data.version : "--"}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">状态:</span>
<span>
{data && data.issue_status ? data.issue_status : "--"}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">分类:</span>
<span>{data && data.tracker ? data.tracker : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">负责人:</span>
<span>
{data && data.assign_user_name ? data.assign_user_name : "--"}
</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">开始日期:</span>
<span>{data && data.start_date ? data.start_date : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">结束日期:</span>
<span>{data && data.due_date ? data.due_date : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">完成度:</span>
<span>{data && data.done_ratio ? data.done_ratio : "--"}</span>
</p>
<p className="grid-item-left pb15">
<span className="issue_detail_info">完成度:</span>
<span>{data && data.done_ratio ? data.done_ratio : "--"}</span>
</p>
</div>
</div>
</div>
</div>
</Spin>
</Spin>
);
}
}

View File

@ -169,7 +169,7 @@ class Milepost extends Component {
<span>里程碑{data && data.issue_tags_count}已创建</span>
</div>
</div>
<div className="topWrapper">
<div className="topWrapper" style={{borderBottom:"1px solid #eee"}}>
<div className="topWrapper_type_infos">
<li className={openselect ? "active" : ""} onClick={() => this.opneMilelist(1)}>{data && data.open_count}个开启中</li>
<li className={closeselect ? "active" : ""} onClick={() => this.opneMilelist(2)}>{data && data.closed_count}个已关闭</li>
@ -223,15 +223,15 @@ class Milepost extends Component {
{
data && data.user_admin_or_member ?
<div className="milepostleft">
<div className="grid-item mr15 color-grey-9">
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-bianji3 font-14 mr5"></i>
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
</div>
<div className="grid-item mr15 color-grey-9">
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
</div>
<div className="grid-item mr15 color-grey-9">
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-lajitong font-14 mr5" ></i>
<Popconfirm placement="bottom" title={'是否删除里程碑?'} okText="是" cancelText="否" onConfirm={() => this.closemile(item)}>
<a className="color-grey-9">删除</a>

View File

@ -2,6 +2,7 @@ import React, { Component } from "react";
import { Link } from 'react-router-dom';
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
import './order.css';
import { FlexAJ } from '../Component/layout'
import NoneData from '../Nodata';
import OrderItem from './OrderItem';
@ -198,92 +199,94 @@ class MilepostDetail extends Component {
</Menu>
)
return (
<div className="main">
<div className="miledetail mb20">
<div className="topmilepost">
<p className="font-18">{data && data.name}</p>
<div className="main" style={{padding:"0px"}}>
<div className="miledetail">
<p className="font-20">{data && data.name}</p>
<FlexAJ>
<span className="mt7">
<span className="mr10">
<i className="iconfont icon-rili font-14 mr5">
</i>
{
data && data.effective_date ?
<span >{data && data.effective_date}</span>
:
<span >暂无截止时间</span>
}
</span>
<span className="font-weight-bold">{data && data.percent && data.percent.toFixed(2)}%完成 </span>
</span>
<div className="milepostdiv">
<Link to={`/projects/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
<Link to={`/projects/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建任务</Link>
</div>
</div>
<div className="grid-item mr10">
<span className="mr10">
<i className="iconfont icon-rili font-14 mr5">
</i>
{
data && data.effective_date ?
<span >{data && data.effective_date}</span>
:
<span >暂无截止时间</span>
}
</span>
<span className="font-weight-bold">
{data && data.percent && data.percent.toFixed(2)}%完成
</span>
</div>
</FlexAJ>
</div>
<Spin spinning={isSpin}>
<div className="f-wrap-between pb20 bor-bottom-greyE">
<ul className="topWrapper_type_infos">
<li className={status_type==="1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_issues_count}个开启中</li>
<li className={status_type==="2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_issues_count}个已关闭</li>
</ul>
<ul className="topWrapper_select">
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag, '标签', 'issue_tag_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '发布人', 'author_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.author_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '负责人', 'assigned_to_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.tracker, '类型', 'tracker_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.tracker_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_status, '状态', 'status_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.status_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.done_ratio, '完成度', 'done_ratio')} trigger={['click']} placement="bottomCenter">
<span>{this.state.done_ratios}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
</ul>
<div className="pl20 pr20">
<div className="f-wrap-between pt15 pb15 bor-bottom-greyE">
<ul className="topWrapper_type_infos">
<li className={status_type==="1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_issues_count}个开启中</li>
<li className={status_type==="2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_issues_count}个已关闭</li>
</ul>
<ul className="topWrapper_select">
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag, '标签', 'issue_tag_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '发布人', 'author_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.author_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user, '负责人', 'assigned_to_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.tracker, '类型', 'tracker_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.tracker_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_status, '状态', 'status_id')} trigger={['click']} placement="bottomCenter">
<span>{this.state.status_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.done_ratio, '完成度', 'done_ratio')} trigger={['click']} placement="bottomCenter">
<span>{this.state.done_ratios}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
</ul>
</div>
<div className="setItemStyle">
{
search_count === 0 ?
<NoneData _html="暂时还没有相关数据哦!" />
:
issues && issues.length>0 && issues.map((item,key)=>{
return(
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem>
)
})
}
</div>
{
search_count > limit?
<div className="mt30 mb50 edu-txt-center">
<Pagination simple current={page} total={search_count} pageSize={limit} onChange={this.ChangePage}></Pagination>
</div>:""
}
</div>
{
search_count === 0 ?
<NoneData _html="暂时还没有相关数据哦!" />
:
issues && issues.length>0 && issues.map((item,key)=>{
return(
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem>
)
})
}
{
search_count > limit?
<div className="mt30 mb50 edu-txt-center">
<Pagination simple current={page} total={search_count} pageSize={limit} onChange={this.ChangePage}></Pagination>
</div>:""
}
</Spin>
</div>
)

View File

@ -37,7 +37,6 @@ class OrderItem extends Component {
</div>
<div className="milepostdiv" style={{ marginTop: 5 }}>
<div className="milepostrighe">
<div className="grid-item mr10">
<i className="iconfont icon-rili font-14 mr5">
</i>
@ -64,15 +63,15 @@ class OrderItem extends Component {
{
data.user_admin_or_member ?
<div className="milepostleft">
<div className="grid-item mr15 color-grey-9">
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-bianji3 font-14 mr5"></i>
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
</div>
<div className="grid-item mr15 color-grey-9">
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
</div>
<div className="grid-item mr15 color-grey-9">
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-lajitong font-14 mr5" ></i>
<Popconfirm placement="bottom" title={'是否删除里程碑?'} okText="是" cancelText="否" onConfirm={() => this.closemile(item)}>
<a className="color-grey-9">删除</a>

View File

@ -53,7 +53,7 @@ class OrderItem extends Component {
<div className="issueItem">
{current_user && current_user.login && checkbox}
<div className="flex-1">
<p className="mb15 df" style={{alignItems:"center"}}>
<p className="mb10 df" style={{alignItems:"center"}}>
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"300px"}}>{item.name}</Link>
{TagInfo(item.priority,"mr10")}
</p>

View File

@ -80,9 +80,9 @@ class Tags extends Component {
getList = (page, order_name, order_type) => {
const { projectsId } = this.props.match.params;
const { projectsId ,owner } = this.props.match.params;
const { limit } = this.state;
const url = `/projects/${projectsId}/issue_tags.json`;
const url = `/projects/${owner}/${projectsId}/labels.json`;
axios.get(url, {
params: {
page, limit, order_name, order_type
@ -101,8 +101,8 @@ class Tags extends Component {
createtagpost = () => {
this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) {
const { projectsId } = this.props.match.params;
const url = `/projects/${projectsId}/issue_tags.json`;
const { projectsId , owner } = this.props.match.params;
const url = `/projects/${owner}/${projectsId}/labels.json`;
axios.post(url, {
...values,
project_id: projectsId,
@ -183,9 +183,9 @@ class Tags extends Component {
this.updatetag();
}
updatetag = () => {
const { projectsId } = this.props.match.params;
const { projectsId , owner } = this.props.match.params;
let id = this.state.id;
const url = `/projects/${projectsId}/issue_tags/${id}.json`;
const url = `/projects/${owner}/${projectsId}/labels/${id}.json`;
let name = this.state.name;
let description = this.state.description;
let modalcolor = this.state.newcolor
@ -208,8 +208,8 @@ class Tags extends Component {
}
deletetag = (id) => {
const { projectsId } = this.props.match.params;
const url = `/projects/${projectsId}/issue_tags/${id}.json`;
const { projectsId , owner } = this.props.match.params;
const url = `/projects/${owner}/${projectsId}/labels/${id}.json`;
axios.delete(url, {
data: {
project_id: projectsId,

View File

@ -19,7 +19,6 @@
}
.topmilepost {
padding: 20px 0;
box-sizing: border-box;
display: flex;
justify-content: space-between;
@ -27,7 +26,7 @@
}
.miledetail {
padding-bottom: 20px;
padding:15px 20px;
box-sizing: border-box;
justify-content: space-between;
border-bottom: 1px solid #eeeeee;
@ -212,12 +211,18 @@
padding: 6px 30px;
cursor: pointer;
}
.setItemStyle .issueItem{
padding:16px 0px;
}
.issueItem {
display: flex;
flex-wrap: wrap;
align-content: center;
border-bottom: 1px solid #eee;
padding: 16px 0px 16px 20px;
padding: 16px 20px;
}
.issueItem:last-child{
border-bottom: none;
}
.issueNo {
padding: 0px 5px;
@ -424,7 +429,7 @@
}
.milepostrighe {
display: flex;
width: 80%;
flex:1;
}
.milepostleft {
display: flex;
@ -640,7 +645,7 @@ a.issue-type-button.active:hover {
.custom-comment-tabs .ant-tabs-top-bar{
border-bottom: none;
padding: 15px 0;
padding-top:15px;
}
.custom-comment-tabs .search-count-button{
line-height: 18px;

View File

@ -316,8 +316,8 @@ class order extends Component {
};
deletedetail = (id) => {
const { projectsId } = this.props.match.params;
const url = `/projects/${projectsId}/issues/${id}.json`;
const { projectsId , owner } = this.props.match.params;
const url = `/projects/${owner}/${projectsId}/issues/${id}.json`;
axios.delete(url, {
data: {
project_id: projectsId,
@ -470,8 +470,8 @@ class order extends Component {
isSpin: true
})
const { checkedValue } = this.state;
const { projectsId } = this.props.match.params;
const url = `/projects/${projectsId}/issues/clean.json`;
const { projectsId , owner } = this.props.match.params;
const url = `/projects/${owner}/${projectsId}/issues/clean.json`;
axios.post(url, {
ids: checkedValue
}).then(result => {

View File

@ -238,7 +238,7 @@ class Collaborator extends Component {
content: "确认将此成员从项目中移除?",
onOk: () => {
const { project_id } = this.props;
const url = `/${owner}/${projectsId}/members/remove.json`;
const url = `/${owner}/${projectsId}/collaborators/remove.json`;
axios
.delete(url, {
data: {

View File

@ -41,7 +41,7 @@ class Index extends Component {
const { projectsId , owner } = this.props.match.params;
const { pathname } = this.props.history.location;
const flag = pathname === `/projects/${projectsId}/setting`;
const flag = pathname === `/projects/${owner}/${projectsId}/setting`;
return (
<Box className="ProjectListIndex">
<Short>
@ -49,9 +49,8 @@ class Index extends Component {
<li className={flag ? "active" : ""}>
<p>
<Link to={`/projects/${owner}/${projectsId}/setting`} className="w-100">
<i className="iconfont icon-huabanfuben font-18 mr10"></i>
</Link>
</Link>
</p>
</li>
<li

View File

@ -86,7 +86,7 @@ class children_comments extends Component {
};
commentCtx = (v) => {
return <RenderHtml className="break_word_comments" value={v} />;
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
};
Paginations =()=> {

View File

@ -51,7 +51,7 @@ class children_journals extends Component {
};
commentCtx = (v) => {
return <RenderHtml className="break_word_comments" value={v} />;
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
};
Paginations =()=> {

View File

@ -263,7 +263,7 @@ class comments extends Component {
}
commentCtx = (v) => {
return <RenderHtml className="break_word_comments" value={v} />;
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
};
Paginations = ()=>{
const { page, limit, search_count } = this.state;

View File

@ -427,10 +427,6 @@ export function commentHOC(WrappedComponent) {
})
}
// ----------------------------------------------------------------------------------------------评论 End
// ----------------------------------------------------------------------------------------------评论 End
componentDidMount() {
$(".commentsDelegateParent")
.delegate(".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", (event) => {

View File

@ -16,6 +16,7 @@ export function ImageLayerOfCommentHOC(options = {}) {
}
onDelegateClick = (event) => {
console.log("imgclick",event);
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
// 判断imageSrc是否是图片
const fileName = event.target.innerHTML.trim()
@ -37,8 +38,8 @@ export function ImageLayerOfCommentHOC(options = {}) {
componentDidMount() {
this.props.wrappedComponentRef && this.props.wrappedComponentRef(this.refs['wrappedComponentRef'])
setTimeout(() => {
setTimeout(() => {
$(options.parentSelector || ".commentsDelegateParent")
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", this.onDelegateClick);
}, 1200)