1 <script type="text/javascript">
2 var brokenContentSize = $("#content").prop("offsetWidth") == 0;
4 function resizeContent() {
5 var content = $("#content");
6 var leftMargin = parseInt(content.css("left"));
7 var rightMargin = parseInt(content.css("right"));
8 var bottomMargin = parseInt(content.css("bottom"));
10 <% if t('html.dir') == "ltr" -%>
11 content.width($(window).width() - content.prop("offsetLeft") - rightMargin);
13 content.width($(window).width() - content.prop("offsetRight") - leftMargin);
15 content.height($(window).height() - content.prop("offsetTop") - bottomMargin);
18 function resizeMap() {
19 var sidebar_width = 0 + $("#sidebar:visible").outerWidth(true);
20 var left_border = parseFloat($("#map").css("border-left-width"));
21 var right_border = parseFloat($("#map").css("border-right-width"));
22 var top_border = parseFloat($("#map").css("border-top-width"));
23 var bottom_border = parseFloat($("#map").css("border-bottom-width"));
25 <% if t('html.dir') == "ltr" -%>
26 $("#map").css("left", (sidebar_width) + "px");
28 $("#map").css("right", (sidebar_width) + "px");
30 $("#map").width($("#content").width() - sidebar_width - left_border - right_border);
31 $("#map").height($("#content").height() - top_border - bottom_border);
33 <% if params[:controller] == "site" and params[:action] == "index" -%>
38 function handleResize() {
39 if (brokenContentSize) {