-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscale2.design.html
149 lines (127 loc) · 7.6 KB
/
scale2.design.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
<html>
<head>
<script>
var person = "John";
</script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://kit.fontawesome.com/a749e2e086.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link rel="stylesheet" href="StyleSheet1.css" />
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<link rel="stylesheet" href="materials/style.css" />
</head>
<body>
<!-- Body -->
<div class="nh_topbar _size2">
<div class="nh_topbar_left">
<a href="home.design.html" class="btn-light btn _img"><i class="fas fa-chevron-left"></i> <span class="_back">Back</span></a>
</div>
<h5 class="_title"></h5>
<div class="nh_topbar_right">
<div class="dropdown" style="display:inline">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span style="padding: 10px">
<i class="fas fa-house-user"></i> <span class="_size_hide">Hello, </span><b><span class="_name"></span></b>
</span>
</button>
<div style="padding-bottom:0" class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="_main _main1 dropdown-item" href="home.design.html">
<i class="fas fa-home">
</i> Home
</a>
<a class="_main _main1 dropdown-item" href="home.design.html"><i class="fas fa-phone-alt"></i> Extras</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item nh_logout_btn" href="" data-toggle="modal" data-target="#exampleModal"><i class="fas fa-sign-out-alt"></i> Logout...</a>
</div>
</div>
</div>
</div>
<div class="_content">
<div class="nh_topbar_back"></div>
<div class="scale_btns">
<h5><i class="fas fa-frown-open"></i> <i class="fas fa-grin-beam"></i> How are you feeling today?</h5>
<p>Please select a rating and tap Submit</p>
<button class="btn btn-dark"><span class="scale_label">1<i class="fas fa-frown-open"></i></span><span class="scale_text">Poorer</span></button>
<button class="btn btn-danger"><span class="scale_label">2<i class="fas fa-frown"></i></span><span class="scale_text"> Poor</span></button>
<button class="btn btn-warning"><span class="scale_label">3<i class="fas fa-smile"></i></span><span class="scale_text"> Okay</span></button>
<button class="btn btn-primary"><span class="scale_label">4<i class="fas fa-grin"></i></span><span class="scale_text"> Good</span></button>
<button class="btn btn-success"><span class="scale_label">5<i class="fas fa-grin-beam"></i></span><span class="scale_text">Excellent</span></button>
</div>
<hr />
<p class="scale_showSelected alert alert-danger">Please select an option...</p>
<button data-toggle="modal" data-target="#scaleModal" class="scale_submit btn btn-primary " disabled><i class="fas fa-check-square"></i> Submit</button>
<button class="scale_back btn btn-danger " onclick="window.location='home.design.html'"><i class="fas fa-times"></i> Cancel</button>
</div>
<!-- Modals and things -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Logout</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to log out of the app?
</div>
<div class="modal-footer">
<button onclick="window.location = 'login.design.html'" type="button" class="btn btn-danger"><i class="fas fa-key"></i> Log out!</button>
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times"></i> Cancel</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="scaleModal" tabindex="-1" aria-labelledby="submitScaleMsg" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="scaleModalLabel">Submit</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="scaleModal-body">
<p>Is this correct? Submit this rating now?</p>
<b><p class="scale_showSelected"></p></b>
<div class="alert alert-warning" >Please make sure you have selected the correct rating.</div>
</div>
<div class="modal-footer">
<button onclick="
window.onbeforeunload = null; //IMPORTANT
document.location = 'home.design.html'
" type="button" class="modal_done btn btn-success"><i class="fas fa-chevron-right"></i> Confirm!</button>
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times"></i> Go Back</button>
</div>
</div>
</div>
</div>
<!--JQuery and debug script-->
<script src="debug.js">
</script>
<script>
var chosen = false;
$(".scale_btns .btn").click(function () {
if (!chosen) {
window.onbeforeunload = function () {
return true;
};
$(".scale_showSelected.alert").removeClass("alert-danger");
$(".scale_showSelected.alert").addClass("alert-primary");
$(".scale_showSelected").html('You have picked <span class="scale_selected"></span>. You are: <span class="scale_selected2"></span>.');
$(".scale_back").html($(".scale_back").html() + "*");
___back("Home*");
}
$(".scale_btns .btn").removeClass("scale_this");
$(this).addClass("scale_this");
chosen = true;
$(".scale_selected").html($(this).children(".scale_label").html());
$(".scale_selected2").html($(this).children(".scale_text").html());
$(".scale_submit").prop('disabled', false);
});
___changeHeader(true, "Home", "Record Likert Score", "John", "._main2")
</script>
</body>
</html>