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

Merge pull request #1730 from Camc314/remove-self

Remove Aliasing this in Music
This commit is contained in:
dkanada 2020-08-25 09:44:18 +09:00 committed by GitHub
commit fd102348ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 74 deletions

View file

@ -263,7 +263,7 @@ import 'flexStyles';
mainTabsManager.setTabs(view, currentTabIndex, getTabs, getTabContainers, onBeforeTabChange, onTabChange);
}
function getTabController(page, index, callback) {
const getTabController = (page, index, callback) => {
let depends;
switch (index) {
@ -298,7 +298,7 @@ import 'flexStyles';
if (index == 0) {
tabContent = view.querySelector(".pageTabContent[data-index='" + index + "']");
self.tabContent = tabContent;
this.tabContent = tabContent;
}
let controller = tabControllers[index];
@ -307,7 +307,7 @@ import 'flexStyles';
tabContent = view.querySelector(".pageTabContent[data-index='" + index + "']");
if (index === 0) {
controller = self;
controller = this;
} else if (index === 7) {
controller = new controllerFactory(view, tabContent, {
collectionType: 'music',
@ -331,7 +331,7 @@ import 'flexStyles';
callback(controller);
});
}
};
function preLoadTab(page, index) {
getTabController(page, index, function (controller) {
@ -359,10 +359,9 @@ import 'flexStyles';
}
}
var self = this;
var currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId));
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId));
self.initTab = function () {
this.initTab = function () {
const tabContent = view.querySelector(".pageTabContent[data-index='0']");
const containers = tabContent.querySelectorAll('.itemsContainer');
@ -371,7 +370,7 @@ import 'flexStyles';
}
};
self.renderTab = function () {
this.renderTab = function () {
reload();
};