Merge branch 'szzh' into develop
This commit is contained in:
commit
dfc9d89a3d
|
@ -101,8 +101,9 @@ class BoardsController < ApplicationController
|
|||
@topic_count = @board ? @board.topics.count : 0
|
||||
if @project
|
||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||
#现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC,
|
||||
@topics = @board.topics.
|
||||
reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
||||
reorder("#{Message.table_name}.created_on desc").
|
||||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
|
|
|
@ -51,9 +51,9 @@
|
|||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'talk_edit fr',
|
||||
:style => ' margin-right: 10px;') 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 %>
|
||||
<%# if topic.sticky? %>
|
||||
<!--<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%#= l(:label_board_sticky)%></a>-->
|
||||
<%# end %>
|
||||
<script>
|
||||
//$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}});
|
||||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
<span class="postEdit">
|
||||
</span>
|
||||
<a href="<%= edit_forum_path(@forum) %>" class="linkGrey3">编辑贴吧</a>
|
||||
<a href="<%= forum_path(@forum)%>" data-method="delete" onclick="return confirm('您确定要删除么?');" class="fr linkGrey3">删除贴吧</a>
|
||||
<a href="<%= forum_path(@forum)%>" data-method="delete" onclick="return confirm('您确定要删除么?');" class="fr linkGrey3">删除贴吧</a>
|
||||
<span class="postDelete"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -354,6 +354,25 @@ function limitStrsize(id,length){
|
|||
event.returnValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////创建项目
|
||||
//验证项目名称是不是为空
|
||||
function regex_project_name(){
|
||||
var name = $.trim($("#project_name").val());
|
||||
if(name=="")
|
||||
{
|
||||
$("#project_name_error_msg").text("项目名称不能为空");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_error_msg").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//验证项目名称是否重复---项目名称可以重复。。。。
|
||||
function regex_project_name_same(){
|
||||
var name = $.trim($("#project_name").val());
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue