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 1/3] =?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 2/3] =?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 3/3] =?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}