mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added some titles, search icon, changed some phrases. Overallhaul
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<div id="mobile-banner"></div>
|
||||
<a id="toptitle" href="/">Zöff</a>
|
||||
<div id="chan" class="chan" title="Show big URL" onclick="show()"><?php echo(ucfirst($list));?></div>
|
||||
<input id="search" name="v" type="text" class="search_input innbox" spellcheck="false" placeholder="Search" onsubmit="null;" autocomplete="off"/>
|
||||
<input id="search" name="v" title="Search for songs..." type="text" class="search_input innbox" spellcheck="false" placeholder="Search" onsubmit="null;" autocomplete="off"/>
|
||||
<div id="results"></div>
|
||||
<div class="main">
|
||||
<div id="player" class="ytplayer"></div>
|
||||
|
||||
16
js/list.js
16
js/list.js
@@ -99,18 +99,28 @@ function updateList()
|
||||
|
||||
function vote(id, vote){
|
||||
console.log(adminpass);
|
||||
console.log($.ajax({
|
||||
serverAns = ($.ajax({
|
||||
type: "GET",
|
||||
url: "php/change.php",
|
||||
async: false,
|
||||
data: "vote="+vote+"&id="+id+"&pass="+adminpass,
|
||||
success: function() {
|
||||
console.log("voted "+vote+" on "+id);
|
||||
if(vote=="pos"){ $("#playlist").addClass("success");}
|
||||
/*if(vote=="pos"){ $("#playlist").addClass("success");}
|
||||
else{ $("#playlist").addClass("fadeerror");}
|
||||
updateList();
|
||||
updateList();*/
|
||||
},
|
||||
}).responseText);
|
||||
|
||||
if(serverAns == "wrong")
|
||||
{
|
||||
alert("Wrong adminpassword!");
|
||||
}else{
|
||||
if(vote=="pos"){ $("#playlist").addClass("success");}
|
||||
else{ $("#playlist").addClass("fadeerror");}
|
||||
updateList();
|
||||
}
|
||||
|
||||
setTimeout(function(){
|
||||
$("#playlist").removeClass("success");
|
||||
$("#playlist").removeClass("fadeerror");
|
||||
|
||||
18
js/search.js
18
js/search.js
@@ -100,22 +100,30 @@ function submitAndClose(id,title){
|
||||
|
||||
function submit(id,title){
|
||||
|
||||
console.log($.ajax({
|
||||
serverAns = $.ajax({
|
||||
type: "GET",
|
||||
url: "php/change.php",
|
||||
async: false,
|
||||
data: "v="+id+"&n="+title+"&pass="+adminpass,
|
||||
success: function() {
|
||||
console.log("added "+id);
|
||||
document.getElementById("search").value = "";
|
||||
$("#search").addClass("success");
|
||||
|
||||
//document.getElementById("search").value = "";
|
||||
//$("#search").addClass("success");
|
||||
},
|
||||
error: function(){
|
||||
console.log("error in adding");
|
||||
document.getElementById("search").value = "";
|
||||
$("#search").addClass("error");
|
||||
}
|
||||
}).responseText);
|
||||
}).responseText;
|
||||
|
||||
if(serverAns == "wrong")
|
||||
{
|
||||
alert("Wrong adminpassword");
|
||||
$("#search").addClass("error");
|
||||
}else{
|
||||
$("#search").addClass("success");
|
||||
}
|
||||
|
||||
$("#search").focus();
|
||||
|
||||
|
||||
@@ -136,6 +136,8 @@ else if(isset($_GET['v'])){ //if it
|
||||
file_put_contents($list, json_encode($data));
|
||||
print("added"); //Just telling the javascript that it has been added for some reason...
|
||||
}
|
||||
}else{
|
||||
print("wrong");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,8 +186,10 @@ else if(isset($_GET['vote'])){ //if th
|
||||
{
|
||||
echo array_key_exists($id, $data["songs"]); //not in use..i think..
|
||||
}
|
||||
}else{
|
||||
print("wrong");
|
||||
}
|
||||
echo $pass."\n".$data['conf']['adminpass'];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,5 +43,5 @@
|
||||
</div>
|
||||
|
||||
<input type="password" name="pass" id="passbox" class="passbox" placeholder="Channel password">
|
||||
<input type="submit" class="button" value="Store" onclick="submitAdmin(this.form);">
|
||||
<input type="submit" class="button" value="Login/Save" onclick="submitAdmin(this.form);" title="Save settings/Login">
|
||||
</form>
|
||||
|
||||
BIN
static/search.png
Executable file
BIN
static/search.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 418 B |
@@ -90,6 +90,9 @@ input[type="radio"]{display: none;}
|
||||
.button:hover{background-color: rgba(255,255,255,0.4); }
|
||||
|
||||
#loading{display:none;}
|
||||
#search{background: url(search.png)no-repeat 10px 18px;
|
||||
background-color: rgba(255,255,255,0.1);}
|
||||
|
||||
|
||||
@-webkit-keyframes fadein{from {opacity:0;}to{opacity:1;}}@keyframes fadein{from{opacity:0;}to{opacity:1;}}@-moz-keyframes fadein{from{opacity:0;}to{opacity:1;}}@-o-keyframes fadein{from{opacity:0;}to{opacity:1;}}
|
||||
@-webkit-keyframes fadecol{from {background-color:rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}}@keyframes fadecol{background-color: rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}}@-moz-keyframes fadecol{from{background-color: rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}}@-o-keyframes fadecol{background-color: rgba(0,255,0,0.4);}to{background-color: rgba(255,255,255,0);}
|
||||
|
||||
Reference in New Issue
Block a user