Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into redis_cache
This commit is contained in:
commit
ca12151419
|
@ -70,26 +70,35 @@
|
|||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
$(function(){
|
||||
function nh_show_btn(){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
if($("#project_show_<%= topic.id%>").is(':hidden')){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
var div = $("#contentmessage<%=topic.id %>");
|
||||
var imgs = $('img',div);
|
||||
var lens = imgs.length;
|
||||
function nh_load_img_end(){
|
||||
lens--;
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}
|
||||
}
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}else{
|
||||
// lens--;
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }
|
||||
}
|
||||
if(lens > 0){
|
||||
$('img',div).load(function(){
|
||||
nh_load_img_end();
|
||||
});
|
||||
}
|
||||
nh_show_btn();
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }else{
|
||||
// $('img',div).load(function(){
|
||||
// nh_load_img_end();
|
||||
// });
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
||||
|
|
|
@ -62,26 +62,35 @@
|
|||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
$(function(){
|
||||
function nh_show_btn(){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
if($("#project_show_<%= topic.id%>").is(':hidden')){
|
||||
if($("#contentmessage<%=topic.id %>").height()>182){
|
||||
$("#project_show_<%= topic.id%>").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
var div = $("#contentmessage<%=topic.id %>");
|
||||
var imgs = $('img',div);
|
||||
var lens = imgs.length;
|
||||
function nh_load_img_end(){
|
||||
lens--;
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}
|
||||
}
|
||||
if(lens <= 0){
|
||||
nh_show_btn();
|
||||
}else{
|
||||
// lens--;
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }
|
||||
}
|
||||
if(lens > 0){
|
||||
$('img',div).load(function(){
|
||||
nh_load_img_end();
|
||||
});
|
||||
}
|
||||
nh_show_btn();
|
||||
// if(lens <= 0){
|
||||
// nh_show_btn();
|
||||
// }else{
|
||||
// $('img',div).load(function(){
|
||||
// nh_load_img_end();
|
||||
// });
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<style type="text/css">
|
||||
p.lablewidth>label{width:190px;}
|
||||
</style>
|
||||
<%= labelled_fields_for :pref, @user.pref do |pref_fields| %>
|
||||
<p><%= pref_fields.check_box :hide_mail %></p>
|
||||
<p style="width:520px;"><%= pref_fields.time_zone_select :time_zone, nil, :include_blank => true %></p>
|
||||
<p style="width:477px;"><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
|
||||
<p class="lablewidth"><%= pref_fields.check_box :hide_mail %></p>
|
||||
<p class="lablewidth" style="width:520px;"><%= pref_fields.time_zone_select :time_zone, nil, :include_blank => true %></p>
|
||||
<p class="lablewidth" style="width:477px;"><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
|
||||
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue