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 01/11] =?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 3c01969db16ec49b0bd8142cbf57956782fbfad4 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 16:06:04 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BC=A9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/prettify.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/stylesheets/prettify.css b/public/stylesheets/prettify.css index c7d16ffd4..2e750f076 100644 --- a/public/stylesheets/prettify.css +++ b/public/stylesheets/prettify.css @@ -75,3 +75,7 @@ li.L9 { background: #eee } /*.prettyprint .dec,*/ /*.prettyprint .var { color: #A6E22E; }*/ /*.prettyprint .pln { color: #66D9EF; }*/ +.memo-content pre { + white-space:pre !important; + word-wrap: break-word; +} \ No newline at end of file From 9d122886a92afbd4f4081270ae8e5c286009a558 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 16:10:43 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E4=BC=9A=E5=88=A0=E9=99=A4=E8=B4=B4=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ From 26624c8009f8b72b8416821670538334ceab4c3f Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Sep 2015 16:20:35 +0800 Subject: [PATCH 04/11] =?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 05/11] =?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 From 38702dde642f4266532d2f3089e91dbac8f42be7 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 16:36:51 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=BA=90=E7=A0=81?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 645767e87..448585376 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -5031,7 +5031,7 @@ KEditor.prototype = { height : editHeight > 0 && _removeUnit(height) > self.minHeight ? editHeight : self.minHeight, src : editDiv, srcElement : self.srcElement, - designMode : self.designMode, + designMode : true, themesPath : self.themesPath, bodyClass : self.bodyClass, cssPath : self.cssPath, @@ -5063,9 +5063,9 @@ KEditor.prototype = { _bindTabEvent.call(self); _bindFocusEvent.call(self); edit.afterChange(function(e) { - if (!edit.designMode) { - return; - } +// if (!edit.designMode) { +// return; +// } self.updateState(); self.addBookmark(); //prettyPrint("",self.edit.doc.body); From b798c6747b14206f100dcf45b09351c43346b70f Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 16:40:55 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B4=B4=E5=90=A7=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=90=8D=E9=87=8D=E5=A4=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_forums.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 134dedb54..8201a2222 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -123,7 +123,7 @@ } }); - function del_confirm(){ + function del_forum_confirm(){ if(confirm('您确定要删除么?')){ $("#del_link").click(); } @@ -180,7 +180,7 @@ 编辑贴吧 - 删除贴吧 + 删除贴吧 <% end %> From 2c9e46fc7700b593877ec313f39431070e9a0f05 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 16:48:56 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E9=9D=A0=E5=B7=A6=200=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/prettify.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/prettify.css b/public/stylesheets/prettify.css index 2e750f076..f31e44610 100644 --- a/public/stylesheets/prettify.css +++ b/public/stylesheets/prettify.css @@ -43,7 +43,7 @@ pre li,ul,ol { } /* Specify class=linenums on a pre to get line numbering */ -ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px } /* IE indents via margin-left */ +ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px !important; } /* IE indents via margin-left */ li.L0, li.L1, li.L2, From 7cba1e5f76345eb4bb5f9b68267ffcbba5d87d3f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 29 Sep 2015 17:10:16 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=86=85=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E4=BD=9C=E4=B8=9A=E6=8C=89=E9=92=AE=E6=97=A0=E5=8F=8D?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/course.js | 94 ++++++++++++++++++++++------------ public/javascripts/new_user.js | 7 --- 2 files changed, 62 insertions(+), 39 deletions(-) diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 46a98ed6d..eeb11575a 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -410,22 +410,6 @@ function show_bid_dead_line(year,month,day,divname) + "

作品提交还剩:

"); } -//验证新建作业的名字 -function regex_homework_name() -{ - var name = $.trim($("#homework_name").val()); - - if(name=="") - { - $("#homework_name_span").text("名称不能为空"); - return false; - } - else - { - $("#homework_name_span").text(""); - return true; - } -} //处理迟交、缺评扣分 function check_late_penalty(id) @@ -579,22 +563,68 @@ function regex_evaluation_num(){ } //老师提交 新建/修改 作业 -//function submit_homework(id) -//{ -// if(!regex_homework_name()) -// { -// $("#homework_name").focus(); -// } -// else if(!regex_evaluation_num()) -// { -// $("#evaluation_num").focus(); -// } -// else -// { -// homework_description_editor.sync(); -// $("#"+id).submit(); -// } -//} +function submit_homework(id){ + if(!regex_homework_name()){ + $("#homework_name").focus(); + } + else if(!regex_homework_end_time()){ + $("#homework_end_time").focus(); + } + else if(!regex_course_id()){ + $("#course_id").focus(); + } + else{ + homework_description_editor.sync(); + $("#"+id).submit(); + } +} + +//验证新建作业的名字 +function regex_homework_name() +{ + var name = $.trim($("#homework_name").val()); + + if(name=="") + { + $("#homework_name_span").text("名称不能为空"); + return false; + } + else + { + $("#homework_name_span").text(""); + return true; + } +} +//验证截止时间 +function regex_homework_end_time() +{ + var name = $.trim($("#homework_end_time").val()); + if(name=="") + { + $("#homework_end_time_span").text("截止时间不能为空"); + return false; + } + else + { + $("#homework_end_time_span").text(""); + return true; + } +} + +//验证发送到课程 +function regex_course_id(){ + var course_id = $("#course_id").val(); + if(course_id == -1) + { + $("#homework_course_id_span").text("发布课程不能为空"); + return false; + } + else + { + $("#homework_course_id_span").text(""); + return true; + } +} function regexHomeworkCommonName() { diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 28fa9597f..be3119257 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -63,17 +63,10 @@ function submit_homework(id){ else if(!regex_homework_end_time()){ $("#homework_end_time").focus(); } - //else if(!regex_evaluation_start()){ - // $("#evaluation_start_time").focus() - //} - //else if(!regex_evaluation_end()){ - // $("#evaluation_end_time").focus() - //} else if(!regex_course_id()){ $("#course_id").focus(); } else{ - homework_description_editor.sync(); $("#"+id).submit(); } From 9f9b68ef2a9d43135af60c76b337f874e1388ad9 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 17:16:53 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E6=8A=A5500=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/_praise_tread.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/memos/_praise_tread.html.erb b/app/views/memos/_praise_tread.html.erb index 5850cf50a..258a265a2 100644 --- a/app/views/memos/_praise_tread.html.erb +++ b/app/views/memos/_praise_tread.html.erb @@ -7,7 +7,7 @@ <% 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 %> From 4386f3fddfb165865b9fb14c431d6312d35776f6 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 29 Sep 2015 17:29:44 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=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 --- public/stylesheets/new_user.css | 1 + public/stylesheets/prettify.css | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index ace5cb651..5949d44aa 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -798,6 +798,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re .postDetailWrap {width:580px; float:left;} .postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;} .postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;} +.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailReply { margin-top:28px; color:#888888; float:right;} diff --git a/public/stylesheets/prettify.css b/public/stylesheets/prettify.css index f31e44610..7979d061a 100644 --- a/public/stylesheets/prettify.css +++ b/public/stylesheets/prettify.css @@ -44,6 +44,10 @@ pre li,ul,ol { /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px !important; } /* IE indents via margin-left */ +.list_style ol li { + list-style-type: decimal; + margin-left: 10px; +} li.L0, li.L1, li.L2,