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

Remove dead code

This commit is contained in:
MrTimscampi 2020-07-19 16:15:11 +02:00
parent 704b2fe9da
commit dfbb7dfc16
114 changed files with 98 additions and 741 deletions

View file

@ -11,11 +11,7 @@ import 'emby-button';
elem.classList.remove('hide');
elem.classList.add('expanded');
elem.style.height = 'auto';
const height = elem.offsetHeight + 'px';
elem.style.height = '0';
// trigger reflow
const newHeight = elem.offsetHeight;
var height = elem.offsetHeight + 'px';
elem.style.height = height;
setTimeout(function () {
@ -28,15 +24,12 @@ import 'emby-button';
}, 300);
const icon = button.querySelector('.material-icons');
//icon.innerHTML = 'expand_less';
icon.classList.add('emby-collapse-expandIconExpanded');
}
function slideUpToHide(button, elem) {
elem.style.height = elem.offsetHeight + 'px';
// trigger reflow
const newHeight = elem.offsetHeight;
elem.classList.remove('expanded');
elem.style.height = '0';
@ -50,7 +43,6 @@ import 'emby-button';
}, 300);
const icon = button.querySelector('.material-icons');
//icon.innerHTML = 'expand_more';
icon.classList.remove('emby-collapse-expandIconExpanded');
}

View file

@ -18,7 +18,6 @@ import 'webcomponents';
function onClick(e) {
const itemsContainer = this;
const target = e.target;
let multiSelect = itemsContainer.multiSelect;
if (multiSelect) {

View file

@ -13,23 +13,22 @@ import 'webcomponents';
import('text!./emby-progressring.template.html').then(({default: template}) => {
instance.innerHTML = template;
//if (window.MutationObserver) {
// // create an observer instance
// var observer = new MutationObserver(function (mutations) {
// mutations.forEach(function (mutation) {
if (window.MutationObserver) {
// create an observer instance
var observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
instance.setProgress(parseFloat(instance.getAttribute('data-progress') || '0'));
});
});
// instance.setProgress(parseFloat(instance.getAttribute('data-progress') || '0'));
// });
// });
// configuration of the observer:
var config = { attributes: true, childList: false, characterData: false };
// // configuration of the observer:
// var config = { attributes: true, childList: false, characterData: false };
// pass in the target node, as well as the observer options
observer.observe(instance, config);
// // pass in the target node, as well as the observer options
// observer.observe(instance, config);
// instance.observer = observer;
//}
instance.observer = observer;
}
instance.setProgress(parseFloat(instance.getAttribute('data-progress') || '0'));
});

View file

@ -37,7 +37,6 @@ import 'webcomponents';
this.classList.add('mdl-radio__button');
let labelElement = this.parentNode;
//labelElement.classList.add('"mdl-radio mdl-js-radio mdl-js-ripple-effect');
labelElement.classList.add('mdl-radio');
labelElement.classList.add('mdl-js-radio');
labelElement.classList.add('mdl-js-ripple-effect');

View file

@ -78,7 +78,6 @@ import EmbyButtonPrototype from 'emby-button';
if (icon) {
icon.classList.add('favorite');
icon.classList.remove('ratingbutton-icon-withrating');
//icon.innerHTML = 'thumb_up';
}
button.classList.remove('ratingbutton-withrating');
@ -87,7 +86,6 @@ import EmbyButtonPrototype from 'emby-button';
if (icon) {
icon.classList.add('favorite');
icon.classList.remove('ratingbutton-icon-withrating');
//icon.innerHTML = 'thumb_down';
}
button.classList.remove('ratingbutton-withrating');
@ -96,7 +94,6 @@ import EmbyButtonPrototype from 'emby-button';
if (icon) {
icon.classList.add('favorite');
icon.classList.remove('ratingbutton-icon-withrating');
//icon.innerHTML = 'thumbs_up_down';
}
button.classList.remove('ratingbutton-withrating');
}

View file

@ -36,6 +36,7 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
}
function updateScrollButtons(scrollButtons, scrollSize, scrollPos, scrollWidth) {
// TODO: Check if hack is really needed
// hack alert add twenty for rounding errors
if (scrollWidth <= scrollSize + 20) {
scrollButtons.scrollButtonsLeft.classList.add('hide');
@ -122,7 +123,6 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
const direction = this.getAttribute('data-direction');
const scrollSize = getScrollSize(scroller);
const scrollPos = getScrollPosition(scroller);
const scrollWidth = getScrollWidth(scroller);
let newPos;
if (direction === 'left') {

View file

@ -146,8 +146,9 @@ import 'emby-input';
return;
}
// TODO: Not sure what this is trying to accomplish.
if (enableWidthWithTransform == null) {
//enableWidthWithTransform = browser.supportsCssAnimation();
enableWidthWithTransform = browser.supportsCssAnimation();
}
this.setAttribute('data-embyslider', 'true');

View file

@ -29,13 +29,6 @@ import 'scrollStyles';
}
}
function addActivePanelClass(tabs, index) {
let tabPanel = getTabPanel(tabs, index);
if (tabPanel) {
tabPanel.classList.add('is-active');
}
}
function fadeInRight(elem) {
const pct = browser.mobile ? '4%' : '0.5%';
@ -263,7 +256,6 @@ import 'scrollStyles';
onClick.call(tabs, {
target: tabButtons[selected]
});
//tabButtons[selected].click();
}
};
@ -330,8 +322,6 @@ import 'scrollStyles';
};
EmbyTabs.setTabEnabled = function (index, enabled) {
const tabs = this;
const btn = this.querySelector('.emby-tab-button[data-index="' + index + '"]');
if (enabled) {

View file

@ -47,7 +47,6 @@ import 'emby-input';
return;
}
let newHeight = 0;
let hasGrown = false;
if ((textarea.scrollHeight - offset) > self.maxAllowedHeight) {
textarea.style.overflowY = 'scroll';