This commit is contained in:
guange 2015-10-13 16:29:54 +08:00
commit 3a98224f6a
3 changed files with 26 additions and 20 deletions

View File

@ -234,21 +234,23 @@
//第二种是改变某个tag名称。其他所有的资源如果拥有这个tag。那么对应的tag名也要改掉。
//目前这两种依据 的来源就是 是否 传了参数 id。如果有id。就指定了资源id就是第一种情况。如果没有id。就是第二种情况
function rename_tag(domEle,name,id,type){
isdb = true; //这是双击
//clearTimeout(clickFunction);
if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动
return;
if(String(id) != '' || '<%=User.current.allowed_to?(:as_teacher,@course)%>' == 'true' ) { //如果有id 或者是老师就都能编辑否则没有id不是老师就不能编辑
isdb = true; //这是双击
//clearTimeout(clickFunction);
if (domEle.children().get(0) != undefined) { //已经是编辑框的情况下不要动
return;
}
tagNameHtml = domEle.parent().html()
tagName = name;
parentCssBorder = domEle.parent().css("border");
ele = domEle;
tagId = id;
taggableType = type;
width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100
domEle.html('<input name="" id="renameTagName" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" style="width:' + width + 'px;" value="' + name + '"/>');
domEle.parent().css("border", "1px solid #ffffff");
$("#renameTagName").focus();
}
tagNameHtml = domEle.parent().html()
tagName = name;
parentCssBorder = domEle.parent().css("border");
ele = domEle;
tagId = id;
taggableType = type;
width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100
domEle.html('<input name="" id="renameTagName" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" style="width:'+width +'px;" value="'+name+'"/>');
domEle.parent().css("border","1px solid #ffffff");
$("#renameTagName").focus();
}
//监听所有的单击事件
$(function(){

View File

@ -86,15 +86,15 @@
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %></div>
<div class="homepagePostReplyBannerTime"></div>
<div class="homepagePostReplyBannerMore">
<% if @reply_count > 2%>
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%= @memo.id%>" onclick="expand_reply('#reply_div_<%= @memo.id %>','#reply_btn_<%= @memo.id%>')" data-count="<%= @reply_count %>" data-init="0" >点击展开更多回复</a>
<% end %>
</div>
<!--<div class="homepagePostReplyBannerMore">-->
<!--<%# if @reply_count > 2%>-->
<!--<a# href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @memo.id%>" onclick="expand_reply('#reply_div_<%#= @memo.id %>','#reply_btn_<%#= @memo.id%>')" data-count="<%= @reply_count %>" data-init="0" >点击展开更多回复</a>-->
<!--<%# end %>-->
<!--</div>-->
</div>
<div class="" id="reply_div_<%= @memo.id %>">
<% @replies.each_with_index do |reply,i| %>
<div class="homepagePostReplyContainer" style="display: <%= i >= 2 ? 'none':''%>">
<div class="homepagePostReplyContainer" >
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
</div>

View File

@ -724,6 +724,10 @@ div.actions input[type="text"] {
word-wrap: break-word;
}
.memo-content li {
list-style-type: decimal;
}
.memo-timestamp {
position: absolute;
bottom: 0px;