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:
commit
fd102348ce
5 changed files with 69 additions and 74 deletions
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue