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) diff --git a/app/views/memos/_praise_tread.html.erb b/app/views/memos/_praise_tread.html.erb index 32b4a0ac0..5850cf50a 100644 --- a/app/views/memos/_praise_tread.html.erb +++ b/app/views/memos/_praise_tread.html.erb @@ -7,13 +7,13 @@ <% if @is_valuate.size > 0 %> <% @flag = @is_valuate.first.praise_or_tread %> <% if @flag == 1 %> - <%= get_praise_num(obj)%> + <%= get_praise_num(obj)%> <% end %> <% else %> <% if user_id == obj.author_id %> - <%= get_praise_num(obj)%> + <%= get_praise_num(obj)%> <% else %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index aaf5a5846..4224d0987 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -33,7 +33,7 @@ function del_confirm(){ if(confirm('确认删除么?')){ - $("#del_link").click(); + $("#del_memo_link").click(); }else{ } @@ -52,7 +52,7 @@
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('