Fixed sizing issue of playlistitems in client

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-30 18:43:18 +02:00
parent b2f51c4682
commit 96e0c31bf9
3 changed files with 12 additions and 9 deletions

View File

@@ -198,7 +198,8 @@ function get_list_ajax() {
List.populate_list(response.results);
}
},
error: function(response, xmlhttp) {
error: function(response) {
console.log(response);
response = JSON.parse(response);
if(response.status == 403) {
start_auth();

View File

@@ -162,8 +162,8 @@ var List = {
List.can_fit = Math.round((Helper.computedStyle(".tabs", "height") - Helper.computedStyle("header", "height") - 64 - 40) / 71)+1;
List.element_height = ((window.innerHeight - Helper.computedStyle(".tabs", "height") - Helper.computedStyle("header", "height") - 64 - 40) / List.can_fit)-5;
} else {
List.can_fit = Math.round(window.innerHeight - Helper.computedStyle("header", "height") / 80)+1;
List.element_height = (window.innerHeight - Helper.computedStyle("header", "height") / List.can_fit) - 8;
List.can_fit = Math.round(Helper.computedStyle("#wrapper", "height") / 71)+1;
List.element_height = (Helper.computedStyle("#wrapper", "height") / List.can_fit)-5.3;
}
if(List.element_height < 55.2 && !client){
List.can_fit = List.can_fit - 1;

View File

@@ -1233,13 +1233,15 @@ window.addEventListener("resize", function(){
List.element_height = (Helper.computedStyle("#wrapper", "height") / List.can_fit)-5.3;
Helper.css(".list-song", "height", List.element_height + "px");
Channel.set_title_width();
var controlsPosition = document.querySelector("#controls").offsetHeight - Helper.computedStyle("#controls", "height");
if(document.querySelectorAll("#controls").length > 0 && !Helper.mobilecheck()) {
Helper.css(document.querySelector("#seekToDuration"), "top", controlsPosition - 55);
} else if(document.querySelectorAll("#controls").length > 0) {
Helper.css(document.querySelector("#seekToDuration"), "top", controlsPosition - 20);
if(!client) {
var controlsPosition = document.querySelector("#controls").offsetHeight - Helper.computedStyle("#controls", "height");
if(document.querySelectorAll("#controls").length > 0 && !Helper.mobilecheck()) {
Helper.css(document.querySelector("#seekToDuration"), "top", controlsPosition - 55);
} else if(document.querySelectorAll("#controls").length > 0) {
Helper.css(document.querySelector("#seekToDuration"), "top", controlsPosition - 20);
}
Channel.window_width_volume_slider();
}
Channel.window_width_volume_slider();
}
});