调整显示的格式
This commit is contained in:
parent
0c7db76371
commit
1a2aff99be
|
@ -145,9 +145,8 @@ class IssuesController < ApplicationController
|
|||
#id name email
|
||||
#1. issues list persons
|
||||
#2. project persons
|
||||
@at_persons = []
|
||||
@journals.each {|j| @at_persons << j.user unless @at_persons.include?(j.user)}
|
||||
@issue.project.users.each {|u| @at_persons << u unless @at_persons.include?(u)}
|
||||
@at_persons = @journals.map(&:user) + @issue.project.users
|
||||
@at_persons = @at_persons.uniq{|u| u.id}.delete_if{|u| u.id == User.current.id}
|
||||
|
||||
respond_to do |format|``
|
||||
format.html {
|
||||
|
|
|
@ -2628,7 +2628,7 @@ int main(int argc, char** argv){
|
|||
ss += 'window.atPersonLists = [];'
|
||||
|
||||
@at_persons && @at_persons.each_with_index do |person,index|
|
||||
ss += "var o = {id: #{index}, name: '#{person.get_at_show_name}', email: '#{person.mail}'};"
|
||||
ss += "var o = {id: #{index}, name: '#{person.show_name}', login: '#{person.login}', searchKey: '#{person.get_at_show_name}'};"
|
||||
ss += "atPersonLists.push(o);"
|
||||
end
|
||||
|
||||
|
|
|
@ -27,8 +27,9 @@ function enableAt(_editor) {
|
|||
var at_config = {
|
||||
at: "@",
|
||||
data: names,
|
||||
insertTpl: '@${name}',
|
||||
displayTpl: "<li>${name} <small>${email}</small></li>",
|
||||
insertTpl: '<span style="color:#269ac9">@${name}(${login})</span>',
|
||||
displayTpl: "<li>${name} <small>${login}</small></li>",
|
||||
searchKey: 'searchKey',
|
||||
limit: 200
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue