mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
be99ee04d2
commit
86a369b500
20 changed files with 149 additions and 73 deletions
|
@ -1,4 +1,5 @@
|
|||
define(['dom', 'scroller', 'browser', 'registerElement', 'css!./emby-tabs', 'scrollStyles'], function (dom, scroller, browser) {
|
||||
'use strict';
|
||||
|
||||
var EmbyTabs = Object.create(HTMLDivElement.prototype);
|
||||
var buttonClass = 'emby-tab-button';
|
||||
|
@ -78,7 +79,7 @@
|
|||
|
||||
var onAnimationFinish = function () {
|
||||
|
||||
//if (tabs.getAttribute('data-selectionbar') != 'false') {
|
||||
//if (tabs.getAttribute('data-selectionbar') !== 'false') {
|
||||
// showButtonSelectionBar(newButton);
|
||||
//}
|
||||
newButton.classList.add(activeButtonClass);
|
||||
|
@ -103,7 +104,7 @@
|
|||
var current = tabs.querySelector('.' + activeButtonClass);
|
||||
var tabButton = dom.parentWithClass(e.target, buttonClass);
|
||||
|
||||
if (tabButton && tabButton != current) {
|
||||
if (tabButton && tabButton !== current) {
|
||||
|
||||
if (current) {
|
||||
current.classList.remove(activeButtonClass);
|
||||
|
@ -186,7 +187,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (tabs.getAttribute('data-selectionbar') == 'false') {
|
||||
if (tabs.getAttribute('data-selectionbar') === 'false') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -253,7 +254,7 @@
|
|||
|
||||
var tabButtons = tabs.querySelectorAll('.' + buttonClass);
|
||||
|
||||
if (current == selected || triggerEvent === false) {
|
||||
if (current === selected || triggerEvent === false) {
|
||||
|
||||
tabs.dispatchEvent(new CustomEvent("beforetabchange", {
|
||||
detail: {
|
||||
|
@ -269,7 +270,7 @@
|
|||
var currentTabButton = tabButtons[current];
|
||||
moveSelectionBar(tabs, tabButtons[selected], currentTabButton, false);
|
||||
|
||||
if (current != selected && currentTabButton) {
|
||||
if (current !== selected && currentTabButton) {
|
||||
currentTabButton.classList.remove(activeButtonClass);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue