|
|
|
@ -1,3 +1,34 @@
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
// var flag = false;
|
|
|
|
|
// jQuery(document).ready(function($) {
|
|
|
|
|
// transpotUrl('#content');
|
|
|
|
|
// });
|
|
|
|
|
// function submit_message_replay()
|
|
|
|
|
// {
|
|
|
|
|
// regexContent();//onkeyup传给kindeditor用不上了,所以只能放在这里
|
|
|
|
|
// if(flag)
|
|
|
|
|
// {
|
|
|
|
|
// message_content_editor.sync();//提交内容之前要sync,不然服务器端取不到值
|
|
|
|
|
// $("#message_form").submit();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// function regexContent()
|
|
|
|
|
// {
|
|
|
|
|
// var content = message_content_editor.html();//$.trim($("#message_content").val());
|
|
|
|
|
// if(content.length ==0)
|
|
|
|
|
// {
|
|
|
|
|
// $("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
|
|
|
|
// $("#message_content_span").css('color','#ff0000');
|
|
|
|
|
// flag = false;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// $("#message_content_span").text("<%= l(:label_field_correct) %>");
|
|
|
|
|
// $("#message_content_span").css('color','#008000');
|
|
|
|
|
// flag = true;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
</script>
|
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<h2 class="project_h2"><%= l(:label_board) %></h2>
|
|
|
|
|
</div>
|
|
|
|
@ -24,7 +55,7 @@
|
|
|
|
|
:class => 'talk_edit fr'
|
|
|
|
|
) if @message.course_destroyable_by?(User.current) %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="talk_info mb10"><%= textilizable(@topic, :content) %></div>
|
|
|
|
|
<div class="talk_info mb10"><%= textAreailizable(@topic, :content) %></div>
|
|
|
|
|
<div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div>
|
|
|
|
|
<!-- <a href="#" class=" link_file ml60">附件:爱覅俄方if.zip(27.5kB)</a>-->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
@ -52,7 +83,7 @@
|
|
|
|
|
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
|
|
|
|
|
<span class="c_grey fr"><%= format_time(message.created_on) %></span>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<p><%= textilizable message,:content,:attachments => message.attachments %></p>
|
|
|
|
|
<p><%= textAreailizable message,:content,:attachments => message.attachments %></p>
|
|
|
|
|
<%= link_to_attachments_course message, :author => false %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ping_disfoot">
|
|
|
|
@ -87,7 +118,7 @@
|
|
|
|
|
<div id="reply" style="display:none;">
|
|
|
|
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
|
|
|
|
<%= render :partial => 'form_course', :locals => {:f => f, :replying => true} %>
|
|
|
|
|
<a href="#" onclick="submit_message_replay();"class="blue_btn fl c_white" style="margin-left: 50px;"><%= l(:button_submit)%></a>
|
|
|
|
|
<%= link_to l(:button_submit),"#",:onclick => 'course_board_submit_message_replay();' ,:class => "blue_btn fl c_white" ,:style=>"margin-left: 50px;"%>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -97,32 +128,3 @@
|
|
|
|
|
</ul>
|
|
|
|
|
<% html_title @topic.subject %>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var flag = false;
|
|
|
|
|
jQuery(document).ready(function($) {
|
|
|
|
|
transpotUrl('#content');
|
|
|
|
|
});
|
|
|
|
|
function submit_message_replay()
|
|
|
|
|
{
|
|
|
|
|
if(flag)
|
|
|
|
|
{
|
|
|
|
|
$("#message_form").submit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function regexContent()
|
|
|
|
|
{
|
|
|
|
|
var content = $.trim($("#message_content").val());
|
|
|
|
|
if(content.length ==0)
|
|
|
|
|
{
|
|
|
|
|
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
|
|
|
|
$("#message_content_span").css('color','#ff0000');
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
|
|
|
|
$("#message_content_span").css('color','#008000');
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|