fix alphaPicker class

This commit is contained in:
grafixeyehero 2020-01-21 21:58:44 +03:00
parent 6c56234171
commit a25e5d7f9b
8 changed files with 41 additions and 27 deletions

View File

@ -169,9 +169,11 @@ define(["loading", "layoutManager", "userSettings", "events", "libraryBrowser",
valueChangeEvent: "click"
});
if (layoutManager.desktop || layoutManager.mobile) {
alphaPickerElement.classList.add("alphabetPicker-right");
itemsContainer.classList.remove("padded-left-withalphapicker");
if (layoutManager.tv) {
alphaPickerElement.classList.add("alphaPicker-fixed-left");
itemsContainer.classList.add("padded-left-withalphapicker");
} else {
alphaPickerElement.classList.add("alphaPicker-fixed-right");
itemsContainer.classList.add("padded-right-withalphapicker");
}
}

View File

@ -193,6 +193,7 @@ define(["layoutManager", "loading", "events", "libraryBrowser", "imageLoader", "
function initPage(tabContent) {
var alphaPickerElement = tabContent.querySelector(".alphaPicker");
var itemsContainer = tabContent.querySelector(".itemsContainer");
alphaPickerElement.addEventListener("alphavaluechanged", function (e) {
var newValue = e.detail.value;
var query = getQuery(tabContent);
@ -205,10 +206,11 @@ define(["layoutManager", "loading", "events", "libraryBrowser", "imageLoader", "
valueChangeEvent: "click"
});
if (layoutManager.desktop || layoutManager.mobile) {
if (layoutManager.tv) {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-left");
itemsContainer.classList.add("padded-left-withalphapicker");
} else {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-right");
var itemsContainer = tabContent.querySelector(".itemsContainer");
itemsContainer.classList.remove("padded-left-withalphapicker");
itemsContainer.classList.add("padded-right-withalphapicker");
}

View File

@ -199,6 +199,7 @@ define(["layoutManager", "playbackManager", "loading", "events", "libraryBrowser
function initPage(tabContent) {
var alphaPickerElement = tabContent.querySelector(".alphaPicker");
var itemsContainer = tabContent.querySelector(".itemsContainer");
alphaPickerElement.addEventListener("alphavaluechanged", function (e) {
var newValue = e.detail.value;
@ -211,10 +212,11 @@ define(["layoutManager", "playbackManager", "loading", "events", "libraryBrowser
element: alphaPickerElement,
valueChangeEvent: "click"
});
if (layoutManager.desktop || layoutManager.mobile) {
if (layoutManager.tv) {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-left");
itemsContainer.classList.add("padded-left-withalphapicker");
} else {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-right");
var itemsContainer = tabContent.querySelector(".itemsContainer");
itemsContainer.classList.remove("padded-left-withalphapicker");
itemsContainer.classList.add("padded-right-withalphapicker");
}

View File

@ -181,6 +181,7 @@ define(["layoutManager", "loading", "events", "libraryBrowser", "imageLoader", "
function initPage(tabContent) {
var alphaPickerElement = tabContent.querySelector(".alphaPicker");
var itemsContainer = tabContent.querySelector(".itemsContainer");
alphaPickerElement.addEventListener("alphavaluechanged", function (e) {
var newValue = e.detail.value;
@ -193,10 +194,13 @@ define(["layoutManager", "loading", "events", "libraryBrowser", "imageLoader", "
element: alphaPickerElement,
valueChangeEvent: "click"
});
if (layoutManager.desktop || layoutManager.mobile) {
if (layoutManager.tv) {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-left");
alphaPickerElement.classList.add("alphaPicker-fixed-left");
itemsContainer.classList.add("padded-left-withalphapicker");
} else {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-right");
var itemsContainer = tabContent.querySelector(".itemsContainer");
itemsContainer.classList.remove("padded-left-withalphapicker");
alphaPickerElement.classList.add("alphaPicker-fixed-right");
itemsContainer.classList.add("padded-right-withalphapicker");
}

View File

@ -210,6 +210,7 @@ define(["layoutManager", "loading", "events", "libraryBrowser", "imageLoader", "
function initPage(tabContent) {
var alphaPickerElement = tabContent.querySelector(".alphaPicker");
var itemsContainer = tabContent.querySelector(".itemsContainer");
alphaPickerElement.addEventListener("alphavaluechanged", function (e) {
var newValue = e.detail.value;
@ -222,10 +223,13 @@ define(["layoutManager", "loading", "events", "libraryBrowser", "imageLoader", "
element: alphaPickerElement,
valueChangeEvent: "click"
});
if (layoutManager.desktop || layoutManager.mobile) {
if (layoutManager.tv) {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-left");
alphaPickerElement.classList.add("alphaPicker-fixed-left");
itemsContainer.classList.add("padded-left-withalphapicker");
} else {
tabContent.querySelector(".alphaPicker").classList.add("alphabetPicker-right");
var itemsContainer = tabContent.querySelector(".itemsContainer");
itemsContainer.classList.remove("padded-left-withalphapicker");
alphaPickerElement.classList.add("alphaPicker-fixed-right");
itemsContainer.classList.add("padded-right-withalphapicker");
}

View File

@ -8,10 +8,10 @@
<button is="paper-icon-button-light" class="btnFilter autoSize" title="${ButtonFilter}"><i class="md-icon">filter_list</i></button>
</div>
<div class="alphaPicker alphaPicker-fixed alphaPicker-fixed-right alphaPicker-vertical">
<div class="alphaPicker alphaPicker-fixed alphaPicker-vertical">
</div>
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-left-withalphapicker padded-right">
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right">
</div>
<div class="flex align-items-center justify-content-center flex-wrap-wrap padded-top padded-left padded-right padded-bottom">
<div class="paging"></div>
@ -53,7 +53,7 @@
<div class="alphaPicker alphaPicker-fixed alphaPicker-fixed-right alphaPicker-vertical">
</div>
<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-left-withalphapicker padded-right">
<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-right">
</div>
<div class="flex align-items-center justify-content-center flex-wrap-wrap padded-top padded-left padded-right padded-bottom">
<div class="paging"></div>
@ -90,4 +90,4 @@
</div>
<div class="pageTabContent" data-index="6">
</div>
</div>
</div>

View File

@ -44,10 +44,10 @@
<button is="paper-icon-button-light" class="btnFilter autoSize" title="${ButtonFilter}"><i class="md-icon">filter_list</i></button>
</div>
<div class="alphaPicker alphaPicker-fixed alphaPicker-fixed-right alphaPicker-vertical">
<div class="alphaPicker alphaPicker-fixed alphaPicker-vertical">
</div>
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-left-withalphapicker padded-right">
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right">
</div>
<div class="flex align-items-center justify-content-center flex-wrap-wrap padded-top padded-left padded-right padded-bottom">
<div class="paging"></div>
@ -60,10 +60,10 @@
<button is="paper-icon-button-light" class="btnFilter autoSize" title="${ButtonFilter}"><i class="md-icon">filter_list</i></button>
</div>
<div class="alphaPicker alphaPicker-fixed alphaPicker-fixed-right alphaPicker-vertical">
<div class="alphaPicker alphaPicker-fixed alphaPicker-vertical">
</div>
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-left-withalphapicker padded-right">
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right">
</div>
<div class="flex align-items-center justify-content-center flex-wrap-wrap padded-top padded-left padded-right padded-bottom">
<div class="paging"></div>
@ -76,10 +76,10 @@
<button is="paper-icon-button-light" class="btnFilter autoSize" title="${ButtonFilter}"><i class="md-icon">filter_list</i></button>
</div>
<div class="alphaPicker alphaPicker-fixed alphaPicker-fixed-right alphaPicker-vertical">
<div class="alphaPicker alphaPicker-fixed alphaPicker-vertical">
</div>
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-left-withalphapicker padded-right">
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right">
</div>
<div class="flex align-items-center justify-content-center flex-wrap-wrap padded-top padded-left padded-right padded-bottom">
<div class="paging"></div>

View File

@ -8,8 +8,8 @@
<button is="paper-icon-button-light" class="btnFilter autoSize" title="${ButtonFilter}"><i class="md-icon">filter_list</i></button>
</div>
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-left-withalphapicker padded-right"></div>
<div class="alphaPicker alphaPicker-fixed alphaPicker-fixed-right alphaPicker-vertical"></div>
<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right"></div>
<div class="alphaPicker alphaPicker-fixed alphaPicker-vertical"></div>
<div class="flex align-items-center justify-content-center flex-wrap-wrap padded-top padded-left padded-right padded-bottom">
<div class="paging"></div>