-
Notifications
You must be signed in to change notification settings - Fork 0
/
references.html
354 lines (314 loc) · 11 KB
/
references.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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html>
<html lang="en">
<head>
<title>Human Impacts</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/jquery.fancybox.css">
<!--<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">-->
<link rel="stylesheet" href="assets/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="assets/css/custom.css">
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon-16x16.png">
<!-- <link rel="manifest" href="assets/images/site.webmanifest"> -->
<style>
.header {display: flex;justify-content:space-between;align-items:center;width:100%;padding:15px;}
.logo {text-decoration: none;}
.logo img {width: 200px;}
.header h1 {width: calc(100% - 210px);margin:0;padding:0;text-align: center;font-size:32px;}
</style>
</head>
<body>
<div style="padding-top: 0px; padding-bottom: 50px;">
<div class="ajax_loader">
<img src="assets/images/loading.gif" style="width: 100px; height:100px;">
</div>
<div class="ajax_loader_2">
<img src="assets/images/loading.gif" style="width: 100px; height:100px;">
</div>
<!--<div class="container">-->
<div class="header">
<a class="logo" href="https://camilo-mora.github.io/GEO309/" target="_blank">
<img src="https://camilo-mora.github.io/GEO309/images/MoraLab.png" />
</a>
<h1> Traceable evidence of the impacts of climate change on pathogenic human diseases </h1>
</div>
<!--</div>-->
<!-- page contents -->
<div class="container-fluid">
<div class="content-box">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<span>References</span>
<label><input type="radio" name="only_pending" value="0" checked="checked"> All</label>
<label><input type="radio" name="only_pending" value="1"> Pending</label>
<a href="index.html" class="pull-right btn btn-info">Back</a>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered custom-table" id="listTable">
<thead>
<tr>
<th style="width: 50px;">Sr.No</th>
<th>User</th>
<th>Type</th>
<th>Authors</th>
<th>Year</th>
<th>Title</th>
<th>Journal</th>
<th>Volume</th>
<th>Pages</th>
<th>Book Title</th>
<th>Editor</th>
<th>Publisher</th>
<th>City</th>
<th>Institution</th>
<th>DOI</th>
<th>ISSN</th>
<th>PDF</th>
<th>Entries</th>
<!--<th width="100">Action</th>-->
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script src="assets/js/jquery-3.4.1.min.js"></script>
<script src="assets/js/jquery.dataTables.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.fancybox.js"></script>
<script>
let g_allEntries = [];
let g_allReferences = [];
function buildTable(references) {
$('#listTable').dataTable().fnDestroy();
$('#listTable').DataTable({
data: references,
columnDefs: [/*{
"targets": -1,
"data": null,
"orderable": false,
"defaultContent": "<button type=\"button\" class=\"btn btn-sm btn-secondary\">追加</button>"
}*/{
"targets": 16,
"data" : 16,
"render": function ( data, type, row, meta ) {
if (!data || data === 'NA') return '';
return '<a href="PDFs/' + data + '" target="_blank">PDF</a>';
}
},{
"targets": 17,
"data" : 17,
"render": function ( data, type, row, meta ) {
if (!data) return '';
return '<a href="#" class="link-entries" data-ref-id="' + row[0] + '">' + data + '</a>';
}
}],
});
}
function loadEntries() {
$.ajax({
url: 'json/entries.json',
type: "get",
dataType: "json",
success: function(entries) {
g_allEntries = entries;
}
});
}
function loadReferences() {
$.ajax({
url: 'json/references.json',
type: "get",
dataType: "json",
success: function(references) {
g_allReferences = references;
filterReferences();
loadEntries();
}
});
}
loadReferences();
/**
* Filter references by pending option
*/
function filterReferences() {
let isPending = parseInt($("[name=only_pending]:checked").val()) > 0;
if (isPending) {
buildTable(g_allReferences.filter(d => !d[17]));
return;
}
buildTable(g_allReferences);
}
/**
* Display entries on dialog
*
* @param refId
*/
function displayEntries(refId) {
if (g_allEntries.length === 0) return;
let entries = g_allEntries.filter(d => d.ref_id == refId);
if (entries.length === 0) return;
let html='<div class="container"><h2 class="text-center text-bold">Entries</h2><div class="panel-group">';
$.each(entries,function(idx, entry){
let entryHtml='';
let source='';
if (entry.authors!="" && entry.authors!=null) {
source+=entry.authors;
}
if (entry.year!="" && entry.year!=null) {
source+=', '+entry.year;
}
if (entry.title!="" && entry.title!=null) {
source+=', '+entry.title;
}
entryHtml+='<p><b>Entry ID:</b>'+entry.id+'</p>';
entryHtml+='<p><b>Source:</b><br>'+source+'</p>';
if(!entry.PDF && entry.PDF!="NA") {
entryHtml+='<p><a target="_blank" href="PDFs/' + entry.PDF + '">Download</a></p>';
}
entryHtml+='<hr>';
if(entry.climatic_changes!="" && entry.cc!=null)
entryHtml+='<p><b>Climatic Change:</b><br>'+entry.cc+'</p>';
if(entry.pathogen_general!="" && entry.pg!=null)
entryHtml+='<p><b>Pathogen General:</b><br>'+entry.pg+'</p>';
if(entry.pathogen_specific!="" && entry.ps!=null)
entryHtml+='<p><b>Pathogen Disease:</b><br>'+entry.ps+'</p>';
if(entry.pathogen_agent!="" && entry.pa!=null)
entryHtml+='<p><b>Pathogen Agent:</b><br>'+entry.pa+'</p>';
if(entry.transmission_type_general!="" && entry.ttg!=null)
entryHtml+='<p><b>Transmission type general:</b><br>'+entry.ttg+'</p>';
if(entry.transmission_type_specific!="" && entry.tts!=null)
entryHtml+='<p><b>Transmission type specific:</b><br>'+entry.tts+'</p>';
if(entry.transmission_type_specific_species!="" && entry.ttss!=null)
entryHtml+='<p><b>Transmission type specific species:</b><br>'+entry.ttss+'</p>';
if(entry.transmission_type_specific_additional!="" && entry.ttsa!=null)
entryHtml+='<p><b>Transmission type additional:</b><br>'+entry.ttsa+'</p>';
if(entry.transmission_type_specific_additional_species!="" && entry.ttsas!=null)
entryHtml+='<p><b>Transmission type additional species:</b><br>'+entry.ttsas+'</p>';
if(entry.impact!="" && entry.impact!=null)
entryHtml+='<p><b>Impacts:</b><br>'+entry.impact+'</p>';
if(entry.comments!="" && entry.comments!=null)
entryHtml+='<p><b>Comments/Finding:</b><br>'+entry.comments+'</p>';
html+='<div class="panel panel-default">\
<div class="panel-heading">\
<h4 class="panel-title">\
<a data-toggle="collapse" href="#collapse'+idx+'">Entry '+(idx+1)+'</a>\
</h4>\
</div>\
<div id="collapse'+idx+'" class="panel-collapse collapse">\
<div class="panel-body">'+entryHtml+'</div>\
</div>\
</div>';
});
html+='</div></div></div>';
$.fancybox.open(html);
}
$(function() {
$("[name=only_pending]").on("click", function() {
filterReferences();
});
$("#listTable").on("click", ".link-entries", function(evt) {
evt.stopPropagation();
let refId = $(evt.target).data("ref-id");
displayEntries(refId);
return false;
});
//$(".container").first().attr('class','container-fluid');
});
</script>
</div>
<!-- end of page contents -->
</div>
<!-- Custom Dialogs -->
<!-- Confirm -->
<div id='confirmDb' class="dialogDiv">
<div class='title' id="confirmMsg">
</div>
<hr>
<input type='button' class="btn text-bold btn-danger text-white" value='no' id='cancelConfirmBtn' />
<input type='button' class="btn text-bold btn-success text-white pull-right" value='yes' id='confirmBtn' />
</div>
<!-- Warning -->
<div id='warnDb' class="dialogDiv">
<div class='title' id="warnMsg">
</div>
<hr>
<input type='button' class="btn btn-warning text-bold btn-info text-white pull-right" value='OK' id='warnBtn' />
</div>
<!-- Error -->
<div id='errorDb' class="dialogDiv">
<div class='title' id="errorMsg">
</div>
<hr>
<input type='button' class="btn text-bold btn-danger text-white pull-right" value='OK' id='errorBtn' />
</div>
<!-- Success -->
<div id='successDb' class="dialogDiv">
<div class='title' id="succMsg">
</div>
<hr>
<input type='button' class="btn btn-success text-bold text-white pull-right" value='OK' id='succBtn' />
</div>
<!-- Custom Dialogs -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(".ajax_loader").hide();
$(document).ajaxStart(function(){
$(".ajax_loader").show();
});
$(document).ajaxComplete(function(){
$(".ajax_loader").hide();
});
$(document).ready(function(){
$('.show_popup').click(function(e){
e.preventDefault();
$('a.show_popup').fancybox({
'type' : 'iframe',
});
});
});
//warningdialog();
function warningdialog(message="Are You Sure?",btnYes="OK",dialTitle="Warning") {
$('#warnMsg').html(message);
$("#warnBtn").val(btnYes);
var warndialog = $('#warnDb').dialog();
$(".ui-dialog-title").text(dialTitle);
$(".ui-dialog-titlebar").attr("style","background-color:#E08E0B !important;color:white !important;");
$('#warnBtn').unbind().click(function(evt) {
evt.preventDefault();
warndialog.dialog('close');
});
}
//errordialog();
function errordialog(message="Are You Sure?",btnYes="OK",dialTitle="Error") {
$('#errorMsg').html(message);
$("#errorBtn").val(btnYes);
var errordialog = $('#errorDb').dialog();
$(".ui-dialog-title").text(dialTitle);
$(".ui-dialog-titlebar").attr("style","background-color:#D73925 !important;color:white !important;");
$('#errorBtn').unbind().click(function(evt) {
evt.preventDefault();
errordialog.dialog('close');
});
}
//successdialog();
function successdialog(message="Are You Sure?", btnYes="OK",dialTitle="Success") {
$('#succMsg').html(message);
$("#succBtn").val(btnYes);
var succdialog = $('#successDb').dialog();
$(".ui-dialog-title").text(dialTitle);
$(".ui-dialog-titlebar").attr("style","background-color:#00A65A !important;color:white !important;");
$('#succBtn').unbind().click(function(evt) {
evt.preventDefault();
succdialog.dialog('close');
});
}
</script>
</body>
</html>