-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtriage.html
302 lines (264 loc) · 14.1 KB
/
triage.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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js"></script>
<script src="js/docs.js"></script>
<link rel="stylesheet/less" type="text/css" href="css/menu.less">
<script src="js/menu.js"></script>
<style type="text/css">
body {
background-color: #FFFFFF;
}
.ui.menu .item img.logo {
margin-right: 1.5em;
}
.main.container {
margin-top: 7em;
}
.wireframe {
margin-top: 2em;
}
.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}
</style>
</head>
<body>
<div class="ui fixed inverted menu">
<div class="ui container">
<a href="#" class="header item">
<img class="logo" src="./images/logo.png" style="width: 200px;">
</a>
<a href="#" class="item">Home</a>
<a href="#" class="item">Dashboard</a>
<a href="#" class="item">Triage</a>
<a href="#" class="item">Reach out</a>
</div>
</div>
<div class="ui main container">
<div class="ui grid">
<div class="four wide column">
<div class="ui secondary vertical pointing menu">
<a class="item active" data-tab="tab_Info" data-vivaldi-spatnav-clickable="1">
<i class="gamepad icon"></i>
Info
</a>
<a class="item" data-tab="tab_second" data-vivaldi-spatnav-clickable="1">
<i class="gamepad icon"></i>
Triage
</a>
<a class="item" data-tab="tab_third" data-vivaldi-spatnav-clickable="1">
<i class="gamepad icon"></i>
Statistics
</a>
</div>
</div>
<div class="twelve wide stretched column">
<div class="ui bottom attached tab active" data-tab="tab_Info">
<embed src="intro.html" width="100%" height="800px">
</div>
<div class="ui bottom attached tab" data-tab="tab_second">
<div class="ui two column grid" style="margin-bottom: 10px;">
<div class="thirteen wide column" style="padding-bottom: 0px;">
<div class="ui teal progress" id="triage_progress" style="margin-bottom: 0px;">
<div class="bar">
<div class="progress"></div>
</div>
</div>
</div>
<div class="three wide column" style="padding-bottom: 0px;">
<div class="ui buttons">
<button id="undo" class="ui grey button" onclick="undo" data-vivaldi-spatnav-clickable="1">Undo</button>
<button id="next" class="ui button" onclick="next" data-vivaldi-spatnav-clickable="1">Next</button>
</div>
</div>
</div>
<div class="ui raised very padded segment" style=" margin-top: 0px;">
<!-- Removed image and added tweet-link from previous page -->
<i id="tweet-link" href="#">
<div id="tweet-data">
<table id="tweet-table" class="ui celled table">
<tbody>
<!-- Row 1 - image, user details -->
<tr>
<td rowspan="3">
<img id="user-image-url" align="bottom">
</td>
<td>
<table class="ui celled table">
<td id="user-name" class="one wide">Name </td>
<td id="user-username" class="one wide">username</td>
<td id="date" class="five wide">Date</td>
<td class="three wide">
<i id="registered-location" class="marker icon">Registered Location</i>
</td>
<td class="one wide">
<i id="user-location" class="street view icon">User Location</i>
</td>
</table>
</td>
</tr>
<!-- Row 2 - Tweet -->
<tr>
<td id="tweet-text">tweetText</td>
</tr>
<!-- Row 3 - Tweet related metadata -->
<tr>
<table class="ui celled table">
<tr>
<td width=50px class="one wide">
<i id="retweet-count" class="retweet icon">10</i>
</td>
<td width=50px>
<i id="favorite-count" class="heart icon">10</i>
</td>
</tr>
</table>
</tr>
</tbody>
</table>
</div>
</i>
<!-- <img src="images/tweet.jpeg" width="100%"> -->
</div>
<embed src="context.html" width="100%" height="220px">
<div class="ui raised very padded segment" style="padding-top: 50px;">
<!-- <div class="ui five column doubling grid">
<div class="column"><img src="images/triage-none.png" width="100%"></div>
<div class="column"><img src="images/triage-low.png" width="100%"></div>
<div class="column"><img src="images/triage-moderate.png" width="100%"></div>
<div class="column"><img src="images/triage-high.png" width="100%"></div>
<div class="column"><img src="images/triage-immediate.png" width="100%"></div>
</div> -->
<div class="ui five column doubling grid">
<div class="column">
<button class="ui basic button" value="none">
<img class="ui fluid image" src="images/triage-none.png" width="100%">
</button>
</div>
<div class="column">
<button class="ui basic button" value="none">
<img src="images/triage-low.png" width="100%">
</button>
</div>
<div class="column">
<button class="ui basic button" value="none">
<img src="images/triage-moderate.png" width="100%">
</button>
</div>
<div class="column">
<button class="ui basic button" value="none">
<img src="images/triage-high.png" width="100%">
</button>
</div>
<div class="column">
<button class="ui basic button" value="none">
<img src="images/triage-immediate.png" width="100%">
</button>
</div>
</div>
</div>
</div>
<div class="ui bottom attached tab " data-tab="tab_third">
<embed src="stat.html" width="100%" height="800px">
</div>
</div>
</div>
</div>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui center aligned container">
<img src="./images/hand_logo.png" class="ui centered mini image">
<div class="ui horizontal inverted small divided link list">
<a class="item" href="https://semantic-ui.com/examples/fixed.html#">Site Map</a>
<a class="item" href="https://semantic-ui.com/examples/fixed.html#">Contact Us</a>
<a class="item" href="https://semantic-ui.com/examples/fixed.html#">Terms and Conditions</a>
<a class="item" href="https://semantic-ui.com/examples/fixed.html#">Privacy Policy</a>
</div>
</div>
</div>
<script>
$('.menu .item')
.tab();
// $('#triage_progress').progress({
// percent: 78;
// });
</script>
<!-- Sravan - Added below script for integration of this new UI page to pybossa -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
/* * * DON'T EDIT BELOW THIS LINE * * */
function loadDisqus() {
$("#disqus_thread").toggle();
$(".btn-disqus").toggle();
var disqus_shortname = 'pybossa'; // required: replace example with your forum shortname
//var disqus_identifier = taskId;
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
}
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<script>
// Default language
var projectname = 'ASUdemo';
var userLocale = "en";
var tweetid;
var username;
var contextclicked = false;
var taskid = '';
var userid = '';
var etime = '';
// $("#undo").hide();
var origTweet;
function getTweet(url) {
return $.getJSON(url).then(function(data) {
return data;
});
}
getTweet("https://arkhum.dtn.asu.edu/api/task/18648").then(function(returndata) {
$("#user-image-url").attr("src", returndata.info.flagged_message.user.profile_image_url_https);
$("#user-name").html("<b>"+returndata.info.flagged_message.user.name+"</b>");
$("#user-username").html("<i>@" + returndata.info.flagged_message.user.screen_name + "</i>");
var tweet_date_ms = returndata.info.flagged_message.timestamp_ms;
$("#date").html(new Date(parseInt(tweet_date_ms)).toLocaleString());
console.log(returndata.info.flagged_message.source);
var user_location = returndata.info.flagged_message.geo;
if(!user_location == null) {
$("#user-location").html(user_location);
}
else {
$("#user-location").html("NA");
}
var registered_location = returndata.info.flagged_message.user.location;
if(!registered_location == null) {
$("#registered-location").html(user_location);
}
else {
$("#registered-location").html("NA");
}
// var tweet_link = "https://twitter.com/statuses/" + (798005893950382080).toString();
// console.log("tweet_link = ", tweet_link);
// $("#tweet-link").attr("href", tweet_link);
$("#tweet-text").html(returndata.info.flagged_message.text);
$("#favorite-count").html(returndata.info.flagged_message.favorite_count);
$("#retweet_count").html(returndata.info.flagged_message.retweet_count);
console.log(returndata.info.flagged_message.user.name);
});
</script>
<span style="border-radius: 3px; text-indent: 20px; width: auto; padding: 0px 4px 0px 0px; text-align: center; font-style: normal; font-variant: normal; font-weight: bold; font-stretch: normal; font-size: 11px; line-height: 20px; font-family: "Helvetica Neue", Helvetica, sans-serif; color: rgb(255, 255, 255); background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzBweCIgd2lkdGg9IjMwcHgiIHZpZXdCb3g9Ii0xIC0xIDMxIDMxIj48Zz48cGF0aCBkPSJNMjkuNDQ5LDE0LjY2MiBDMjkuNDQ5LDIyLjcyMiAyMi44NjgsMjkuMjU2IDE0Ljc1LDI5LjI1NiBDNi42MzIsMjkuMjU2IDAuMDUxLDIyLjcyMiAwLjA1MSwxNC42NjIgQzAuMDUxLDYuNjAxIDYuNjMyLDAuMDY3IDE0Ljc1LDAuMDY3IEMyMi44NjgsMC4wNjcgMjkuNDQ5LDYuNjAxIDI5LjQ0OSwxNC42NjIiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxIj48L3BhdGg+PHBhdGggZD0iTTE0LjczMywxLjY4NiBDNy41MTYsMS42ODYgMS42NjUsNy40OTUgMS42NjUsMTQuNjYy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yOCwyMS4zNzkgMTMuMzAyLDIwLjU3MiBDMTMuMzAyLDIwLjU3MiAxMi42NDcsMjMuMDUgMTIuNDg4LDIzLjY1NyBDMTIuMTkzLDI0Ljc4NCAxMS4zOTYsMjYuMTk2IDEwLjg2MywyNy4wNTggQzEyLjA4NiwyNy40MzQgMTMuMzg2LDI3LjYzNyAxNC43MzMsMjcuNjM3IEMyMS45NSwyNy42MzcgMjcuODAxLDIxLjgyOCAyNy44MDEsMTQuNjYyIEMyNy44MDEsNy40OTUgMjEuOTUsMS42ODYgMTQuNzMzLDEuNjg2IiBmaWxsPSIjYmQwODFjIj48L3BhdGg+PC9nPjwvc3ZnPg==") 3px 50% / 14px 14px no-repeat rgb(189, 8, 28); position: absolute; opacity: 1; z-index: 8675309; display: none; cursor: pointer; border: none; -webkit-font-smoothing: antialiased; top: 454px; left: 406px;">Save</span>
<span style="border-radius: 3px; text-indent: 20px; width: 20px; height: 20px; background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KPGc+CjxwYXRoIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSI0IiBkPSJNMTcsMTcgTDIyLDIyIFogIi8+CjxjaXJjbGUgc3Ryb2tlPSIjZmZmIiBjeD0iMTMiIGN5PSIxMyIgcj0iNiIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjUiLz4KPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAsMCBMOCwwIEw4LDMgTDMsMyBMMyw4IEwwLDggWiIvPgo8cGF0aCBmaWxsPSIjZmZmIiBkPSJNMzAsMjIgTDMwLDMwIEwyMiwzMCBMMjIsMjcgTDI3LDI3IEwyNywyMiBaIi8+CjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0zMCwwIEwzMCw4IEwyNyw4IEwyNywzIEwyMiwzIEwyMiwwIFoiLz4KPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAsMjIgTDMsMjIgTDMsMjcgTDgsMjcgTDgsMzAgTDAsMzBaIi8+CjwvZz4KPC9zdmc+Cg==") 50% 50% / 14px 14px no-repeat rgba(0, 0, 0, 0.4); position: absolute; opacity: 1; z-index: 8675309; display: none; cursor: pointer; border: none; top: 454px; left: 461px;"></span>
</body>
</html>