mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Manual cleanup of deuglification
Deuglification
This commit is contained in:
parent
4c0170535d
commit
84dd50e995
@ -91,11 +91,11 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
inputManager.trigger("search");
|
||||
}
|
||||
|
||||
function onHeaderUserButtonClick(e__q) {
|
||||
function onHeaderUserButtonClick(e) {
|
||||
Dashboard.navigate("mypreferencesmenu.html");
|
||||
}
|
||||
|
||||
function onSettingsClick(e__w) {
|
||||
function onSettingsClick(e) {
|
||||
Dashboard.navigate("dashboard.html");
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
navDrawerInstance.close();
|
||||
}
|
||||
|
||||
function onMainDrawerSelect(e__e) {
|
||||
function onMainDrawerSelect(e) {
|
||||
if (navDrawerInstance.isVisible) {
|
||||
onMainDrawerOpened();
|
||||
} else {
|
||||
@ -242,8 +242,8 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
var links = navDrawerScrollContainer.querySelectorAll(".navMenuOption");
|
||||
var currentViewId = viewManager.currentView().id;
|
||||
|
||||
for (var i__r = 0, length = links.length; i__r < length; i__r++) {
|
||||
var link = links[i__r];
|
||||
for (var i = 0, length = links.length; i < length; i++) {
|
||||
var link = links[i];
|
||||
var selected = false;
|
||||
var pageIds = link.getAttribute("data-pageids");
|
||||
|
||||
@ -396,8 +396,8 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
}
|
||||
|
||||
function addPluginPagesToMainMenu(links, pluginItems, section) {
|
||||
for (var i__t = 0, length = pluginItems.length; i__t < length; i__t++) {
|
||||
var pluginItem = pluginItems[i__t];
|
||||
for (var i = 0, length = pluginItems.length; i < length; i++) {
|
||||
var pluginItem = pluginItems[i];
|
||||
|
||||
if (Dashboard.allowPluginPages(pluginItem.PluginId)) {
|
||||
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === section) {
|
||||
@ -438,13 +438,13 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
|
||||
function getToolsMenuHtml(apiClient) {
|
||||
return getToolsMenuLinks(apiClient).then(function (items) {
|
||||
var i__y;
|
||||
var i;
|
||||
var length;
|
||||
var item;
|
||||
var menuHtml = "";
|
||||
|
||||
for (menuHtml += '<div class="drawerContent">', i__y = 0, length = items.length; i__y < length; i__y++) {
|
||||
item = items[i__y];
|
||||
for (menuHtml += '<div class="drawerContent">', i = 0, length = items.length; i < length; i++) {
|
||||
item = items[i];
|
||||
|
||||
if (item.href) {
|
||||
menuHtml += getToolsLinkHtml(item);
|
||||
@ -484,8 +484,8 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
var items = result.Items;
|
||||
var list = [];
|
||||
|
||||
for (var i__u = 0, length = items.length; i__u < length; i__u++) {
|
||||
var view = items[i__u];
|
||||
for (var i = 0, length = items.length; i < length; i++) {
|
||||
var view = items[i];
|
||||
|
||||
if (list.push(view), "livetv" == view.CollectionType) {
|
||||
view.ImageTags = {};
|
||||
@ -545,69 +545,59 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
html += '<h3 class="sidebarHeader">';
|
||||
html += globalize.translate("HeaderMedia");
|
||||
html += "</h3>";
|
||||
html += items.map(function (i__o) {
|
||||
html += items.map(function (i) {
|
||||
var icon = "folder";
|
||||
var itemId = i__o.Id;
|
||||
var itemId = i.Id;
|
||||
|
||||
if ("channels" == i__o.CollectionType) {
|
||||
if ("channels" == i.CollectionType) {
|
||||
itemId = "channels";
|
||||
} else {
|
||||
if ("livetv" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("livetv" == i.CollectionType) {
|
||||
itemId = "livetv";
|
||||
}
|
||||
}
|
||||
|
||||
if ("photos" == i__o.CollectionType) {
|
||||
else if ("photos" == i.CollectionType) {
|
||||
icon = "photo_library";
|
||||
} else {
|
||||
if ("music" == i__o.CollectionType || "musicvideos" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("music" == i.CollectionType || "musicvideos" == i.CollectionType) {
|
||||
icon = "library_music";
|
||||
} else {
|
||||
if ("books" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("books" == i.CollectionType) {
|
||||
icon = "library_books";
|
||||
} else {
|
||||
if ("playlists" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("playlists" == i.CollectionType) {
|
||||
icon = "view_list";
|
||||
} else {
|
||||
if ("games" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("games" == i.CollectionType) {
|
||||
icon = "games";
|
||||
} else {
|
||||
if ("movies" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("movies" == i.CollectionType) {
|
||||
icon = "video_library";
|
||||
} else {
|
||||
if ("channels" == i__o.CollectionType || "Channel" == i__o.Type) {
|
||||
}
|
||||
else if ("channels" == i.CollectionType || "Channel" == i.Type) {
|
||||
icon = "videocam";
|
||||
} else {
|
||||
if ("tvshows" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("tvshows" == i.CollectionType) {
|
||||
icon = "tv";
|
||||
} else {
|
||||
if ("livetv" == i__o.CollectionType) {
|
||||
}
|
||||
else if ("livetv" == i.CollectionType) {
|
||||
icon = "live_tv";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
icon = i.icon || icon;
|
||||
|
||||
if (i.onclick) {
|
||||
i.onclick;
|
||||
}
|
||||
|
||||
icon = i__o.icon || icon;
|
||||
|
||||
if (i__o.onclick) {
|
||||
i__o.onclick;
|
||||
}
|
||||
|
||||
return '<a is="emby-linkbutton" data-itemid="' + itemId + '" class="lnkMediaFolder navMenuOption" href="' + getItemHref(i__o, i__o.CollectionType) + '"><i class="md-icon navMenuOptionIcon">' + icon + '</i><span class="sectionName navMenuOptionText">' + i__o.Name + "</span></a>";
|
||||
return '<a is="emby-linkbutton" data-itemid="' + itemId + '" class="lnkMediaFolder navMenuOption" href="' + getItemHref(i, i.CollectionType) + '"><i class="md-icon navMenuOptionIcon">' + icon + '</i><span class="sectionName navMenuOptionText">' + i.Name + "</span></a>";
|
||||
}).join("");
|
||||
libraryMenuOptions.innerHTML = html;
|
||||
var elem = libraryMenuOptions;
|
||||
var sidebarLinks = elem.querySelectorAll(".navMenuOption");
|
||||
|
||||
for (var i__i = 0, length = sidebarLinks.length; i__i < length; i__i++) {
|
||||
sidebarLinks[i__i].removeEventListener("click", onSidebarLinkClick);
|
||||
sidebarLinks[i__i].addEventListener("click", onSidebarLinkClick);
|
||||
for (var i = 0, length = sidebarLinks.length; i < length; i++) {
|
||||
sidebarLinks[i].removeEventListener("click", onSidebarLinkClick);
|
||||
sidebarLinks[i].addEventListener("click", onSidebarLinkClick);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -617,8 +607,8 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
return getParameterByName("topParentId") || null;
|
||||
}
|
||||
|
||||
function onMainDrawerClick(e__p) {
|
||||
if (dom.parentWithTag(e__p.target, "A")) {
|
||||
function onMainDrawerClick(e) {
|
||||
if (dom.parentWithTag(e.target, "A")) {
|
||||
setTimeout(closeMainDrawer, 30);
|
||||
}
|
||||
}
|
||||
@ -644,7 +634,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
}
|
||||
|
||||
function updateLibraryNavLinks(page) {
|
||||
var i__a;
|
||||
var i;
|
||||
var length;
|
||||
var isLiveTvPage = page.classList.contains("liveTvPage");
|
||||
var isChannelsPage = page.classList.contains("channelsPage");
|
||||
@ -653,37 +643,33 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
var id = isLiveTvPage || isChannelsPage || isEditorPage || isMySyncPage || page.classList.contains("allLibraryPage") ? "" : getTopParentId() || "";
|
||||
var elems = document.getElementsByClassName("lnkMediaFolder");
|
||||
|
||||
for (i__a = 0, length = elems.length; i__a < length; i__a++) {
|
||||
var lnkMediaFolder = elems[i__a];
|
||||
for (i = 0, length = elems.length; i < length; i++) {
|
||||
var lnkMediaFolder = elems[i];
|
||||
var itemId = lnkMediaFolder.getAttribute("data-itemid");
|
||||
|
||||
if (isChannelsPage && "channels" == itemId) {
|
||||
lnkMediaFolder.classList.add("navMenuOption-selected");
|
||||
} else {
|
||||
if (isLiveTvPage && "livetv" == itemId) {
|
||||
}
|
||||
else if (isLiveTvPage && "livetv" == itemId) {
|
||||
lnkMediaFolder.classList.add("navMenuOption-selected");
|
||||
} else {
|
||||
if (isEditorPage && "editor" == itemId) {
|
||||
}
|
||||
else if (isEditorPage && "editor" == itemId) {
|
||||
lnkMediaFolder.classList.add("navMenuOption-selected");
|
||||
} else {
|
||||
if (isMySyncPage && "manageoffline" == itemId && -1 != window.location.href.toString().indexOf("mode=download")) {
|
||||
}
|
||||
else if (isMySyncPage && "manageoffline" == itemId && -1 != window.location.href.toString().indexOf("mode=download")) {
|
||||
lnkMediaFolder.classList.add("navMenuOption-selected");
|
||||
} else {
|
||||
if (isMySyncPage && "syncotherdevices" == itemId && -1 == window.location.href.toString().indexOf("mode=download")) {
|
||||
}
|
||||
else if (isMySyncPage && "syncotherdevices" == itemId && -1 == window.location.href.toString().indexOf("mode=download")) {
|
||||
lnkMediaFolder.classList.add("navMenuOption-selected");
|
||||
} else {
|
||||
if (id && itemId == id) {
|
||||
}
|
||||
else if (id && itemId == id) {
|
||||
lnkMediaFolder.classList.add("navMenuOption-selected");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
lnkMediaFolder.classList.remove("navMenuOption-selected");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateMenuForPageType(isDashboardPage, isLibraryPage) {
|
||||
var newPageType = isDashboardPage ? 2 : isLibraryPage ? 1 : 3;
|
||||
@ -882,12 +868,12 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
}
|
||||
};
|
||||
var currentPageType;
|
||||
pageClassOn("pagebeforeshow", "page", function (e__s) {
|
||||
pageClassOn("pagebeforeshow", "page", function (e) {
|
||||
if (!this.classList.contains("withTabs")) {
|
||||
LibraryMenu.setTabs(null);
|
||||
}
|
||||
});
|
||||
pageClassOn("pageshow", "page", function (e__d) {
|
||||
pageClassOn("pageshow", "page", function (e) {
|
||||
var page = this;
|
||||
var isDashboardPage = page.classList.contains("type-interior");
|
||||
var isLibraryPage = !isDashboardPage && page.classList.contains("libraryPage");
|
||||
@ -915,7 +901,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
|
||||
updateMenuForPageType(isDashboardPage, isLibraryPage);
|
||||
|
||||
if (!e__d.detail.isRestored) {
|
||||
if (!e.detail.isRestored) {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
@ -963,7 +949,7 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
bindMenuEvents();
|
||||
})();
|
||||
|
||||
events.on(connectionManager, "localusersignedin", function (e__f, user) {
|
||||
events.on(connectionManager, "localusersignedin", function (e, user) {
|
||||
currentDrawerType = null;
|
||||
currentUser = {
|
||||
localUser: user
|
||||
|
Loading…
Reference in New Issue
Block a user