+ <% if replying%>
+
+ <%= f.text_area :content,
+ :width => '89%',
+ :height => 300,
+ :id => "message_content#{f.object.id}",
+ :aa => 'content',
+ :onkeyup => "regexContent('#{f.object.id}');",
+ :class => 'talk_text fl',
+ :placeholder => "最多3000个汉字(或6000个英文字符)",
+ :maxlength => 5000 %>
+
+ <% else %>
+ <%= f.text_area :content,
+ :width => '90%',
+ :height => 300,
+ :class => 'talk_text fl',
+ :editor_id => "message_content#{f.object.id}_edit",
+ :id => "message_content#{f.object.id}",
+ :onkeyup => "regexContent('#{f.object.id}');",
+ :class => 'talk_text fl',
+ :aa => 'content',
+ :placeholder => "最多3000个汉字(或6000个英文字符)",
+ :maxlength => 5000 %>
+
+ <% end %>
+
<% if replying%>
@@ -59,7 +59,7 @@
:width => '89%',
:height => 300,
:id => "message_content#{f.object.id}",
- :name => 'content',
+ :aa => 'content',
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
:placeholder => "最多3000个汉字(或6000个英文字符)",
@@ -74,7 +74,7 @@
:id => "message_content#{f.object.id}",
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
- :name => 'content',
+ :aa => 'content',
:placeholder => "最多3000个汉字(或6000个英文字符)",
:maxlength => 5000 %>
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb
index 9a10d123d..48598f412 100644
--- a/app/views/boards/_project_show.html.erb
+++ b/app/views/boards/_project_show.html.erb
@@ -22,7 +22,7 @@
-
+
<%= render :partial => 'project_new_topic' %>
@@ -60,17 +60,17 @@
<% end %>
- <%= topic.content %>
+ <%= topic.content.html_safe %>
-
+ [展开]
@@ -99,7 +99,7 @@
<% if !topic.locked? && authorize_for('messages', 'reply') %>
-
+
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
@@ -200,7 +200,7 @@
<%if replies_all.first %>
-
+
<% end %>
<% end %>
@@ -238,33 +238,32 @@
}
-
\ No newline at end of file
+
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index 16f2998ce..ed49f0adb 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -59,7 +59,7 @@ function show_newtalk()
function show_newtalk1(id)
{
$(id).toggle();
-
+ $(id).focus();
}
@@ -67,6 +67,7 @@ function show_newtalk1(id)
+
<% if @project %>
<%= render :partial => 'project_show', locals: {project: @project} %>
<% elsif @course %>
diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb
index e6f795722..89405b8ab 100644
--- a/app/views/stores/index.html.erb
+++ b/app/views/stores/index.html.erb
@@ -24,10 +24,12 @@
+ <% if @str_arr.shift == @str_arr[2]%>
<% k.each do |c1|%>
- <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
+
+ <%= link_to_attachment c1, {:download => true}%>
<%= c1.downloads %>
@@ -37,6 +39,23 @@
<% end -%>
+ <%else%>
+ <% k.each do |c1|%>
+
+
+ <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
+
+
+
+ <%= c1.downloads %>
+
+
+ <%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
+
+
+ <% end -%>
+
+ <% end %>
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 227048ef6..025b51ee1 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -546,40 +546,40 @@ function search_tag_attachment(url,tag_name,q,course_id,sort)
// 课程讨论区
function showhelpAndScrollToMessage(id, id1, count) {
$('#' + id).toggle();
- if(cookieget("repositories_visiable") == "true")
- {
- cookiesave("repositories_visiable", false,'','','');
+ if (cookieget("repositories_visiable") == "true") {
+ cookiesave("repositories_visiable", false, '', '', '');
}
- else
- {
- cookiesave("repositories_visiable", true,'','','');
+ else {
+ cookiesave("repositories_visiable", true, '', '', '');
}
var information = $(id1);
var val = information.attr("value");
- if(val=="show_help")
- {
- $(id1).text("收起回复(" + count + ")" );
+ if (val == "show_help") {
+ $(id1).text("收起回复(" + count + ")");
information.attr("value", "hide_help");
+ information.attr("style", "color:#3ca5c6");
}
- else
- {
+ else {
$(id1).text("展开回复(" + count + ")");
information.attr("value", "show_help");
- }
-}
-function show_more_reply(contentid, id2, id3) {
- $(contentid).toggleClass("course_description_none");
- var information = $(id2);
- var arrow = $(id3);
- var val = information.attr("value");
- if (val == "show_more") {
- $(id2).text("[收起]");
- information.attr("value", "hide_more");
- arrow.attr("src", "/images/jiantouup.jpg")
- }
- else {
- $(id2).text("[展开]");
- information.attr("value", "show_more");
- arrow.attr("src", "/images/jiantou.jpg")
- }
-}
\ No newline at end of file
+ information.attr("style", "color:#0781b4;");
+ }
+}
+ function show_more_reply(contentid, id2, id3) {
+ $(contentid).toggleClass("course_description_none");
+ var information = $(id2);
+ var arrow = $(id3);
+ var val = information.attr("value");
+ if (val == "show_more") {
+ $(id2).text("[收起]");
+ information.attr("value", "hide_more");
+ information.attr("style", "color:#3ca5c6");
+ arrow.attr("src", "/images/jiantouup.jpg")
+ }
+ else {
+ $(id2).text("[展开]");
+ information.attr("value", "show_more");
+ arrow.attr("src", "/images/jiantou.jpg")
+ information.attr("style", "color:#0781b4;");
+ }
+ }
\ No newline at end of file
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index 481755410..3611fe380 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -67,12 +67,14 @@ function show_more_reply(contentid, id2, id3) {
if (val == "show_more") {
$(id2).text("[收起]");
information.attr("value", "hide_more");
+ information.attr("style", "color:#3ca5c6");
arrow.attr("src", "/images/jiantouup.jpg")
}
else {
$(id2).text("[展开]");
information.attr("value", "show_more");
arrow.attr("src", "/images/jiantou.jpg")
+ information.attr("style", "color:#0781b4;");
}
}
@@ -116,11 +118,13 @@ function showhelpAndScrollToMessage(id, id1, count) {
{
$(id1).text("收起回复(" + count + ")" );
information.attr("value", "hide_help");
+ information.attr("style", "color:#3ca5c6");
}
else
{
$(id1).text("展开回复(" + count + ")");
information.attr("value", "show_help");
+ information.attr("style", "color:#0781b4;");
}
}
diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css
index c7905fb80..53d382f20 100644
--- a/public/stylesheets/leftside.css
+++ b/public/stylesheets/leftside.css
@@ -45,7 +45,7 @@ a:hover.subnav_green{ background:#14ad5a;}
/*简介*/
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
-.project_board_content{overflow: hidden;max-height: 55px;word-break: break-all;word-wrap: break-word;}
+.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css
index 6554db7ec..a8d4409e3 100644
--- a/public/stylesheets/pleft.css
+++ b/public/stylesheets/pleft.css
@@ -49,7 +49,7 @@ a:hover.subnav_green{ background:#14ad5a;}
/*简介*/
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
-.project_board_content{overflow: hidden;max-height: 55px;word-break: break-all;word-wrap: break-word;}
+.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}