Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.2.2^2
zouap 3 years ago
parent
commit
f006d09572
1 changed files with 10 additions and 4 deletions
  1. +10
    -4
      public/home/home.js

+ 10
- 4
public/home/home.js View File

@@ -95,9 +95,9 @@ socket.onmessage = function (e) {
for(var i = 0; i < messageQueue.length; i++){
var record = messageQueue[i];

var recordPrefix = getMsg(record);
var actionName = getAction(record.OpType,isZh);

console.log("receive action type=" + record.OpType + " name=" + actionName);
var recordPrefix = getMsg(record);
if(record.OpType == "6" || record.OpType == "10" || record.OpType == "12" || record.OpType == "13"){
html += recordPrefix + actionName;
html += " <a href=\"" + getIssueLink(record) + "\" rel=\"nofollow\">" + getIssueText(record) + "</a>"
@@ -170,9 +170,15 @@ function getTaskLink(record){
function getMsg(record){
var html ="";
html += "<div class=\"swiper-slide item\">";
html += " <img class=\"ui avatar image\" src=\"/user/avatar/" + record.ActUser.Name + "/-1\" alt=\"\">"
var name = "";
if(record.ActUser != null){
name = record.ActUser.Name;
}else{
console.log("act user is null.");
}
html += " <img class=\"ui avatar image\" src=\"/user/avatar/" + name + "/-1\" alt=\"\">"
html += " <div class=\"middle aligned content nowrap\">"
html += " <a href=\"/" + record.ActUser.Name + "\" title=\"\">" + record.ActUser.Name + "</a>"
html += " <a href=\"/" + name + "\" title=\"\">" + name + "</a>"
return html;
}



Loading…
Cancel
Save