39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
$(function(){
|
|
beathaven.init();
|
|
$(window).resize(beathaven.adjustSizes)
|
|
window.setTimeout(beathaven.checkRedrawScrollbar, 500);
|
|
})
|
|
var beathaven = {
|
|
|
|
last_height: false,
|
|
|
|
init: function () {
|
|
this.drawInterface();
|
|
this.adjustSizes();
|
|
Ajax.detectStartPage();
|
|
},
|
|
|
|
drawInterface: function() {
|
|
},
|
|
|
|
adjustSizes: function() {
|
|
$('#data-container').height($(window).height() - $('#header-container').height());
|
|
$('#data-container').width($(window).width() - $('#player').width()).scrollbar();
|
|
$('#player-container').height($(window).height());
|
|
$('#playlist').height($(window).height() - $('#player').height()).scrollbar();
|
|
},
|
|
|
|
checkRedrawScrollbar: function() {
|
|
var outer_height = $('#data-container > div').outerHeight();
|
|
if (outer_height > 300 && outer_height != beathaven.last_height) {
|
|
beathaven.last_height = outer_height;
|
|
beathaven.redrawScrollbar();
|
|
}
|
|
window.setTimeout(beathaven.checkRedrawScrollbar, 500);
|
|
},
|
|
|
|
redrawScrollbar: function() {
|
|
$('#data-container').html($('#data-container').find('.inner').first());
|
|
$('#data-container').scrollbar();
|
|
}
|
|
} |