-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGUI.html
More file actions
100 lines (88 loc) · 4.05 KB
/
GUI.html
File metadata and controls
100 lines (88 loc) · 4.05 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
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
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<script type="text/powershell" id="PowerShellFunctions">
{0}
</script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://github.com/lipis/flag-icon-css/blob/master/css/flag-icon.min.css" crossorigin="anonymous">
<style>
p {
white-space: normal;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<button id="refresh" type="button" class="btn pull-right">
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
</button>
<div class="container" style="text-align:center">
<img src="https://pbs.twimg.com/profile_images/675777404477054976/iNf3tqcS.jpg" style="height: 150px">
<h1>PSConfEU</h1>
<h1>Sessions</h1>
<div style="margin-bottom: 30px" id="Nav"></div>
<div id="Main">
</div>
</div>
<script>
refreshRate = 1000;
popNav = function (result) {
document.getElementById("Nav").innerHTML = result;
$("ul li").click(function () {
$(this).addClass('active').siblings().removeClass('active');
});
$("ul li a").click(function () {
document.getElementById("Main").innerHTML = '<div class="container" style="text-align:center"><img src="http://www.girlsgotit.org/images/ajax-loader.gif" style="height: 150px"></img>'
window.external.runPowerShell(script + ";Get-SessionbyDay -day " + $(this).text(), popMain);
});
}
popMain = function (result) {
document.getElementById("Main").innerHTML = result;
$("ul li").click(function () {
$(this).addClass('active').siblings().removeClass('active');
});
$("table tr").click(function () {
$(this).addClass('active').siblings().removeClass('active');
});
$('#collapseup').on('click', function (e) {
$('#collapseup').toggleClass("hidden");
$('#collapsedown').toggleClass("hidden");
$('.panel-body').collapse('hide');
$('.panel-body').children().hide();
});
$('#collapsedown').on('click', function (e) {
$('#collapseup').toggleClass("hidden");
$('#collapsedown').toggleClass("hidden");
$('.panel-body').children().show();
$('.panel-body').collapse('show');
});
$('.panel-heading').click(function () {
if ($(this).siblings('.panel-body').is(":hidden")) {
$(this).siblings('.panel-body').children().show();
$(this).siblings('.panel-body').collapse('show');
} else {
$(this).siblings('.panel-body').collapse('hide');
$(this).siblings('.panel-body').children().hide();
}
});
$('.panel-body').toggle("collapse")
}
// Loading PowerShell Functions
var script = document.getElementById('PowerShellFunctions').innerHTML;
function getSessionDays() {
window.external.runPowerShell(script + ";Get-SessionDays", popNav);
}
$('#Refresh').on('click', function (e) {
getSessionDays();
});
getSessionDays();
</script>