|
|
|
@@ -188,7 +188,7 @@ function displayPrResult(page,jsonResult,onlyReturnNum,keyword){ |
|
|
|
$('#obj_desc').text("合并请求"); |
|
|
|
$('#child_total').text(total); |
|
|
|
|
|
|
|
setIssueOrPrInnerHtml(data); |
|
|
|
setIssueOrPrInnerHtml(data,"pulls"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -235,6 +235,22 @@ var taskDesc={ |
|
|
|
"speech_synthesis":"语音合成" |
|
|
|
}; |
|
|
|
|
|
|
|
function getCategoryDesc(key){ |
|
|
|
var re = categoryDesc[key]; |
|
|
|
if(isEmpty(re)){ |
|
|
|
return key; |
|
|
|
} |
|
|
|
return re; |
|
|
|
} |
|
|
|
|
|
|
|
function getTaskDesc(key){ |
|
|
|
var re = categoryDesc[key]; |
|
|
|
if(isEmpty(re)){ |
|
|
|
return key; |
|
|
|
} |
|
|
|
return re; |
|
|
|
} |
|
|
|
|
|
|
|
function displayDataSetResult(page,jsonResult,onlyReturnNum,keyword){ |
|
|
|
var data = jsonResult.Result; |
|
|
|
var total = jsonResult.Total; |
|
|
|
@@ -257,10 +273,10 @@ function displayDataSetResult(page,jsonResult,onlyReturnNum,keyword){ |
|
|
|
html += " <div class=\"content\">"; |
|
|
|
html += " <div class=\"ui right metas\">" ; |
|
|
|
if(!isEmpty(recordMap["category"])){ |
|
|
|
html += " <span class=\"text grey\"><svg class=\"svg octicon-tasklist\" width=\"16\" height=\"16\" aria-hidden=\"true\"><use xlink:href=\"#octicon-tasklist\" /></svg> " +recordMap["category"]+ "</span>"; |
|
|
|
html += " <span class=\"text grey\"><svg class=\"svg octicon-tasklist\" width=\"16\" height=\"16\" aria-hidden=\"true\"><use xlink:href=\"#octicon-tasklist\" /></svg> " + getCategoryDesc(recordMap["category"]) + "</span>"; |
|
|
|
} |
|
|
|
if(!isEmpty(recordMap["task"])){ |
|
|
|
html += " <span class=\"text grey\"><svg class=\"svg octicon-tag\" width=\"16\" height=\"16\" aria-hidden=\"true\"><use xlink:href=\"#octicon-tag\" /></svg>" +recordMap["task"]+ "</span>"; |
|
|
|
html += " <span class=\"text grey\"><svg class=\"svg octicon-tag\" width=\"16\" height=\"16\" aria-hidden=\"true\"><use xlink:href=\"#octicon-tag\" /></svg>" + getTaskDesc(recordMap["task"]) + "</span>"; |
|
|
|
} |
|
|
|
html += " <span class=\"text grey\"><i class=\"ri-fire-line\"></i> " +recordMap["download_times"] + "</span> "; |
|
|
|
html +=" </div>"; |
|
|
|
@@ -370,7 +386,7 @@ function displayUserResult(page,jsonResult,onlyReturnNum,keyword){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function setIssueOrPrInnerHtml(data){ |
|
|
|
function setIssueOrPrInnerHtml(data,path){ |
|
|
|
var sortHtml = ""; |
|
|
|
sortHtml +="<a class=\"item\" href=\"javascript:searchItem(2,21);\" tabindex=\"-1\" role=\"menuitem\" id=\"menuitem_1\">最近更新</a>"; |
|
|
|
document.getElementById("sort_type").innerHTML=sortHtml; |
|
|
|
@@ -388,7 +404,7 @@ function setIssueOrPrInnerHtml(data){ |
|
|
|
html += " <p class=\"has-emoji\"> " + recordMap["content"] + "</p>"; |
|
|
|
html +=" <p class=\"time\">"; |
|
|
|
html +=" <i class=\"ri-code-box-line\"></i>"; |
|
|
|
html +=" <a class=\"am-text grey\" href=\"/" + recordMap["repoUrl"] +"/" + recordMap["id"] + "\"> " + recordMap["repoUrl"] +"#" + recordMap["id"] + "</a>"; |
|
|
|
html +=" <a class=\"am-text grey\" href=\"/" + recordMap["repoUrl"] +"/" + path + "/" + recordMap["id"] + "\"> " + recordMap["repoUrl"] +"#" + recordMap["id"] + "</a>"; |
|
|
|
html +=" <i class=\"ri-information-line am-ml-10\"></i> "; |
|
|
|
if(isEmpty(recordMap["is_closed"]) || recordMap["is_closed"]=="f"){ |
|
|
|
html += "关闭"; |
|
|
|
@@ -415,7 +431,7 @@ function displayIssueResult(page,jsonResult,onlyReturnNum,keyword){ |
|
|
|
$('#obj_desc').text("任务"); |
|
|
|
$('#child_total').text(total); |
|
|
|
|
|
|
|
setIssueOrPrInnerHtml(data); |
|
|
|
setIssueOrPrInnerHtml(data,"issues"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -473,7 +489,7 @@ function displayRepoResult(page,jsonResult,onlyReturnNum,keyword){ |
|
|
|
} |
|
|
|
html +=" </div>"; |
|
|
|
html +=" <p class=\"time\">"; |
|
|
|
html +=" <i class=\"icon fa-eye\">" +recordMap["num_watches"] + " </i><i class=\"ri-star-line\"></i>" + recordMap["num_stars"] + " <i class=\"ri-git-branch-line am-ml-10\"></i>" + recordMap["num_forks"] +" "; |
|
|
|
html +=" <i class=\"icon fa-eye\">" +recordMap["num_watches"] + "</i> <i class=\"ri-star-line\"></i>" + recordMap["num_stars"] + " <i class=\"ri-git-branch-line am-ml-10\"></i>" + recordMap["num_forks"] +" "; |
|
|
|
html +=" 最后更新于 <span class=\"time-since poping up\" title=\"\" data-content=\"\" data-variation=\"inverted tiny\">" + getTime(recordMap["updated_unix"],currentTime) +"</span>"; |
|
|
|
if(!isEmpty(recordMap["lang"])){ |
|
|
|
html +=" <span class=\"text grey am-ml-10\"><i class=\"color-icon\" style=\"background-color: #3572A5\"></i>" + recordMap["lang"] + "</span>"; |
|
|
|
|