diff --git a/js/search.js b/js/search.js
index e421eb34..e11771fe 100755
--- a/js/search.js
+++ b/js/search.js
@@ -27,6 +27,7 @@ $(document).ready(function()
}else if(event.keyCode == 27){
$("#results").html("");
$(".main").removeClass("blurT");
+ $(".main").removeClass("clickthrough");
}else{
i = 0;
timer=100;
@@ -67,6 +68,7 @@ $(document).keyup(function(e) {
document.getElementById("search").value = "";
$(".main").removeClass("blurT");
$("#controls").removeClass("blurT");
+ $(".main").removeClass("clickthrough");
}
}
});
@@ -103,7 +105,7 @@ function search(search_input){
\
\
";
//+data.uploader+" • "+
@@ -117,6 +119,7 @@ function search(search_input){
{
$(".main").addClass("blurT");
$("#controls").addClass("blurT");
+ $(".main").addClass("clickthrough");
}
$(""+wrapper+"
").appendTo('#results').slideDown('slow');
@@ -129,18 +132,19 @@ function search(search_input){
}else{
$(".main").removeClass("blurT");
$("#controls").removeClass("blurT");
+ $(".main").removeClass("clickthrough");
}
}
function submitAndClose(id,title){
- submit(id,title);
+ submit(id,title, true);
$("#results").html('');
console.log("sub&closed");
}
-function submit(id,title){
+function submit(id,title,type){
serverAns = $.ajax({
type: "GET",
@@ -148,21 +152,27 @@ function submit(id,title){
async: false,
data: "v="+id+"&n="+title+"&pass="+adminpass,
success: function() {
-
- document.getElementById("search").value = "";
- $("#results").html = "";
- $(".main").removeClass("blurT");
- $("#controls").removeClass("blurT");
+ if(type){
+ document.getElementById("search").value = "";
+ $("#results").html = "";
+ $(".main").removeClass("blurT");
+ $("#controls").removeClass("blurT");
+ $(".main").removeClass("clickthrough");
+ }
//$("#search").addClass("success");
},
error: function(){
-
+
console.log("error in adding");
- document.getElementById("search").value = "";
- $("#results").html = "";
- $(".main").removeClass("blurT");
- $("#controls").removeClass("blurT");
- $("#search").addClass("error");
+ if(type)
+ {
+ document.getElementById("search").value = "";
+ $("#results").html = "";
+ $(".main").removeClass("blurT");
+ $("#controls").removeClass("blurT");
+ $(".main").removeClass("clickthrough");
+ $("#search").addClass("error");
+ }
}
}).responseText;
diff --git a/static/style.css b/static/style.css
index 919f08e4..d1f6d0d7 100755
--- a/static/style.css
+++ b/static/style.css
@@ -93,6 +93,8 @@ input[type="radio"]{display: none;}
.toggtext{display: inline;}
.adminBox{float:right;}
+.clickthrough{pointer-events: none;}
+
#adminPanel{border-bottom: none; color:white; height:190px; padding: 10px; overflow:hidden; background-color: rgba(0,0,0,0.2); transition: height 0.5s;}
.hiddenAdmin{padding:0 !important; margin:0 !important; height: 0 !important;}
.button{background-color: rgba(255,255,255,0.2); border-radius: 4px; border: none;color: white;padding: 5px 15px; margin-top: 15px; transition: all 0.1s ease-in-out;}