Added some titles, search icon, changed some phrases. Overallhaul

This commit is contained in:
Kasper Rynning-Tønnesen
2015-01-28 23:08:02 +01:00
parent 332defc64f
commit e204c0f71b
7 changed files with 36 additions and 11 deletions

View File

@@ -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();