-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbzopen.html
53 lines (53 loc) · 1.33 KB
/
bzopen.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
<html>
<head>
<script>
<!--
function redirect() {
var searchitem = document.getElementById("search");
var numberPattern = /\d+/;
var bz = searchitem.value.match( numberPattern )
if (bz === null) {
document.getElementById("errmsg").textContent = "ERROR parsing: " + searchitem.value
} else {
document.getElementById("errmsg").textContent = ""
document.getElementById("pg").textContent = "Forwarding to Bugzilla: " + bz + ' ...'
window.location.replace("https://bugzilla.redhat.com/show_bug.cgi?id=" + bz);
}
}
-->
</script>
<style>
html, body {
height: 100%;
}
.parent {
width: 100%;
height: 100%;
display: table;
text-align: center;
}
.parent > .child {
display: table-cell;
vertical-align: middle;
}
.jku {
background-color: coral;
}
.errmsg {
background-color: red;
color: white;
}
</style>
</head>
<body>
<section class="parent"> <div class="child">
<form action="javascript:redirect()">
<span id="errmsg" class="errmsg"></span>
<div class="jku" id="pg">
<label>BZ : <input id="search" type="search" autofocus> </label>
<button type="submit">Go to Bugzilla</button>
</div>
</form>
</div> </section>
</body>
</html>