socialforge/app/views/avatar/_avatar_form.html.erb

71 lines
1.8 KiB
Plaintext
Raw Normal View History

<style type="text/css">
a, a:hover {text-decoration:none;}
.btn_addPic
{
position: relative;
left: 85px;
height: 17px;
width: 50px;
overflow: hidden;
padding: 2px 8px;
border: 1px solid #EBEBEB;
background: none repeat scroll 0 0 #F3F3F3;
color: #999999;
font: 12px 'Simhei';
cursor: pointer;
text-align: center;
}
.btn_addPic em
{
width: 40px;
height: 17px;
overflow: hidden;
margin: 0;
line-height: 20em;
vertical-align: middle;
}
.btn_addPic:hover em
{
background-position: 0;
}
.file_selector
{
position: relative;
2013-08-04 08:55:39 +08:00
padding-left:13px;
opacity: 0;
filter: alpha(opacity:0);
}
</style>
2013-08-01 10:33:49 +08:00
<span id="avatar_fields">
<%= image_tag(url_to_avatar(source), id: "avatar_image", size: AvatarHelper::AVATAR_SIZE)%>
<span id="avatar_file">
</span>
</span>
<a href="javascript:void(0);" class="btn_addPic" style="text-decoration:none;">
<span>上传图片</span>
</a>
2013-08-04 08:55:39 +08:00
<span class="add_avatar" style="width:20px;">
<%= file_field_tag 'avatar[image]',
:id => nil,
:class => 'file_selector',
2013-08-04 08:55:39 +08:00
:style => 'width:70px;',#added by young
:size => "1",
:multiple => false,
:onchange => 'addInputAvatar(this);',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => upload_avatar_path(:format => 'js'),
:description_placeholder => nil ,# l(:label_optional_description)
:source_type => source.class.to_s,
:source_id => source.id.to_s
} %>
2013-08-01 10:33:49 +08:00
</span>
<% content_for :header_tags do %>
<%= javascript_include_tag 'avatars' %>
<% end %>