mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added halfwayskipbar
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<?php include("php/header.php"); ?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="pBar"></div>
|
||||
<div id="sBar"></div>
|
||||
<div id="eBar"></div>
|
||||
<div class="bgimage" id="bgimage"></div>
|
||||
|
||||
19
js/list.js
19
js/list.js
@@ -132,19 +132,34 @@ function vote(id, vote){
|
||||
}
|
||||
|
||||
function skip(){
|
||||
console.log($.ajax({
|
||||
voteRes = ($.ajax({
|
||||
type: "GET",
|
||||
url: "php/change.php",
|
||||
async: false,
|
||||
data: "skip",
|
||||
success: function() {
|
||||
console.log("voted to skip song");
|
||||
$("#search").addClass("success");
|
||||
//$("#search").addClass("success");
|
||||
updateList();
|
||||
},
|
||||
}).responseText);
|
||||
|
||||
console.log(voteRes.split("/"));
|
||||
skipVotes = voteRes.split("/");
|
||||
if(skipVotes[0]>= skipVotes[1]/2)
|
||||
{
|
||||
document.getElementById("sBar").innerHTML = "Successfully skipped!";
|
||||
$("#sBar").addClass("opacityFull");
|
||||
}else
|
||||
{
|
||||
document.getElementById("pBar").innerHTML = "Vote registrated! "+skipVotes[0]+" of "+skipVotes[1]+" has skipped. "+(Math.ceil(skipVotes[1]/2))+" or more is needed!";
|
||||
$("#pBar").addClass("opacityFull");
|
||||
}
|
||||
|
||||
setTimeout(function(){
|
||||
$("#search").removeClass("success");
|
||||
$("#sBar").removeClass("opacityFull");
|
||||
$("#pBar").removeClass("opacityFull");
|
||||
},1500);
|
||||
}
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ input[type="radio"] {
|
||||
box-shadow:0 0 10px .5px #000;
|
||||
}
|
||||
|
||||
#eBar,#sBar {
|
||||
#eBar,#sBar, #pBar {
|
||||
font-family:'Open Sans',sans-serif;
|
||||
font-weight:300;
|
||||
color:#fff;
|
||||
@@ -509,6 +509,10 @@ input[type="radio"] {
|
||||
background-color:#5bcf2b;
|
||||
}
|
||||
|
||||
#pBar {
|
||||
background-color:rgb(28, 143, 194);
|
||||
}
|
||||
|
||||
.opacityFull {
|
||||
opacity:1!important;
|
||||
}
|
||||
@@ -787,7 +791,9 @@ input[type="radio"] {
|
||||
}
|
||||
|
||||
.nochanvcent {
|
||||
top:50%;
|
||||
position: absolute;
|
||||
top:10%;
|
||||
/*top:50%;*/
|
||||
-webkit-transform:translateY(0%);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user