1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/livetvguide.js

44 lines
1.2 KiB
JavaScript
Raw Normal View History

2016-04-26 22:59:43 -04:00
define(['tvguide', 'events'], function (tvguide, events) {
function onGuideLoaded() {
var context = this.options.element;
require(["headroom"], function () {
// construct an instance of Headroom, passing the element
var headroom = new Headroom(context.querySelector('.tvGuideHeader'), {
// or scroll tolerance per direction
scroller: context.querySelector('.guideVerticalScroller'),
onPin: function () {
context.classList.remove('headroomUnpinned');
},
// callback when unpinned, `this` is headroom object
onUnpin: function () {
context.classList.add('headroomUnpinned');
}
});
// initialise
headroom.init();
});
}
2014-01-05 20:59:21 -05:00
2015-10-08 15:12:53 -04:00
window.LiveTvPage.initGuideTab = function (page, tabContent) {
2014-01-10 08:52:01 -05:00
};
2015-05-22 15:16:14 -04:00
2015-10-08 15:12:53 -04:00
window.LiveTvPage.renderGuideTab = function (page, tabContent) {
2014-01-06 13:25:33 -05:00
2016-04-26 22:59:43 -04:00
if (!page.guideInstance) {
2016-04-26 14:28:04 -04:00
page.guideInstance = new tvguide({
2016-04-26 22:59:43 -04:00
element: tabContent
2015-05-06 23:11:51 -04:00
});
2016-04-26 22:59:43 -04:00
events.on(page.guideInstance, 'load', onGuideLoaded);
2015-05-06 23:11:51 -04:00
}
2015-08-18 11:52:48 -04:00
};
2014-01-05 20:59:21 -05:00
});