From e10e5e8412be22d7f6378d83b9889e07735743af Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 09:50:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index f39eb8266..0baafd513 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -48,7 +48,7 @@ <% comments.each do |comment| %> <% next if comment.new_record? %>
-
<%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%>
+
<%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author), :class => "problem_pic fl"%>
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> From 069c1ddf3c1040f17cf022994bed89dc5fa34c5c Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 15:45:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=AF=84=E8=AE=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_show.html.erb | 5 +- app/views/users/_course_news_reply.html.erb | 177 ------------- app/views/users/show_chen.erb | 279 -------------------- public/javascripts/course.js | 19 +- 4 files changed, 20 insertions(+), 460 deletions(-) delete mode 100644 app/views/users/_course_news_reply.html.erb delete mode 100644 app/views/users/show_chen.erb diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index 0baafd513..9ae951779 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -32,7 +32,8 @@ <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
-

+

+

<%= l(:label_cancel_with_space) %> @@ -76,4 +77,4 @@ <% end %> -<% html_title @news.title -%> +<% html_title @news.title -%> \ No newline at end of file diff --git a/app/views/users/_course_news_reply.html.erb b/app/views/users/_course_news_reply.html.erb deleted file mode 100644 index c3f8571be..000000000 --- a/app/views/users/_course_news_reply.html.erb +++ /dev/null @@ -1,177 +0,0 @@ - -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> - -<% if @news.commentable? %> -

-

<%= l(:label_comment_add) %>

- <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %> -
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%> -
-

- - <%= l(:label_cancel_with_space) %> - - - <%= l(:label_comment_with_space) %> - -

- <% end %> -
-<% end %> - -
- - <%= form_for('new_form', :method => :post, - :url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - -

- <% end %> -
-
-
- 取  消 - - 发送 - -
-
- -
- - - - - diff --git a/app/views/users/show_chen.erb b/app/views/users/show_chen.erb deleted file mode 100644 index 3bd0014c6..000000000 --- a/app/views/users/show_chen.erb +++ /dev/null @@ -1,279 +0,0 @@ -
-
-
最新动态
- -
- -
-
- 用户头像
-
- - -
- -
截止时间:2015-08-20
-
-
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
- -
-
-
-
-
-
-
- 用户头像
-
- - -
- -
截止时间:2015-08-20
-
-
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
- -
-
-
-
- - - -
-
-
- 用户头像
-
- - -
- 时间:2015-07-31 -
-
- -
-
-
-
-
-
-
回复(5)
-
2015-07-31
- -
-
- -
-
- - - -
-
-
-
- 用户头像 -
-
-
黄井泉 学生 - 2015-08-01删除 -
-
很开心!
-
-
-
-
-
- 用户头像 -
-
-
陈正东 学生 - 2015-08-02删除 -
-
假期好热,没出去。
-
-
-
-
-
-
-
-
- 用户头像
-
- - -
-
指派给  苏稳 -
-
时间:2015-08-20
-
-
(缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-
- 文件附件.zip(123KB) -
-
- 图片附件.png(123KB) -
-
- -
-
-
-
-
-
-
回复(5)
-
2015-07-26
- -
-
- -
-
- - - -
-
-
-
- 用户头像 -
-
-
尹教授 - 2015-08-01删除 -
-
请大家说下软件工程是什么!
-
-
-
-
-
- 用户头像 -
-
-
Tang 学生 - 2015-08-01删除 -
-
软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
-
-
-
-
-
\ No newline at end of file diff --git a/public/javascripts/course.js b/public/javascripts/course.js index e5c50ac51..fc52ef87a 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -260,8 +260,23 @@ function submitFocus(obj) function submitComment() { - comment_editor.sync(); - $("#add_comment_form").submit(); + if (newsReplyVerify()) { + comment_editor.sync(); + $("#add_comment_form").submit(); + } +} + +function newsReplyVerify() { + var content = comment_editor.html(); + if(content.length == 0) { + $("#add_reply_news").text("评论不能为空"); + $("#add_reply_news").css('color', '#ff0000'); + return false; + } else { + $("#add_reply_news").text("填写正确"); + $("#add_reply_news").css('color', '#008000'); + return true; + } } /////////////////////////////////////////////////课程讨论区 From 0a2bfa1bdb013637d0383813acf4d0ed6ea9ea26 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 16:27:53 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=E7=BC=BA=E9=99=B7=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=B8=8E=E7=BC=BA=E9=99=B7=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E5=86=85=E5=AE=B9=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_issue.html.erb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index cdc310604..0413d6811 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -111,17 +111,14 @@ <% end %> <%= format_time(reply.created_on) %>
- <% if reply.details.any? %> - <% details_to_strings(reply.details).each do |string| %> -
- <%= string %> -
- <% end %> - <% else %> -
- <%= reply.notes.html_safe %> -
- <% end %> +
+ <% if reply.details.any? %> + <% details_to_strings(reply.details).each do |string| %> +

<%= string %>

+ <% end %> + <% end %> +

<%= reply.notes.html_safe %>

+
From fddf466ce1c1b3e80056f637234e3e8e0eed11f0 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 16 Sep 2015 09:45:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=B0=86=E5=8F=91=E5=B8=83=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=97=B6=E7=9A=84=E5=BC=95=E7=94=A8=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E2=80=9C=E7=A1=AE=E5=AE=9A=E2=80=9D=E2=80=9C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E2=80=9D=E6=8C=89=E9=92=AE=E6=94=B9=E6=88=90?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E6=8C=89=E9=92=AE=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_show_user_resource.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_show_user_resource.html.erb b/app/views/users/_show_user_resource.html.erb index a3c82d995..24d81a787 100644 --- a/app/views/users/_show_user_resource.html.erb +++ b/app/views/users/_show_user_resource.html.erb @@ -59,8 +59,8 @@
- - + 确定 + 取消
<% end %>