- fixed window resize issue cause by loading results

This commit is contained in:
walljm 2013-04-19 17:07:04 -04:00
parent 0930633d04
commit eeb6fdd9d0
2 changed files with 20 additions and 22 deletions

View File

@ -41,13 +41,6 @@ require(["jquery", "db", "common", "reference", "jquery.cookie", "jquery.ui"],
common.Settings.ChangeResultFont($("#changefont").val()); common.Settings.ChangeResultFont($("#changefont").val());
return false; return false;
}); });
$(window).bind("resize", function()
{
$("#searchresults").css("height", window.innerHeight - 200);
return false;
});
$("#searchresults").css("height", window.innerHeight - 200);
$("#result").sortable({ $("#result").sortable({
handle: ".p-handle" handle: ".p-handle"
@ -66,8 +59,13 @@ require(["jquery", "db", "common", "reference", "jquery.cookie", "jquery.ui"],
common.Settings.Load(); common.Settings.Load();
} }
// you need to do this last, otherwise the settings load resets the window height.
$(window).bind("resize", function()
{
$("#searchresults").css("height", window.innerHeight - 200);
return false;
});
$("#searchresults").css("height", window.innerHeight - 200);
}); });
}); });

View File

@ -41,13 +41,6 @@ require(["jquery", "db", "common", "reference", "jquery.cookie", "jquery.ui"],
common.Settings.ChangeResultFont($("#changefont").val()); common.Settings.ChangeResultFont($("#changefont").val());
return false; return false;
}); });
$(window).bind("resize", function()
{
$("#searchresults").css("height", window.innerHeight - 200);
return false;
});
$("#searchresults").css("height", window.innerHeight - 200);
$("#result").sortable({ $("#result").sortable({
handle: ".p-handle" handle: ".p-handle"
@ -66,8 +59,15 @@ require(["jquery", "db", "common", "reference", "jquery.cookie", "jquery.ui"],
common.Settings.Load(); common.Settings.Load();
} }
// you need to do this last, otherwise the settings load resets the window height.
$(window).bind("resize", function()
{
$("#searchresults").css("height", window.innerHeight - 200);
return false;
});
$("#searchresults").css("height", window.innerHeight - 200);
}); });
}); });