diff --git a/src/common/hooks/ImageLayer2.js b/src/common/hooks/ImageLayer2.js index 504e491c..ae429bab 100644 --- a/src/common/hooks/ImageLayer2.js +++ b/src/common/hooks/ImageLayer2.js @@ -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 ( diff --git a/src/forge/Activity/ActivityItem.js b/src/forge/Activity/ActivityItem.js index 40887fdd..819ed530 100644 --- a/src/forge/Activity/ActivityItem.js +++ b/src/forge/Activity/ActivityItem.js @@ -31,7 +31,7 @@ class ActivityItem extends Component { {item.trend_type}
} -+
{item.user_name} diff --git a/src/forge/Activity/activity.css b/src/forge/Activity/activity.css index e9ba6eba..cc05dccf 100644 --- a/src/forge/Activity/activity.css +++ b/src/forge/Activity/activity.css @@ -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%; diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index 28876b88..0d79eaa1 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -289,7 +289,7 @@ class CoderRootDirectory extends Component {
-
- 分支: - {data && data.branch_name ? data.branch_name : "--"} -
- {/*- 是否上链: - {data && data.issue_type==="2" ? '是' : "--"} -
- { - data && data.issue_type==="2" && -- token值: - {data && data.token ? data.token : "--"} -
- } */} -- 标签: - - {data && data.issue_tags ? ( - - - {data.issue_tags[0].name} - - ) : ( - "--" - )} - -
-- 里程碑: - - {data && data.version ? data.version : "--"} - -
-- 状态: - - {data && data.issue_status ? data.issue_status : "--"} - -
-- 分类: - {data && data.tracker ? data.tracker : "--"} -
-- 负责人: - - {data && data.assign_user_name ? data.assign_user_name : "--"} - -
-- 开始日期: - {data && data.start_date ? data.start_date : "--"} -
-- 结束日期: - {data && data.due_date ? data.due_date : "--"} -
++ 分支: + {data && data.branch_name ? data.branch_name : "--"} +
++ 标签: + + {data && data.issue_tags ? ( + + + {data.issue_tags[0].name} + + ) : ( + "--" + )} + +
++ 里程碑: + + {data && data.version ? data.version : "--"} + +
++ 状态: + + {data && data.issue_status ? data.issue_status : "--"} + +
++ 分类: + {data && data.tracker ? data.tracker : "--"} +
++ 负责人: + + {data && data.assign_user_name ? data.assign_user_name : "--"} + +
++ 开始日期: + {data && data.start_date ? data.start_date : "--"} +
++ 结束日期: + {data && data.due_date ? data.due_date : "--"} +
-- 完成度: - {data && data.done_ratio ? data.done_ratio : "--"} -
++ 完成度: + {data && data.done_ratio ? data.done_ratio : "--"} +
+{data && data.name}
+{data && data.name}
++
{item.name} {TagInfo(item.priority,"mr10")}
diff --git a/src/forge/Order/Tags.js b/src/forge/Order/Tags.js index 5183222b..0a4c10d3 100644 --- a/src/forge/Order/Tags.js +++ b/src/forge/Order/Tags.js @@ -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, diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css index cedf4029..5db5aaf0 100644 --- a/src/forge/Order/order.css +++ b/src/forge/Order/order.css @@ -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; diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 784111fe..7e2715f2 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -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 => { diff --git a/src/forge/Settings/Collaborator.js b/src/forge/Settings/Collaborator.js index a266828f..049e3dae 100644 --- a/src/forge/Settings/Collaborator.js +++ b/src/forge/Settings/Collaborator.js @@ -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: { diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js index 530085b1..542f12c7 100644 --- a/src/forge/Settings/Index.js +++ b/src/forge/Settings/Index.js @@ -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 (- 基本设置 - +