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