From b971147aa8cd949b7dc6d76704035a39a204e2d6 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 3 Apr 2015 15:01:26 +0800 Subject: [PATCH 01/22] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=BC=9Aalert=202=E3=80=81=E6=B7=BB=E5=8A=A0=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=8F=8F=E8=BF=B0=E6=A0=B7=E5=BC=8F=203=E3=80=81?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=B7=BB=E5=8A=A0=E8=AF=84=E8=AE=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_form.html.erb | 2 +- app/views/news/_course_show.html.erb | 3 +-- public/javascripts/course.js | 3 +-- public/stylesheets/courses.css | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb index 5c0fc8274..b8b3e36a4 100644 --- a/app/views/news/_course_form.html.erb +++ b/app/views/news/_course_form.html.erb @@ -4,7 +4,7 @@
-+
<%= l(:label_cancel_with_space) %> <%= l(:label_comment_with_space) %> -
<% end %> diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 3536478a8..d6e8cf0ff 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -200,9 +200,8 @@ function regexDescription() } } -function submitNews(is_new) +function submitNews() { - alert(is_new) if(regexTitle() && regexDescription()) { news_description_editor.sync(); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 6053940d6..c0458e503 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -175,7 +175,7 @@ a:hover.work_edit{color: #fff; background: #64bdd9;} .wzan a{ display: block;} a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;} a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;} -.msg_box{ width:670px; height:173px; border-bottom:1px dashed #CCC; padding-top:10px;} +.msg_box{ width:670px; height:200px; border-bottom:1px dashed #CCC; padding-top:10px;} .msg_box h4{ } .msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; } /*.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; padding-top:3px; color:#fff; margin-left:10px; text-align:center; margin-top:5px; }*/ From 500b54a46617a9078ee3d88f6b08a834a39fb3d8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 3 Apr 2015 15:39:24 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E5=BC=95=E7=94=A8=E6=98=AFhtml=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 11 +---------- app/views/memos/quote.js.erb | 2 +- app/views/messages/quote.js.erb | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 2ad388f41..4c44b6ddb 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -189,16 +189,7 @@ class MessagesController < ApplicationController @content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " @temp = Message.new - #@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> " - @content << @message.content.to_s.strip.gsub(%r{((.|\s)*?)}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" - @content_html = textilizable(@content) - @temp.content = @content_html - #@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}
((.|\s)*?)}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "\n\n
" << @content - #@temp = Message.new - #@temp.content = @content - + @temp.content = "#{@message.content.html_safe}".html_safe end def preview diff --git a/app/views/memos/quote.js.erb b/app/views/memos/quote.js.erb index d2e8c1d17..b3d860916 100644 --- a/app/views/memos/quote.js.erb +++ b/app/views/memos/quote.js.erb @@ -1,4 +1,4 @@ //ckeditor.setData("<%= raw escape_javascript(@content) %>"); -$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>"); +$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>"); $('#quote').val("<%= raw escape_javascript(@content) %>"); showAndScrollTo("new_memo", "cke_editor01"); \ No newline at end of file diff --git a/app/views/messages/quote.js.erb b/app/views/messages/quote.js.erb index f8ec37d75..3d8fe7237 100644 --- a/app/views/messages/quote.js.erb +++ b/app/views/messages/quote.js.erb @@ -1,5 +1,5 @@ $('#message_subject').val("<%= raw escape_javascript(@subject) %>"); -$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>"); +$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>"); //$('#message_content').val("<#%= raw escape_javascript(@content) %>"); $('#quote_quote').html("<%= raw escape_javascript(@content) %>"); From 42124e8ec594100300f9975473563903de95096e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 3 Apr 2015 15:54:58 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E5=BC=80=E5=90=AF=E3=80=81=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=8C=BF=E8=AF=84=E6=98=AF=E6=9C=89=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index be97fdb6e..21b3cc531 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -1035,11 +1035,12 @@ class BidsController < ApplicationController def alert_anonymous_comment @bid = Bid.find params[:id] @course = @bid.courses.first + @cur_size = 0 + @totle_size = 0 if @bid.comment_status == 0 @totle_size = searchStudent(@course).size @cur_size = @bid.homeworks.size elsif @bid.comment_status == 1 - @totle_size = 0 @bid.homeworks.map { |homework| @totle_size += homework.homework_evaluations.count} @cur_size = 0 @bid.homeworks.map { |homework| @cur_size += homework.rates(:quality).where("seems_rateable_rates.is_teacher_score = 0").count} From 0bea5dbb4eac740fd23e6ef1618ea4f22666373b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 7 Apr 2015 15:45:39 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=A0=87=E9=A2=98a=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index c0458e503..c60fca5cc 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -55,7 +55,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;} .problem_txt{ width:610px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;} a.problem_name{ color:#ff5722;} a:hover.problem_name{ color:#d33503;} -a.problem_tit{ color:#0781b4; width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a.problem_tit{ color:#0781b4; max-width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a:hover.problem_tit{ color:#09658c; } .problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} /****翻页***/ From 60838460fc245ed81793c4b6dc07d7fa75945f96 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 7 Apr 2015 16:32:53 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=8A=A8=E6=80=81=E4=B9=9F=E8=A6=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 7c1f14104..73cf4452d 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -373,6 +373,16 @@ class CoursesService unless latest_bid.nil? latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))} end + + # Time 2015-04-07 14:58:30 + # Author lizanle + # Description 添加课程创建动态 + if(User.find_by_id(CourseInfos.find_by_course_id(course.id).try(:user_id))) + create_user_name = User.find_by_id(CourseInfos.find_by_course_id(course.id).user_id).realname + latest_course_dynamics << {:type => 5,:time => course.created_at,:message =>l(:label_recently,:locale => get_user_language(current_user)) << create_user_name << l(:label_creat,:locale => get_user_language(current_user))} + end + + #每个作业中的最新留言 messages = [] course.homeworks.each do |bid| From cc6a9d12f1d6fb7f7db9c692f81bdc411789c1a8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 09:46:05 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E6=98=8E=E7=A0=81=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 68a326fb2..73e86c5a0 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -38,7 +38,7 @@- 显示明码 + 显示明码 学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。 From ba4894239cc2120a1d8e81d2b68a62efa22418e8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 11:29:21 +0800 Subject: [PATCH 07/22] =?UTF-8?q?1=E3=80=81=E9=83=A8=E5=88=86=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E4=B8=8B=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=86=E7=A0=81=E9=BB=98=E8=AE=A4=E5=A1=AB?= =?UTF-8?q?=E5=86=99=EF=BC=8C=E8=AF=BE=E6=97=B6=E9=BB=98=E8=AE=A4=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E4=B8=BA=E7=99=BB=E5=BD=95=E5=90=8D=202=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B=E5=AF=86=E7=A0=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=8F=96=E6=B6=88=E6=98=8E=E7=A0=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/new.html.erb | 16 ++-------------- app/views/courses/settings.html.erb | 3 ++- public/javascripts/course.js | 6 ++++++ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 73e86c5a0..0ea51d5f4 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -1,16 +1,3 @@ - - -@@ -37,7 +24,8 @@<%= l(:permission_new_course)%>
- + + 显示明码 学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。 diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 569ae302b..acc6c12a5 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -39,7 +39,8 @@ - + + 显示明码 学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。 diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 5248d31dd..286905017 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -410,3 +410,9 @@ function regexDeadLine() { ('#ui-datepicker-div').hide; } + +$(function(){ + $("#psw_btn").click(function() { + alert("密码: "+$("#course_course_password").val()); + }); +}); From 15567e7d7bf5163b1f106979fa1b679ce29e7956 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 14:14:44 +0800 Subject: [PATCH 08/22] =?UTF-8?q?1=E3=80=81=E6=96=B0=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=B5=B7=E6=9C=AA=E5=AF=B9=E5=85=B6=202=E3=80=81?= =?UTF-8?q?=E8=80=81=E5=B8=88=E6=96=B0=E5=BB=BA=E4=BD=9C=E4=B8=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0marting-bottom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_new_homework_form.html.erb | 2 +- .../vendor/assets/javascripts/kindeditor/kindeditor.js | 2 +- public/assets/kindeditor/kindeditor.js | 2 +- public/stylesheets/courses.css | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index 505fc88a8..129bcec5e 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -11,7 +11,7 @@
- <%= l(:label_cancel_with_space) %> - <%= l(:label_comment_with_space) %> + + <%= l(:label_cancel_with_space) %> + + + <%= l(:label_comment_with_space) %> +
<% end %><%= textAreailizable(comment.comments) %>
+<%= comment.comments.html_safe %>
#{@message.content.html_safe}".html_safe + @temp.content = "
#{ll(Setting.default_language, :text_user_wrote, @message.author)}".html_safe end def preview diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c94108dc1..f36e4b397 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -303,7 +303,7 @@ module ApplicationHelper onclick = "$('##{id}').slideToggle(); " onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ") onclick << "return false;" - link_to(name, "#", :onclick => onclick,:class => options[:class]) + link_to(name, "javascript:void(0)", :onclick => onclick,:class => options[:class]) end def image_to_function(name, function, html_options = {}) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index c27546e85..ed2c20448 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -1,13 +1,7 @@ -
#{@message.content.html_safe}