Fixed width of titlebar of songs

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-24 14:09:12 +01:00
parent 9d21e059f7
commit 870e805743
6 changed files with 47 additions and 13 deletions

View File

@@ -1869,6 +1869,15 @@ nav ul li:hover, nav ul li.active {
}
}
@media only screen and (max-width: 768px){
#results{
background-color: #000;
margin-top:56px;
}
}
@media only screen and (min-width: 769px){
@@ -1889,7 +1898,7 @@ nav ul li:hover, nav ul li.active {
left: 25%;
}
.title-container li {
width: 71%;
/*width: 71%;*/
}
#wrapper {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -175,6 +175,13 @@ function init(){
stop: function(event, ui) {
$('iframe').css('pointer-events','auto');
Crypt.set_width($(this).width());
if($(window).width() > 769){
var test_against_width = $(window).width() - $(".control-list").width() - $(".zbrand").outerWidth() - $(".brand-logo-navigate").outerWidth() - 66;
title_width = test_against_width;
$(".title-container").width(title_width);
} else {
$(".title-container").width("100%");
}
},
handles: "e",
minWidth: 350,
@@ -207,7 +214,6 @@ function init(){
$("#code-text").text(id);
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
$("#code-link").attr("href", codeURL);
}
if(no_socket) socket.emit('list', chan.toLowerCase());
@@ -514,7 +520,9 @@ $(document).keyup(function(e) {
$("#search-btn i").toggleClass("mdi-navigation-close");
$("#search-btn i").toggleClass("mdi-action-search");
}
$("#results").toggleClass("hide");
if(!Helper.contains($("#search-container").attr("class").split(" "), "hide")){
$("#results").toggleClass("hide");
}
}
});
@@ -820,7 +828,7 @@ function searchTimeout(event) {
code = event.keyCode || event.which;
if (code != 40 && code != 38 && code != 13 && code != 39 && code != 37 &&
code != 17 && code != 16 && code != 225 && code != 18) {
code != 17 && code != 16 && code != 225 && code != 18 && code != 27) {
clearTimeout(timeout_search);
if(search_input.length < 3){$("#results").html("");}
if(code == 13){
@@ -837,11 +845,11 @@ function searchTimeout(event) {
if(/iPad|iPhone|iPod/.test(navigator.userAgent)){
$(document).on('keydown', '.search_input', function(event) {
searchTimeout(event);
searchTimeout(event);
});
} else {
$(document).on('keyup', ".search_input", function(event) {
searchTimeout(event);
searchTimeout(event);
});
}
@@ -971,6 +979,13 @@ $(window).resize(function(){
List.element_height = (($("#wrapper").height()) / List.can_fit)-6;
$(".list-song").css("height", List.element_height + "px");
$("#player_overlay").width($("#player").width()+1);
if($(window).width() > 769){
var test_against_width = $(window).width() - $(".control-list").width() - $(".zbrand").outerWidth() - $(".brand-logo-navigate").outerWidth() - 66;
title_width = test_against_width;
$(".title-container").width(title_width);
} else {
$(".title-container").width("100%");
}
}
})

View File

@@ -358,6 +358,16 @@ var Player = {
set_width: function(val){
$(".video-container").width(val);
if(!Helper.mobilecheck()){
if($(window).width() > 769){
var test_against_width = $(window).width() - $(".control-list").width() - $(".zbrand").outerWidth() - $(".brand-logo-navigate").outerWidth() - 66;
title_width = test_against_width;
$(".title-container").width(title_width);
} else {
$(".title-container").width("100%");
}
}
},
notifyUser: function(id, title) {

View File

@@ -10,7 +10,7 @@ var Search = {
$(".search_input").focus();
}
$("#song-title").toggleClass("hide");
$("#results").toggleClass("hide");
//$("#results").toggleClass("hide");
$("#results").empty();
$("#search-btn i").toggleClass("mdi-navigation-close");
$("#search-btn i").toggleClass("mdi-action-search");