个人主页,课程,项目头像、logo增加编辑按钮

This commit is contained in:
Tim 2016-08-26 11:31:54 +08:00
parent fbad4ecd8a
commit a8f30fe85f
4 changed files with 24 additions and 3 deletions

View File

@ -30,7 +30,10 @@
<div class="cl"></div>
<div class="sy_class_logo fl">
<%= image_tag(url_to_avatar(@course), :width => "96", :height => "96", :alt => "班级logo") %>
<div class="pr" style="width: 96px; height:96px;">
<%= image_tag(url_to_avatar(@course), :width => "96", :height => "96", :alt => "班级logo") %>
<div class="homepageEditProfile undis"><a href="javascript:void(0);" class="homepageEditProfileIcon" title="点击编辑头像"></a></div>
</div>
</div>
<div class="sy_class_id fl">
<p>邀 请 码<br />

View File

@ -50,7 +50,10 @@
<div id="LSide" class="fl">
<div class="project_info">
<div class="pr_info_logo fl mr10 mb5">
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %>
<div class="pr" style="width: 64px; height:64px;">
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %>
<div class="homepageEditProfile undis"><a href="javascript:void(0);" class="homepageEditProfileIcon" title="点击编辑Logo"></a></div>
</div>
</div>
<div class="pr_info_id fl mb5 f14">
<%= l(:label_project_ivite_code)%>

View File

@ -103,7 +103,10 @@
<div class="homepageLeft mt10" id="LSide">
<div class="user_leftinfo mb10">
<% if User.current.logged?%>
<%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_user_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
<div class="pr" style="width: 80px; margin:0 auto;">
<%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id => 'nh_user_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
<div class="homepageEditProfile undis"><a href="javascript:void(0);" class="homepageEditProfileIcon" title="点击编辑Logo"></a></div>
</div>
<% else %>
<img src="images/user/male.jpg" width="74" height="74" />
<% end %>

View File

@ -2099,3 +2099,15 @@ function throttle_me(method, context, e, condition, url){
},500);
}
//头像、logo编辑图标显隐
function edit_img(){
$(".homepageEditProfile").parent().mouseover(function(){
$(".homepageEditProfile").show();
});
$(".homepageEditProfile").parent().mouseout(function(){
$(".homepageEditProfile").hide();
});
}
$(document).ready(edit_img);