-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.js
More file actions
61 lines (60 loc) · 1.59 KB
/
admin.js
File metadata and controls
61 lines (60 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Javascript ::
*/
if(response!=0){
document.getElementById("home").style.display="none";
document.getElementById("request").style.display="none";
document.getElementById("login").style.display="block";
document.getElementById('message').style.display='inline-block';
document.getElementById('message').innerHTML=response;
}
if(response=='You are logged in,Check Requests'){
document.getElementById('request_select').style.display='block';
var x=document.getElementById('login').getElementsByTagName('button')[0];
x.setAttribute("disabled","disabled");
x.style.backgroundColor="grey";
}
/*
* JQuery ::
*/
function show(x){
$("#login , #home, #request").hide();
$('#'+x).fadeIn();
}
function reject(x){
var y = $(x).parent();
var z=$(y).find('a.regno').text();
$.post("response.php",{
regno : z,
response:"-1"
},
function(){
y = y.find('img').slideUp(function(){
$(this).attr("src","img/reject.png");
}).slideDown();
})
}
function accept(x){
var y = $(x).parent();
var z=$(y).find('a.regno').text();
$.post("response.php",{
regno : z,
response:"1"
},
function(){
y = y.find('img').slideUp(function(){
$(this).attr("src","img/accept.png");
}).slideDown();
})
}
function look(x){
var y=$(x).parent().parent();
$(y).find('iframe').slideToggle();
$('html, body').animate({
scrollTop: $(y).find('iframe').offset().top-80
}, 1000);
}
function display(x){
$(".rejected , .accepted, .new").hide();
$('.'+x).fadeIn();
}