上传图片js

This commit is contained in:
sw 2015-08-29 14:46:30 +08:00
parent b65243ba62
commit c0daebd75c
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@
<p class="mb20 c_dark f14">
<%= get_technical_title @user %>
</p>
<div id="watch_user_btn">
<div id="watch_user_btn_div">
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
</div>
</div>

View File

@ -1,3 +1,3 @@
$("#nh_user_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:214px;height:214px;overflow:hidden",:alt=>"头像") %>');
$("#nh_user_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:90px;height:90px;overflow:hidden",:alt=>"头像") %>');
$("#nh_user_logo").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_logo',:width =>"40",:height => "40",:alt=>"头像") %>');
hideModal();

View File

@ -1,7 +1,7 @@
<% if( params[:object_type] == 'user') %>
//点击头像下面的添加关注按钮
<% if( params[:target_id] == params[:object_id] ) %>
$("#watch_user_btn").html("<%= escape_javascript render(:partial => "layouts/user_watch_btn", :locals => {:target => watched.first}) %>");
$("#watch_user_btn_div").html("<%= escape_javascript render(:partial => "layouts/user_watch_btn", :locals => {:target => watched.first}) %>");
$("#user_fans_number").html("<%= watched.first.watcher_users.count.to_s%>");
//在当前用户的粉丝、关注页面
<% elsif( params[:target_id] == User.current.id.to_s )%>