贴吧的左侧导航栏样式调整,并调整新建贴吧提示样式

This commit is contained in:
daiao 2016-12-30 15:34:01 +08:00
parent a8d16a15de
commit 44acf1a383
2 changed files with 29 additions and 16 deletions

View File

@ -2,7 +2,7 @@
<li class="mb10 clear">
<label class="fl" style="width: 90px;text-align: right;">贴吧名称&nbsp;&nbsp;:&nbsp;</label>
<!--<input maxlength="80" class="postCreateInput" onfocus="hideError();" onblur="check_forum_name();" placeholder="输入贴吧名称" >-->
<%= f.text_field :name, :label => "", :name => "forum[name]", :id => "forum_name", :class => "issues_calendar_input fl", :style => "width:320px;height:28px;", :placeholder => "请输入贴吧名称最多50个字符", :onfocus => "$('#forum_name_error_tips').hide();" %>
<%= f.text_field :name, :label => "", :name => "forum[name]", :id => "forum_name", :onblur => "check_forum_name()", :class => "issues_calendar_input fl", :style => "width:320px;height:28px;", :placeholder => "请输入贴吧名称最多50个字符", :onfocus => "$('#forum_name_error_tips').hide();" %>
<!--<input type="text" name="forum[name]" id="forum_name" onfocus="$('#forum_name_error_tips').hide();" placeholder="请输入贴吧名称最多50个字符" class="issues_calendar_input fl" style="width:320px;height:28px;">-->
<div class="clear"></div>
<p class="c_red ml90" style="display: none" id="forum_name_error_tips"></p>
@ -22,12 +22,22 @@
<script>
function check_forum_name(){
if ($("#forum_name").val().trim() == ""){
$("#forum_name_error_tips").html("贴吧名称不能为空").show();
}else if($("#forum_name").val().length > 50){
$("#forum_name_error_tips").html("贴吧名称不能超过50个字符").show();
}
}
function forums_commit(){
$("#forum_name_error_tips").hide();
$("#forum_description_error_tips").hide();
if ($("#forum_name").val().trim() == ""){
$("#forum_name_error_tips").html("贴吧名称不能为空").show();
}
else if($("#forum_name").val().length > 50){
$("#forum_name_error_tips").html("贴吧名称不能超过50个字符").show();
}
else if($("#forum_desc").val().trim() == ""){
$("#forum_description_error_tips").html("贴吧描述不能为空").show();
}

View File

@ -1,33 +1,36 @@
<div class="homepageLeft-new">
<div class="postDetailContainer">
<div class="fl mr10 pr"> <%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ), user_path( @forum.creator) %>
<div class="fl mr10 pr"> <%= link_to image_tag(url_to_avatar(@forum.creator),:width => 75,:height => 75,:alt => '贴吧图像' ), user_path( @forum.creator) %>
<!--<div class="homepageEditProfile"><a href="javascript:void(0);" class="homepageEditProfileIcon"></a></div>-->
</div>
<div class="fl" style="width: 120px;">
<% user_name = @forum.creator.show_name.empty? ? @forum.creator.name : @forum.creator.show_name %>
<div class="fl mb8 mt10">吧主:</div><a href="<%= user_path(@forum.creator)%>" class="linkBlue w80 fl mb8 mt10" style="overflow: hidden;white-space: nowrap;text-overflow:ellipsis; "><%= user_name %></a>
<div class="fontGrey3 fl">回答:<a href="javascript:void(0);" class="linkOrange mr5" style="cursor: default"><%= @my_replies_count %></a> 帖子:<a href="javascript:void(0);" class="linkOrange" style="cursor: default"><%= @my_topic_count %></a></div>
</div>
<div class="cl"></div>
<div class="fl">
<%= link_to @forum.name, forum_path(@forum), :class => "f16 fontBlue", :style => "word-break: break-all; word-wrap:break-word;white-space:pre-wrap;" %>
<% user_name = @forum.creator.show_name.empty? ? @forum.creator.name : @forum.creator.show_name %>
<div class="fontGrey2 mb8 mt10">吧主:<a href="<%= user_path(@forum.creator)%>" class="linkBlue"><%= user_name %></a></div>
<div class="fontGrey3">回答:<a href="javascript:void(0);" class="linkOrange mr5" style="cursor: default"><%= @my_replies_count %></a> 帖子:<a href="javascript:void(0);" class="linkOrange" style="cursor: default"><%= @my_topic_count %></a></div>
</div>
<div class="cl"></div>
<div class="fontGrey2 mt10"><span id="forum_desc_span" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;"><%= @forum.description.html_safe%></span>
<%if @forum.creator.id == User.current.id%>
<a href="javascript:void(0);" onclick="edit_desc();">
<%= image_tag('signature_edit.png',{:width=>12,:height=>12}) %>
<%= image_tag('signature_edit.png',{:width => 12,:height => 12}) %>
</a>
<% end %>
</div>
<!--<div class="mt15">-->
<!--<div id="forum_tag_list">-->
<!--<%#= render :partial => 'forums/forum_tag_list', :locals => {:forum => @forum} %>-->
<!--</div>-->
<!--<%# if(@forum.creator.id == User.current.id) %>-->
<!--<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();">+ 添加标签</a>-->
<!--<%# end %>-->
<!--<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">-->
<!--<input type="text" name="addTag" size="20" class="isTxt w90 f_l" maxlength="<%#= Setting.tags_max_length %>" minlength="<%#= Setting.tags_min_length%>" />-->
<!--<input type="button" class="submit f_l" onclick="addTag();" />-->
<!--</span></div>-->
<!--<div id="forum_tag_list">-->
<!--<%#= render :partial => 'forums/forum_tag_list', :locals => {:forum => @forum} %>-->
<!--</div>-->
<!--<%# if(@forum.creator.id == User.current.id) %>-->
<!--<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();">+ 添加标签</a>-->
<!--<%# end %>-->
<!--<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">-->
<!--<input type="text" name="addTag" size="20" class="isTxt w90 f_l" maxlength="<%#= Setting.tags_max_length %>" minlength="<%#= Setting.tags_min_length%>" />-->
<!--<input type="button" class="submit f_l" onclick="addTag();" />-->
<!--</span></div>-->
<!--<div class="cl"></div>-->
<% if @forum.creator.id == User.current.id %>
<span class="postEdit"></span>