#1404修复帖子描述为表格,切表格设置大于页面宽度的宽度时,显示超出页面的BUG

解决方案:增加js改宽度
This commit is contained in:
sw 2014-10-24 09:26:53 +08:00
parent 84e8a40174
commit c8c57b3f76
1 changed files with 14 additions and 5 deletions

View File

@ -51,7 +51,7 @@
style="word-break: break-all;word-wrap: break-word;">
<%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
</div>
<div class="memo-content">
<div class="memo-content" id="memo-content_div">
<%= textAreailizable(@memo,:content) %>
<p>
<% if @memo.attachments.any?%>
@ -149,8 +149,17 @@
<script type="text/javascript">
jQuery(document).ready(function($) {
transpotUrl('.lz');
transpotUrl('.replies');
});
jQuery(document).ready(function($) {
transpotUrl('.lz');
transpotUrl('.replies');
});
window.onready = function() {
var maxwidth = $("#memo-content_div").width();
$("#memo-content_div").children().each(function(){
if($(this).width()>maxwidth)
{
$(this).width(maxwidth);
}
});
};
</script>