added headroom scrolling

This commit is contained in:
Luke Pulverenti 2015-05-04 10:35:38 -04:00
parent feffdb0bd4
commit 19fd673e46
12 changed files with 470 additions and 28 deletions

View file

@ -99,12 +99,6 @@
function enabled() {
// Gets real messy and jumps around the page when scrolling
// Can be reviewed later.
if ($.browser.msie) {
return false;
}
var userId = Dashboard.getCurrentUserId();
var val = store.getItem('enableBackdrops-' + userId);

View file

@ -90,6 +90,13 @@
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
$('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu);
}
// grab an element
var viewMenuBar = document.getElementsByClassName("viewMenuBar")[0];
// construct an instance of Headroom, passing the element
var headroom = new Headroom(viewMenuBar);
// initialise
headroom.init();
}
function getItemHref(item, context) {
@ -534,6 +541,15 @@
// Scroll back up so in case vertical scroll was messed with
$(document).scrollTop(0);
}
$('.libraryViewNav', page).each(function() {
// construct an instance of Headroom, passing the element
var headroom = new Headroom(this);
// initialise
headroom.init();
});
});
function initializeApiClient(apiClient) {

View file

@ -419,6 +419,15 @@
});
}
$('.tvGuideHeader', page).each(function () {
// construct an instance of Headroom, passing the element
var headroom = new Headroom(this);
// initialise
headroom.init();
});
}).on('pageshow', "#liveTvGuidePage", function () {
var page = this;

View file

@ -99,12 +99,7 @@
});
// See backrops.js for comments on this
if ($.browser.msie) {
$('.fldEnableBackdrops', page).hide();
} else {
$('.fldEnableBackdrops', page).show();
}
$('.fldEnableBackdrops', page).show();
});
window.WebClientPreferencesPage = {

View file

@ -1327,7 +1327,7 @@ var Dashboard = {
var isBackdrop = imageType.toLowerCase() == 'backdrop';
if (isBackdrop) {
quality -= 10;
quality -= 15;
}
if ($.browser.safari && $.browser.mobile) {