Merge pull request #93 from nixolas1/qfixfix

Added some titles, search icon, changed some phrases. Overallhaul
This commit is contained in:
KasperRT
2015-01-28 23:09:10 +01:00
7 changed files with 36 additions and 11 deletions

View File

@@ -17,7 +17,7 @@
<div id="mobile-banner"></div> <div id="mobile-banner"></div>
<a id="toptitle" href="/">Zöff</a> <a id="toptitle" href="/">Zöff</a>
<div id="chan" class="chan" title="Show big URL" onclick="show()"><?php echo(ucfirst($list));?></div> <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 id="results"></div>
<div class="main"> <div class="main">
<div id="player" class="ytplayer"></div> <div id="player" class="ytplayer"></div>

View File

@@ -99,18 +99,28 @@ function updateList()
function vote(id, vote){ function vote(id, vote){
console.log(adminpass); console.log(adminpass);
console.log($.ajax({ serverAns = ($.ajax({
type: "GET", type: "GET",
url: "php/change.php", url: "php/change.php",
async: false, async: false,
data: "vote="+vote+"&id="+id+"&pass="+adminpass, data: "vote="+vote+"&id="+id+"&pass="+adminpass,
success: function() { success: function() {
console.log("voted "+vote+" on "+id); console.log("voted "+vote+" on "+id);
/*if(vote=="pos"){ $("#playlist").addClass("success");}
else{ $("#playlist").addClass("fadeerror");}
updateList();*/
},
}).responseText);
if(serverAns == "wrong")
{
alert("Wrong adminpassword!");
}else{
if(vote=="pos"){ $("#playlist").addClass("success");} if(vote=="pos"){ $("#playlist").addClass("success");}
else{ $("#playlist").addClass("fadeerror");} else{ $("#playlist").addClass("fadeerror");}
updateList(); updateList();
}, }
}).responseText);
setTimeout(function(){ setTimeout(function(){
$("#playlist").removeClass("success"); $("#playlist").removeClass("success");
$("#playlist").removeClass("fadeerror"); $("#playlist").removeClass("fadeerror");

View File

@@ -100,22 +100,30 @@ function submitAndClose(id,title){
function submit(id,title){ function submit(id,title){
console.log($.ajax({ serverAns = $.ajax({
type: "GET", type: "GET",
url: "php/change.php", url: "php/change.php",
async: false, async: false,
data: "v="+id+"&n="+title+"&pass="+adminpass, data: "v="+id+"&n="+title+"&pass="+adminpass,
success: function() { success: function() {
console.log("added "+id);
document.getElementById("search").value = ""; //document.getElementById("search").value = "";
$("#search").addClass("success"); //$("#search").addClass("success");
}, },
error: function(){ error: function(){
console.log("error in adding"); console.log("error in adding");
document.getElementById("search").value = ""; document.getElementById("search").value = "";
$("#search").addClass("error"); $("#search").addClass("error");
} }
}).responseText); }).responseText;
if(serverAns == "wrong")
{
alert("Wrong adminpassword");
$("#search").addClass("error");
}else{
$("#search").addClass("success");
}
$("#search").focus(); $("#search").focus();

View File

@@ -136,6 +136,8 @@ else if(isset($_GET['v'])){ //if it
file_put_contents($list, json_encode($data)); file_put_contents($list, json_encode($data));
print("added"); //Just telling the javascript that it has been added for some reason... 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.. echo array_key_exists($id, $data["songs"]); //not in use..i think..
} }
}else{
print("wrong");
} }
echo $pass."\n".$data['conf']['adminpass'];
} }
} }

View File

@@ -43,5 +43,5 @@
</div> </div>
<input type="password" name="pass" id="passbox" class="passbox" placeholder="Channel password"> <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> </form>

BIN
static/search.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

View File

@@ -90,6 +90,9 @@ input[type="radio"]{display: none;}
.button:hover{background-color: rgba(255,255,255,0.4); } .button:hover{background-color: rgba(255,255,255,0.4); }
#loading{display:none;} #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 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);} @-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);}