修复wiki页面表格超出页面的BUG

This commit is contained in:
sw 2014-10-24 09:32:47 +08:00
parent c8c57b3f76
commit 1f9c6b66ca
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<div class="wiki wiki-page">
<div class="wiki wiki-page" id="wiki_content_div">
<%= textAreailizable content, :text, :attachments => content.page.attachments,
:edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>
<%#= content.text.html_safe %>

View File

@ -68,3 +68,15 @@
<%= render :partial => 'sidebar' %>
<% end %>
<% html_title @page.pretty_title %>
<script type="text/javascript">
window.onready = function() {
var maxwidth = $("#wiki_content_div").width();
$("#wiki_content_div").children().each(function(){
if($(this).width()>maxwidth)
{
$(this).width(maxwidth);
}
});
};
</script>