diff --git a/acp/portal_module.php b/acp/portal_module.php index a42c7a60..25bbc296 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -1170,10 +1170,11 @@ class portal_module } $confirm_text = (isset($this->user->lang[$module_data['module_name']])) ? sprintf($this->user->lang['DELETE_MODULE_CONFIRM'], $this->user->lang[$module_data['module_name']]) : sprintf($this->user->lang['DELETE_MODULE_CONFIRM'], utf8_normalize_nfc($module_data['module_name'])); confirm_box(false, $confirm_text, build_hidden_fields(array( - 'i' => $id, - 'mode' => $mode, - 'action' => $action, - 'module_id' => $module_id, + 'i' => $id, + 'mode' => $mode, + 'action' => $action, + 'module_id' => $module_id, + 'module_classname' => $module_classname, ))); } } diff --git a/styles/prosilver/template/portal/assets/jquery.getscrollbarwidth.js b/styles/prosilver/template/portal/assets/jquery.getscrollbarwidth.js new file mode 100644 index 00000000..16029f75 --- /dev/null +++ b/styles/prosilver/template/portal/assets/jquery.getscrollbarwidth.js @@ -0,0 +1,22 @@ +/*! Copyright (c) 2008 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + */ + +/** + * Gets the width of the OS scrollbar + */ +(function($) { + var scrollbarWidth = 0; + $.getScrollbarWidth = function() { + if ( !scrollbarWidth ) { + var $div = $('
') + .css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000 }) + .prependTo('body').append('
').find('div') + .css({ width: '100%', height: 200 }); + scrollbarWidth = 100 - $div.width(); + $div.parent().remove(); + } + return scrollbarWidth; + }; +})(jQuery); diff --git a/styles/prosilver/template/portal/modules/jquery_easing_1_3.js b/styles/prosilver/template/portal/assets/jquery_easing_1_3.js similarity index 100% rename from styles/prosilver/template/portal/modules/jquery_easing_1_3.js rename to styles/prosilver/template/portal/assets/jquery_easing_1_3.js diff --git a/styles/prosilver/template/portal/portal.js b/styles/prosilver/template/portal/assets/portal.js similarity index 56% rename from styles/prosilver/template/portal/portal.js rename to styles/prosilver/template/portal/assets/portal.js index 9152d250..4bcd9af0 100644 --- a/styles/prosilver/template/portal/portal.js +++ b/styles/prosilver/template/portal/assets/portal.js @@ -19,17 +19,22 @@ var portal_right_width; */ phpbb.b3p_fix_right_column_margin = function() { var width = $(window).width(); + var $portal_right = $('#portal-right'); + var $portal_left = $('#portal-left'); + var $portal_center = $('#portal-center'); - if (width <= 880) { + if (width <= (895 - $.getScrollbarWidth())) { // Get height of left and center column - var center_height = $('#portal-center').outerHeight(); - var left_height = $('#portal-left').outerHeight(); - - $('#portal-right').css('margin-top', -(center_height - left_height) + 'px'); - $('#portal-right').width($('#portal-left').width()); + var right_height = $portal_right.height(); + var left_height = $portal_left.height(); + // Get correct margin-left for portal-right and add 10px for padding + $portal_right.css('margin-left', - ($portal_right.width() + 1)); + $portal_center.css('margin-top', Math.max(left_height, right_height) + 'px'); } else { - $('#portal-right').css('margin-top', '0px'); - $('#portal-right').width(portal_right_width); + $portal_right.css('margin-top', '0px'); + $portal_right.css('margin-left', -$portal_left.width()); + $portal_right.width($portal_left.width()); + $portal_center.css('margin-top', 0); } }; diff --git a/styles/prosilver/template/portal/modules/portal_clock.js b/styles/prosilver/template/portal/assets/portal_clock.js similarity index 100% rename from styles/prosilver/template/portal/modules/portal_clock.js rename to styles/prosilver/template/portal/assets/portal_clock.js diff --git a/styles/prosilver/template/portal/modules/clock_side.html b/styles/prosilver/template/portal/modules/clock_side.html index 6e39e9b0..db28ca6a 100644 --- a/styles/prosilver/template/portal/modules/clock_side.html +++ b/styles/prosilver/template/portal/modules/clock_side.html @@ -27,6 +27,6 @@
- - + + {$LR_BLOCK_F_L}{$LR_BLOCK_F_R} diff --git a/styles/prosilver/template/portal/modules/login_box_side.html b/styles/prosilver/template/portal/modules/login_box_side.html index 1e56a665..ca4ce8cc 100644 --- a/styles/prosilver/template/portal/modules/login_box_side.html +++ b/styles/prosilver/template/portal/modules/login_box_side.html @@ -1,4 +1,4 @@ -
+
{$LR_BLOCK_H_L} {$TITLE}{$LR_BLOCK_H_R} {L_USERNAME}{L_COLON}
diff --git a/styles/prosilver/template/portal/portal_body.html b/styles/prosilver/template/portal/portal_body.html index 69494911..8f848f66 100644 --- a/styles/prosilver/template/portal/portal_body.html +++ b/styles/prosilver/template/portal/portal_body.html @@ -112,6 +112,7 @@ - + + diff --git a/styles/prosilver/theme/portal_responsive.css b/styles/prosilver/theme/portal_responsive.css index 61d7c2c3..b12f0b3f 100644 --- a/styles/prosilver/theme/portal_responsive.css +++ b/styles/prosilver/theme/portal_responsive.css @@ -23,11 +23,15 @@ @media only screen and (max-width: 895px), only screen and (max-device-width: 895px) { - #portal-right { margin-left: 0 !important; } - #portal-center { + div#portal-right { width: 49% !important; } + div#portal-left { width: 50% !important; } + div#portal-center { margin-right: 0 !important; + margin-left: 0 !important; padding-right: 0 !important; + padding-left: 0 !important; } + .responsive-portal-news dt { width: 100% !important; } } @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) @@ -52,5 +56,13 @@ .portal-responsive-show { display: block !important; } .portal-responsive-hide { display: none !important; } #portal-body { padding-top: 0px !important; } - .portal-clear { display: none !important; } + #portal-right > .portal-clear, #portal-body > .portal-clear, #portal-left > .portal-clear, + #portal-center > .portal-clear, #portal-login-box .portal-clear { display: none !important; } + #portal-right { width: 50% !important; } + #portal-left { width: 50% !important; } + #portal-center { + margin-left: 0 !important; + margin-right: 0 !important; + padding-left: 0 !important; + } }