-
Notifications
You must be signed in to change notification settings - Fork 0
/
budg_view.html
196 lines (166 loc) · 6.58 KB
/
budg_view.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>View Budget | Voyager</title>
<link rel="stylesheet" href="./assets/css/reset.css">
<link href="https://fonts.googleapis.com/css?family=Muli:300,400,700,900" rel="stylesheet">
<link rel="stylesheet" href="./assets/css/style.css">
<link rel = "stylesheet" href = "promo_style.css">
<style>
.view-page {
margin: auto;
display: flex;
background-color: rgba(0,0,0,0.7);
color: white;
width: 400px;
height: 0px;
}
#ip-box{
margin:auto;
width: 250px;
display:flex;
flex-direction: column;
font-size: large;
}
#ip-box input{
margin:auto
}
.options{
display: flex;
}
.options input{
margin: auto;
}
#submit_btn:hover{
background-color: grey;
opacity: 50%;
color: black;
}
</style>
</head>
<body>
<div id = "scam" style = "opacity:0;">
<div id="row1">
<form class= "boxshadow" method="get" action="BudgExpDetails" style="display:flex; flex-direction:column;height:300px;">
<label for="budg_name" style="font-size: 28px; text-shadow: 2px 2px 2px orangered;">Budget Category Name: </label>
<br>
<input type="hidden" id="tid" name="tid">
<input style="width: 200px; height: 30px;" type="text" id="budg_name" name="budg_name" required placeholder="Enter Budget Category">
<input type="submit" value="View Details" style="width: 150px;height:30px;margin:auto;margin-top:20px;margin-left:10px; font-size: 20px; text-shadow: 2px 2px 2px white;">
</form>
</div>
</div>
<div class = "nav-bar">
<div id = "logo-def">
<a id = "logo-img" href = "index.html">
<img src="images/logo2-1.png" alt="logo" width=270px>
</a>
</div>
<div id = "prof">
<div id = "arr-div" style = "margin-top:5px; margin-left:auto; border-radius:25px;display:flex;">
<span id = "arrow" style = "font-size:40px; height:fit-content; margin-top:-5px; width:25px;">⌄</span>
<img src="images/img.jpg" width="52px" style = "border-radius:25px; margin-left:8px;">
</div>
<div id = "drop">
<span><a href = "profile_details.html">Profile</a></span><br>
<span><a onclick = "window.location.replace('LogOut');" style = "cursor:pointer;">LogOut</a></span>
</div>
</div>
</div>
<div id="heading">
<h1 style="margin-left: 90px; margin-top: 50px;">
<span>View Budget</span>
</h1>
</div>
<script src="./assets/js/main.js"></script>
<script>
window.onload(load());
var tid;
function load(){
setTimeout(function(){fadein();}, 500);
var url_string = window.location.href;
var url = new URL(url_string);
tid = url.searchParams.get("tid");
document.getElementById("tid").value=tid;
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
}
setTimeout(function(){
fadein(n);
}, 300);
};
}
function fadein(){
var ele = document.getElementById("scam");
ele.style.display = "flex";
ele.style.opacity = parseFloat(ele.style.opacity)+0.05;
if(ele.style.opacity < 1){
setTimeout(function(){fadein();}, 50);
}
}
function view(){
//event.preventDefault();
//document.getElementById("row1").style.backgroundColor = "rgba(30,30,30,0.8)";
//var h = document.getElementById("moveup-page").style.height;
//h = parseInt(h);
//moveup(h);
//fadeout(2);
//window.alert("hey");
var url_string = window.location.href;
var url = new URL(url_string);
var budg_name = document.getElementById('budg_name').value;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//window.alert("hey");
document.getElementById("moveup-page").innerHTML = "";
document.getElementById("moveup-page").innerHTML =this.responseText;
if(document.getElementsByClassName("sign-page").length!=0){
document.getElementsByClassName("sign-page")[0].style.opacity = 100;
}
if(document.getElementsByClassName("view-page").length!=0){
document.getElementsByClassName("view-page")[0].style.opacity = 100;
}
}
setTimeout(function(){
fadein(n);
}, 300);
};
xhttp.open("GET", "BudgExpDetails?trip_id="+tid+"&budg_name="+budg_name, true);
xhttp.send();
}
function moveup(h){
if(h==75){
return;
}
document.getElementById("moveup-page").style.height = h+"vh";
h = h+1;
setTimeout("moveup("+h+")", 10);
document.getElementById("heading").remove();
}
function fadeout(n){
if(document.getElementsByClassName("sign-page").length==0 && document.getElementsByClassName("log-page").length==0){
return;
}
if(n==2 && document.getElementsByClassName("sign-page").length != 0){
var ele = document.getElementsByClassName("sign-page")[0];
if(ele.style.opacity == 0){
return;
}
ele.style.opacity-=0.05;
}
if(n==1 && document.getElementsByClassName("view-page").length != 0){
var ele = document.getElementsByClassName("view-page")[0];
if(ele.style.opacity == 0){
return;
}
ele.style.opacity-=0.05;
}
setTimeout("fadeout("+n+")", 10);
}
</script>
</body>
</html>