From 4ce9eb428efe2d6dcb31056d3dfcf13b8b31dec9 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 15 Dec 2015 16:28:11 +0800 Subject: [PATCH] =?UTF-8?q?at=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/issue.rb | 7 +++++++ public/assets/kindeditor/at/config.js | 2 +- public/assets/kindeditor/at/jquery.atwho.css | 1 + public/assets/kindeditor/kindeditor.js | 2 +- public/assets/kindeditor/plugins/code/previewcode.css | 3 ++- public/stylesheets/public.css | 2 ++ 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index edce3310a..11daf670f 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -156,6 +156,13 @@ class Issue < ActiveRecord::Base end end + # at 功能添加消息提醒 + def act_as_at_message + users = self.description.scan //m + ### xxx 在 xxx 中at了你 + + end + # 更新缺陷 #def act_as_forge_message_update # unless self.author_id == self.assigned_to_id diff --git a/public/assets/kindeditor/at/config.js b/public/assets/kindeditor/at/config.js index 669e63074..f26685f00 100644 --- a/public/assets/kindeditor/at/config.js +++ b/public/assets/kindeditor/at/config.js @@ -34,7 +34,7 @@ var enableAt = function(_editor) { var at_config = { at: "@", data: names, - insertTpl: '@${name}(${login})', + insertTpl: '@${name}(${login})', displayTpl: "
  • ${name} ${login}
  • ", searchKey: 'searchKey', limit: 200 diff --git a/public/assets/kindeditor/at/jquery.atwho.css b/public/assets/kindeditor/at/jquery.atwho.css index a07390887..4ad9fffd4 100644 --- a/public/assets/kindeditor/at/jquery.atwho.css +++ b/public/assets/kindeditor/at/jquery.atwho.css @@ -47,3 +47,4 @@ color: #777; font-weight: normal; } + diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index bf9cb26d8..6f8e489f8 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -282,7 +282,7 @@ K.options = { font : ['id', 'class', 'color', 'size', 'face', '.background-color'], span : [ 'id', 'class', '.color', '.background-color', '.font-size', '.font-family', '.background', - '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height' + '.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height', 'data-user-id' ], div : [ 'id', 'class', 'align', '.border', '.margin', '.padding', '.text-align', '.color', diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css index 8255edda1..c106a72f3 100644 --- a/public/assets/kindeditor/plugins/code/previewcode.css +++ b/public/assets/kindeditor/plugins/code/previewcode.css @@ -44,4 +44,5 @@ .ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;} -.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;} \ No newline at end of file +.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;} +span.at {color:#269ac9;} \ No newline at end of file diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index fa1767ad7..fc62c1429 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -912,3 +912,5 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r .list_style ol li{list-style-type: decimal;margin-left: 20px;} .list_style ul li{list-style-type: disc;margin-left: 20px;} +/* @功能 定义 */ +span.at {color:#269ac9;} \ No newline at end of file