|
|
|
@ -16,7 +16,7 @@
|
|
|
|
|
<!-- 发布新帖部分 -->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class=" talklist_box" >
|
|
|
|
|
<div class="talk_new ml15 mb10" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;" >
|
|
|
|
|
<div class="talk_new ml15 mb10" name="container_board" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;" >
|
|
|
|
|
<ul>
|
|
|
|
|
<%= render :partial => 'course_new' %>
|
|
|
|
|
</ul>
|
|
|
|
@ -40,7 +40,7 @@
|
|
|
|
|
|
|
|
|
|
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
|
|
|
|
<% if topic.course_editable_by?(User.current) %>
|
|
|
|
|
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
|
|
|
|
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
|
|
|
|
margin-right: 10px;"><%= l(:button_edit) %></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
@ -59,7 +59,7 @@
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(function(){if($("#contentmessage<%=topic.id %>").height()>55){$("#project_show_<%= topic.id%>").show();}});
|
|
|
|
|
$(function(){if($("#contentmessage<%=topic.id %>").height()>182){$("#project_show_<%= topic.id%>").show();}});
|
|
|
|
|
</script>
|
|
|
|
|
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
|
|
|
|
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
|
|
|
@ -70,7 +70,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p style="display: none" id="project_show_<%= topic.id%>">
|
|
|
|
|
<label id="expend_more_information<%= topic.id%>" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</label>
|
|
|
|
|
<a id="expend_more_information<%= topic.id%>" href="javascript:(0)" style="color: #0781b4;" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</a>
|
|
|
|
|
<span class="g-arr-down">
|
|
|
|
|
<img id="arrow<%=topic.id%>" src="/images/jiantou.jpg" width="12" height="6" />
|
|
|
|
|
</span>
|
|
|
|
@ -87,7 +87,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><!--讨论主类容 end-->
|
|
|
|
|
<div class="talk_new ml15 mb10" id="about_newtalk<%=topic.id%>" style="display: none">
|
|
|
|
|
<div class="talk_new ml15 mb10" id="about_newtalk<%=topic.id%>" style="display: none">
|
|
|
|
|
<ul>
|
|
|
|
|
<%= render :partial => 'edit',locals: {:topic => topic} %>
|
|
|
|
|
</ul>
|
|
|
|
@ -97,12 +97,12 @@
|
|
|
|
|
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
|
<em class="talkWrapArrow"></em>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="talkConIpt ml15 mb10" style="display: none" id="reply<%= topic.id %>">
|
|
|
|
|
<div class="talkConIpt ml15 mb10" style="display: none" id="reply<%= topic.id %>" name="container_board">
|
|
|
|
|
<%= 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} do |f| %>
|
|
|
|
|
|
|
|
|
|
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
|
|
|
|
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
|
|
|
|
|
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
|
|
|
|
<a href="javascript:(0)" name="submitbtn" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -176,7 +176,7 @@
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<%if replies_all.first %>
|
|
|
|
|
<div class="talkWrapMsg"><a class=" ml258" id="showgithelp<%= topic.id%>" value="show_help" onclick ="showhelpAndScrollToMessage('talkWrapMsg<%= topic.id %>','#showgithelp<%= topic.id%>','<%=topic.replies_count%>'); " class="c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
|
|
|
|
<div class="talkWrapMsg"><a class=" ml258" href="javascript:(0)" id="showgithelp<%= topic.id%>" value="show_help" onclick ="showhelpAndScrollToMessage('talkWrapMsg<%= topic.id %>','#showgithelp<%= topic.id%>','<%=topic.replies_count%>'); " class="c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
@ -196,3 +196,32 @@
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
|
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@course}: #{@board}") %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
//submitProjectsBoard()
|
|
|
|
|
KindEditor.ready(function(K){
|
|
|
|
|
$("div[name='container_board']").each(function(){
|
|
|
|
|
var container=$(this);
|
|
|
|
|
|
|
|
|
|
var textarea= $("textarea[aa='content']",container);
|
|
|
|
|
var editor = K.create(textarea, {
|
|
|
|
|
resizeType : 1,
|
|
|
|
|
allowPreviewEmoticons : false,
|
|
|
|
|
allowImageUpload : false,
|
|
|
|
|
width:"89%",
|
|
|
|
|
items : ['emoticons']
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("a[name='submitbtn']",container).click(function(){
|
|
|
|
|
textarea[0].value = editor.html();
|
|
|
|
|
var id = textarea[0].id.toString().substr(15);
|
|
|
|
|
|
|
|
|
|
if(this.parentNode.name == 'message-form') {
|
|
|
|
|
this.parentNode.submit();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.parentNode.parentNode.submit();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|