diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb index fba80127b..a380ad67f 100644 --- a/app/views/boards/_course_new.html.erb +++ b/app/views/boards/_course_new.html.erb @@ -3,7 +3,7 @@ <%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %>
讨论区共有<%= @topic_count %>个帖子
<% if @topics.any? %> <% @topics.each do |topic| %> -<%= e.event_description.html_safe %>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 972606f31..f3c453019 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -66,9 +66,7 @@
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> :
<%= link_to format_activity_title("#{act.board.name}: #{act.subject}"),
- {:controller => 'messages',
- :action => 'show',
- :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}),
+ project_boards_path(@project,:topic_id => act.id),
:class => "problem_tit fl fb " %>
<%= textAreailizable act,:content %>
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index f0b1338da..227048ef6 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -151,45 +151,48 @@ function submit_edit_course(id)
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////课程讨论区
-function regexSubject()
-{
- var content = $.trim($("#message_subject").val());
- if(content.length ==0)
- {
- $("#subject_span").text("主题不能为空");
- $("#subject_span").css('color','#ff0000');
+function regexSubject(id) {
+ var subjectid = "#message_subject" + id ;
+ var content = $.trim($(subjectid).val());
+ var message = "#subject_span" + id;
+ if (content.length == 0) {
+ $(message).text("主题不能为空");
+ $(message).css('color', '#ff0000');
return false;
}
- else
- {
- $("#subject_span").text("填写正确");
- $("#subject_span").css('color','#008000');
+ else {
+ $(message).text("填写正确");
+ $(message).css('color', '#008000');
return true;
}
return false;
}
-function regexContent()
-{
- var content = message_content_editor.html();
- if(content.length ==0)
- {
- $("#message_content_span").text("描述不能为空");
- $("#message_content_span").css('color','#ff0000');
+function regexContent(id) {
+ var contentid = "#message_content" + id;
+ var message = "#message_content_span"+ id;
+ var content = $.trim($(contentid).val());
+ if (content.length == 0) {
+ $(message).text("描述不能为空");
+ $(message).css('color', '#ff0000');
return false;
}
- else
- {
- $("#message_content_span").text("填写正确");
- $("#message_content_span").css('color','#008000');
+ else {
+ $(message).text("填写正确");
+ $(message).css('color', '#008000');
return true;
}
return false;
}
-function submitCoursesBoard()
-{
- message_content_editor.sync();
- if(regexSubject()&®exContent()){$("#message-form").submit();}
+
+// 项目讨论区编辑和提交
+function submitProjectsBoard(id) {
+ var formid = "#message-form" + id;
+ if (regexSubject(id) && regexContent(id)) {
+ $(formid).submit();
+ }
}
+
+
///////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////// 课程通知
function regexTitle()
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index 0bc094b1d..c28a86f08 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -144,42 +144,49 @@ $(function(){
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////项目讨论区
-function regexSubject() {
- var content = $.trim($("#message_subject").val());
+function regexSubject(id) {
+ var subjectid = "#message_subject" + id ;
+ var content = $.trim($(subjectid).val());
+ var message = "#subject_span" + id;
if (content.length == 0) {
- $("#subject_span").text("主题不能为空");
- $("#subject_span").css('color', '#ff0000');
+ $(message).text("主题不能为空");
+ $(message).css('color', '#ff0000');
return false;
}
else {
- $("#subject_span").text("填写正确");
- $("#subject_span").css('color', '#008000');
+ $(message).text("填写正确");
+ $(message).css('color', '#008000');
return true;
}
return false;
}
-function regexContent() {
- var content = $.trim($("#message_content").val());
+function regexContent(id) {
+
+ var contentid = "#message_content" + id;
+ var message = "#message_content_span"+ id;
+ var content = $.trim($(contentid).val());
if (content.length == 0) {
- $("#message_content_span").text("描述不能为空");
- $("#message_content_span").css('color', '#ff0000');
+
+ $(message).text("描述不能为空");
+ $(message).css('color', '#ff0000');
return false;
}
else {
- $("#message_content_span").text("填写正确");
- $("#message_content_span").css('color', '#008000');
+
+ $(message).text("填写正确");
+ $(message).css('color', '#008000');
return true;
}
return false;
}
// 项目讨论区编辑和提交
-function submitProjectsBoard() {
- if (regexSubject() && regexContent()) {
- $("#message-form").submit();
+function submitProjectsBoard(id) {
+ var formid = "#message-form" + id;
+ if (regexSubject(id) && regexContent(id)) {
+ $(formid).submit();
}
}
-
// 提交新闻
function regexTitle() {
var name = $("#news_title").val();
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 14a7a9a34..3b04e23bf 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -738,6 +738,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
.Replybox{ float:left; width:495px; margin-left:5px;}
.talk_nextpage{ border:none; width:410px; margin:0 auto;}
.newtalk { margin-top:8px; margin-right:8px;}
-.talk_new{ border-bottom:1px dashed #d9d9d9; padding-bottom:10px;}
+
#about_newtalk{ display:none;}