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:
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user