Comments refactoring
This commit is contained in:
parent
79dbe85bdf
commit
0bcce8991c
|
@ -1374,6 +1374,7 @@ define([
|
|||
date: this.dateToLocaleTimeString(date),
|
||||
userid: this.currentUserId,
|
||||
username: AscCommon.UserInfoParser.getCurrentName(),
|
||||
parsedName: AscCommon.UserInfoParser.getParsedName(AscCommon.UserInfoParser.getCurrentName()),
|
||||
usercolor: (user) ? user.get('color') : null,
|
||||
editTextInPopover: true,
|
||||
showReplyInPopover: false,
|
||||
|
|
|
@ -56,6 +56,7 @@ define([
|
|||
guid : '',
|
||||
userid : 0,
|
||||
username : 'Guest',
|
||||
parsedName : 'Guest',
|
||||
usercolor : null,
|
||||
date : undefined,
|
||||
quote : '',
|
||||
|
@ -88,6 +89,7 @@ define([
|
|||
time : 0, // acs
|
||||
userid : 0,
|
||||
username : 'Guest',
|
||||
parsedName : 'Guest',
|
||||
usercolor : null,
|
||||
reply : '',
|
||||
date : undefined,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- comment block -->
|
||||
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(username) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
|
||||
</div>
|
||||
<div class="user-date"><%=date%></div>
|
||||
<% if (quote!==null && quote!=='') { %>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<% } %>
|
||||
<div class="reply-item-ct" <% if (scope.viewmode && index==replys.length-1) { %>style="padding-bottom: 0;" <% } %>;>
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(item.get("username")) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(item.get("parsedName")) %>
|
||||
</div>
|
||||
<div class="user-date"><%=item.get("date")%></div>
|
||||
<% if (!item.get("editText")) { %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- comment block -->
|
||||
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(username) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
|
||||
</div>
|
||||
<div class="user-date"><%=date%></div>
|
||||
<% if (!editTextInPopover || hint) { %>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<% } %>
|
||||
<div class="reply-item-ct">
|
||||
<div class="user-name">
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(item.get("username")) %>
|
||||
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(item.get("parsedName")) %>
|
||||
</div>
|
||||
<div class="user-date"><%=item.get("date")%></div>
|
||||
<% if (!item.get("editTextInPopover")) { %>
|
||||
|
|
|
@ -697,6 +697,9 @@ define([
|
|||
getUserName: function (username) {
|
||||
return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username));
|
||||
},
|
||||
getEncodedName: function (username) {
|
||||
return Common.Utils.String.htmlEncode(username);
|
||||
},
|
||||
|
||||
pickLink: function (message) {
|
||||
var arr = [], offset, len;
|
||||
|
|
Loading…
Reference in a new issue