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/components/dockedtabs/dockedtabs.js

58 lines
2.2 KiB
JavaScript
Raw Normal View History

2016-08-15 00:36:17 -04:00
define(['css!./dockedtabs', 'emby-tabs'], function () {
2016-08-14 02:21:30 -04:00
function render(options) {
var elem = document.createElement('div');
elem.classList.add('dockedtabs');
elem.classList.add('dockedtabs-bottom');
// tabs:
// home
// favorites
// live tv
// now playing
2016-08-15 00:36:17 -04:00
var html = '';
html += ' <div is="emby-tabs" class="dockedtabs-tabs" data-selectionbar="false">\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button emby-tab-button-active" data-index="0">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">home</i><div>Home</div></div>\
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="1">\
2016-08-16 15:39:14 -04:00
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">dvr</i><div>Libraries</div></div>\
2016-08-15 00:36:17 -04:00
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button homeFavoritesTab" data-index="2">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">favorite</i><div>Favorites</div></div>\
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="3">\
2016-08-16 15:39:14 -04:00
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">file_download</i><div>Downloads</div></div>\
2016-08-15 00:36:17 -04:00
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="3">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">menu</i><div>More</div></div>\
</button>\
</div>\
';
elem.innerHTML = html;
2016-08-15 14:18:05 -04:00
options.appFooter.add(elem);
2016-08-14 02:21:30 -04:00
return elem;
}
function dockedTabs(options) {
var self = this;
self.element = render(options);
}
2016-08-15 14:18:05 -04:00
dockedTabs.prototype.destroy = function () {
2016-08-14 02:21:30 -04:00
var self = this;
self.Element = null;
};
return dockedTabs;
});