Manually trigger window resize to fix circular missbehaviour on several browsers
This commit is contained in:
17
templates/Sparkle/assets/js/main.js
vendored
17
templates/Sparkle/assets/js/main.js
vendored
@@ -25,20 +25,21 @@ $(document).ready(function() {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Load Newsfeed
|
||||||
|
var ajax_load = "<div id='newsitem'>Loading newsfeed...</div>";
|
||||||
|
$("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
|
||||||
|
if ($("#newsfeeditems").html() != "") {
|
||||||
|
$(window).trigger('resize');
|
||||||
|
$("#newsfeed").slideDown();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Height of divs fix
|
// Height of divs fix
|
||||||
var snheight = $('#sidenavigation').height();
|
var snheight = $('#sidenavigation').height();
|
||||||
var mainheight = $('#maincontent').height();
|
var mainheight = $('#maincontent').height();
|
||||||
if (snheight > mainheight) {
|
if (snheight > mainheight) {
|
||||||
$('#maincontent').height(snheight - 60);
|
$('#maincontent').height(snheight - 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Newsfeed
|
|
||||||
var ajax_load = "<div id='newsitem'>Loading newsfeed...</div>";
|
|
||||||
$("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
|
|
||||||
if ($("#newsfeeditems").html() != "") {
|
|
||||||
$("#newsfeed").slideDown();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// this is necessary for the special setting feature (ref #1010)
|
// this is necessary for the special setting feature (ref #1010)
|
||||||
$.getQueryVariable = function(key) {
|
$.getQueryVariable = function(key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user