|
|
|
@ -181,15 +181,38 @@
|
|
|
|
|
<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', :locals => {:f => f, :replying => true} %>
|
|
|
|
|
<%= submit_tag l(:button_submit) %>
|
|
|
|
|
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
|
|
|
|
<input type="button" class="enterprise" value="<%=l(:button_submit) %>" onclick="submit_message_replay();" >
|
|
|
|
|
<% end %>
|
|
|
|
|
<div id="preview" class="wiki"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% 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>
|