Signed-off-by: alan <547533434@qq.com>

redis_cache
alan 10 years ago
parent 8a52225f4d
commit 0708279c5e

@ -40,12 +40,10 @@
<p class="talkmain_tit fl fb break_word">&nbsp;&nbsp;<%= h(topic.subject) %></p> <p class="talkmain_tit fl fb break_word">&nbsp;&nbsp;<%= h(topic.subject) %></p>
<% if topic.course_editable_by?(User.current) %> <% if topic.course_editable_by?(User.current) %>
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: left; <a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
margin-left: 20px;"><%= l(:button_edit) %></a> margin-right: 10px;"><%= l(:button_edit) %></a>
<% end %>
<% if topic.sticky? %>
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
<% end %> <% end %>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
@ -55,7 +53,9 @@
:style => ' margin-right: 10px;' :style => ' margin-right: 10px;'
) if topic.destroyable_by?(User.current) %> ) if topic.destroyable_by?(User.current) %>
<% if topic.sticky? %>
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
<% end %>
<div class="cl"></div> <div class="cl"></div>
<script> <script>
@ -63,7 +63,7 @@
</script> </script>
<div class="project_board_content break_word" id="content_<%=topic.id%>"> <div class="project_board_content break_word" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img"> <div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content %> <%= topic.content.html_safe %>
</div> </div>
</div> </div>

@ -12,7 +12,7 @@
} do |f| %> } do |f| %>
<%= render :partial => 'form_project', <%= render :partial => 'form_project',
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %> :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
<a href="#" onclick="submitProjectsBoard('#message-form<%= topic.id%>');" class="blue_btn fl c_white" ><%= l(:button_submit)%></a> <a href="javascript:void(0)" onclick="submitProjectsBoard('<%= topic.id%>');" class="blue_btn fl c_white" ><%= l(:button_submit)%></a>
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" class="blue_btn grey_btn fl c_white"><%= l(:button_cancel) %></a> <a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" class="blue_btn grey_btn fl c_white"><%= l(:button_cancel) %></a>
<%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %> <%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %>
</ul> </ul>
@ -31,7 +31,7 @@
} do |f| %> } do |f| %>
<%= render :partial => 'form_course', <%= render :partial => 'form_course',
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %> :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
<a href="javascript:void(0)" onclick="$('#message-form<%= topic.id%>').submit();"class="blue_btn fl c_white"><%= l(:button_submit)%></a> <a href="javascript:void(0)" onclick="submitProjectsBoard('<%= topic.id%>');"class="blue_btn fl c_white"><%= l(:button_submit)%></a>
<%= link_to l(:button_cancel), board_message_url(topic.board,topic.root, :r => (topic.parent_id &&topic.id)), :class => "blue_btn grey_btn fl c_white" %> <%= link_to l(:button_cancel), board_message_url(topic.board,topic.root, :r => (topic.parent_id &&topic.id)), :class => "blue_btn grey_btn fl c_white" %>
<% end %> <% end %>

@ -145,6 +145,7 @@ $(function(){
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////项目讨论区 //////////////////////////////////////////////////////////////项目讨论区
function regexSubject(id) { function regexSubject(id) {
var subjectid = "#message_subject" + id ; var subjectid = "#message_subject" + id ;
var content = $.trim($(subjectid).val()); var content = $.trim($(subjectid).val());
var message = "#subject_span" + id; var message = "#subject_span" + id;
@ -183,6 +184,7 @@ function regexContent(id) {
// 项目讨论区编辑和提交 // 项目讨论区编辑和提交
function submitProjectsBoard(id) { function submitProjectsBoard(id) {
var formid = "#message-form" + id; var formid = "#message-form" + id;
if (regexSubject(id) && regexContent(id)) { if (regexSubject(id) && regexContent(id)) {
$(formid).submit(); $(formid).submit();
} }

Loading…
Cancel
Save