Making find more usefull and functioning

This commit is contained in:
KasperRT
2015-03-07 04:13:46 +01:00
parent 8222d62bd9
commit e7b1cc5f78
5 changed files with 48 additions and 17 deletions

View File

@@ -43,7 +43,7 @@
</div> </div>
<div class="result hiddenAdmin" id="adminPanel"><?php include("php/panel.php");?> </div> <div class="result hiddenAdmin" id="adminPanel"><?php include("php/panel.php");?> </div>
<form id="findform"> <form id="findform">
<input id="findform-input" type="text" onsubmit="null;"> <input id="findform-input" type="text" onsubmit="null;" placeholder="Search list..">
</form> </form>
<div id="playlist"> <div id="playlist">
<div id="wrapper"> <div id="wrapper">

View File

@@ -5,13 +5,22 @@ function admin()
{ {
adminTogg = !adminTogg; adminTogg = !adminTogg;
if(adminTogg) if(adminTogg)
{
if(find) extraHeight = 0; if(find)
else extraHeight = 30; {
eH = -10;
if(adminTogg) $("#playlist").height($("#player").height()-270+extraHeight); //opening }else
if(!adminTogg)$("#playlist").height($("#player").height()+extraHeight);; //closing eH = 30;
$("#playlist").height($("#player").height()-270+eH); //opening
}else if(!adminTogg)
{
if(find)
{
eH = -10;
}else
eH = 30;
$("#playlist").height($("#player").height()+eH); //closing
}
$("#adminPanel").toggleClass("hiddenAdmin"); $("#adminPanel").toggleClass("hiddenAdmin");
} }

View File

@@ -58,7 +58,7 @@ function updateList()
{ {
if(!window.mobilecheck()) if(!window.mobilecheck())
{ {
$("#playlist").css({height: $("#player").height()-$("#adminPanel").outerHeight(true)+30}); $("#playlist").css({height: $("#player").height()-$("#adminPanel").outerHeight(true)-$("#findform").outerHeight(true)+30});
$("#playlist").css({overflow: "hidden"}); $("#playlist").css({overflow: "hidden"});
if(scroller === false) if(scroller === false)
{ {

View File

@@ -25,11 +25,30 @@ $(document).ready(function()
if(find) $("#playlist").height($("#player").height()-30+30); if(find) $("#playlist").height($("#player").height()-30+30);
if(!find)$("#playlist").height($("#player").height()+30);; //closing if(!find)$("#playlist").height($("#player").height()+30);; //closing
*/ */
if(adminTogg) extraHeight = -300; /*if(adminTogg) extraHeight = -300;
else extraHeight = -30; else extraHeight = -30;*/
if(find) $("#playlist").height($("#player").height()+extraHeight+30); //opening if(find)
if(!find)$("#playlist").height($("#player").height()+extraHeight+60);; //closing {
if($("#adminPanel").height() != 0)
{
extraHeight = $("#adminPanel").height()+30;
}else
{
extraHeight = 10;
}
$("#playlist").height($("#player").height()-extraHeight); //opening
}else if(!find)
{
if($("#adminPanel").height() != 0)
{
extraHeight = $("#adminPanel").height()-10;
}else
{
extraHeight = -30;
}
$("#playlist").height($("#player").height()-extraHeight);; //closing
}
myScroll.refresh(); myScroll.refresh();
setTimeout(function(){myScroll.refresh();}, 505); setTimeout(function(){myScroll.refresh();}, 505);
@@ -54,8 +73,11 @@ $(document).ready(function()
{ {
//found[0].style.backgroundColor = "rgba(0,0,0,0.5)"; //found[0].style.backgroundColor = "rgba(0,0,0,0.5)";
//found[0].setAttribute("style", "-webkit-filter:brightness(100%)"); //found[0].setAttribute("style", "-webkit-filter:brightness(100%)");
found[0].className = found[0].className + " fullbrightness"; for(i = 0; i < found.length; i++)
bright = found[0].className.split(" ")[0]; {
found[i].className = found[i].className + " fullbrightness";
bright = found[i].className.split(" ")[i];
}
//found[0].style.backgroundColor = "red"; //found[0].style.backgroundColor = "red";
myScroll.scrollToElement(found[0], 10, 0, -30); myScroll.scrollToElement(found[0], 10, 0, -30);
}else }else

View File

@@ -17,7 +17,7 @@ body {
.fullbrightness { .fullbrightness {
-webkit-filter:brightness(100%); -webkit-filter:brightness(100%);
filter:brightness(100%); filter:brightness(100%);
background-color:rgba(0,0,0,0.5); /*background-color:rgba(0,0,0,0.2);*/
} }
#findform { #findform {
@@ -46,7 +46,7 @@ body {
} }
.display { .display {
height:30px !important; height:40px !important;
} }
.top { .top {