From a3ce43c3d5c7ae8234b931e4e41050eca457927b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 29 Sep 2015 16:01:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=8E=E6=88=91?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/news_controller.rb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index d5c248f77..5d83c1320 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -175,19 +175,19 @@ class NewsController < ApplicationController update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS end # ������ض�̬�ļ�¼add start - teachers = searchTeacherAndAssistant(@course) - for teacher in teachers - if(teacher.user_id != User.current.id) - notify = ActivityNotify.new() - notify.activity_container_id = @course.id - notify.activity_container_type = 'Course' - notify.activity_id = @news.id - notify.activity_type = 'News' - notify.notify_to = teacher.user_id - notify.is_read = 0 - notify.save() - end - end + # teachers = searchTeacherAndAssistant(@course) + # for teacher in teachers + # if(teacher.user_id != User.current.id) + # notify = ActivityNotify.new() + # notify.activity_container_id = @course.id + # notify.activity_container_type = 'Course' + # notify.activity_id = @news.id + # notify.activity_type = 'News' + # notify.notify_to = teacher.user_id + # notify.is_read = 0 + # notify.save() + # end + # end # ������ض�̬�ļ�¼add end render_attachment_warning_if_needed(@news) flash[:notice] = l(:notice_successful_create) From 26624c8009f8b72b8416821670538334ceab4c3f Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Sep 2015 16:20:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A1=86=E7=9A=84=E2=80=9C=E6=88=91=E8=A6=81?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E2=80=9D=E7=9A=84=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/plugins/emoticons/emoticons.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/assets/kindeditor/plugins/emoticons/emoticons.js b/public/assets/kindeditor/plugins/emoticons/emoticons.js index c89e0c6ee..b9dfec431 100644 --- a/public/assets/kindeditor/plugins/emoticons/emoticons.js +++ b/public/assets/kindeditor/plugins/emoticons/emoticons.js @@ -13,7 +13,7 @@ KindEditor.plugin('emoticons', function(K) { allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons, currentPageNum = 1; self.clickToolbar(name, function() { - this.edit.focus();//Èç¹ûûÓÐÕâ¾ä »ðºüÏÂÈ¡²»µ½½¹µã µ¼ÖÂ_getSel()Ϊ¿Õ ±¨´í + this.edit.focus();//���û����� �����ȡ�������� ����_getSel()�� ���� var rows = 5, cols = 9, total = 135, startNum = 0, cells = rows * cols, pages = Math.ceil(total / cells), colsHalf = Math.floor(cols / 2), @@ -55,6 +55,9 @@ KindEditor.plugin('emoticons', function(K) { K(this).removeClass('ke-on'); }); cell.click(function(e) { + if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){ + self.edit.html(''); + } self.insertHtml('').hideMenu().focus(); e.stop(); }); From 1eac300fb769658d97aea4f68d6ef949c1c682be Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 29 Sep 2015 16:21:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 6c4aca02d..39e709beb 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -59,7 +59,6 @@ class Mailer < ActionMailer::Base @anonymous_comment_close_name = homework_common.name @author = homework_common.user #收件人邮箱 - recipients << user.mail end mail :to => recipients, @@ -98,10 +97,6 @@ class Mailer < ActionMailer::Base @anonymous_comment_fail_name = homework_common.name @author = homework_common.user #收件人邮箱 - puts "######################" - puts homework_common.id - puts recipients - puts "######################" recipients << user.mail end end