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 content_width = $("#content").width();
20 var content_height = $("#content").height();
21 var sidebar_width = 0 + $("#sidebar:visible").outerWidth(true);
22 var left_border = parseFloat($("#map").css("border-left-width"));
23 var right_border = parseFloat($("#map").css("border-right-width"));
24 var top_border = parseFloat($("#map").css("border-top-width"));
25 var bottom_border = parseFloat($("#map").css("border-bottom-width"));
27 <% if t('html.dir') == "ltr" -%>
28 $("#map").css("left", (sidebar_width) + "px");
30 $("#map").css("right", (sidebar_width) + "px");
32 $("#map").width(content_width - sidebar_width - left_border - right_border);
33 $("#map").height(content_height - top_border - bottom_border);
35 <% if params[:controller] == "site" and params[:action] == "index" -%>
40 function handleResize() {
41 if (brokenContentSize) {