-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlistfiles.html
77 lines (63 loc) · 2.67 KB
/
listfiles.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<!--External Lib-->
<script src="https://www.gstatic.com/firebasejs/4.6.1/firebase.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="js/firebase_server.js"></script>
<style>
#fileName{
font-size: 24px;
}
ol{
padding-left: 5%;
columns: 3;
-webkit-columns: 3;
-moz-columns: 3;
}
</style>
</head>
<body>
<h1 align="center" style="padding: 5px">CerebroVis Tool: Data Files</h1>
<ol id="listFiles"></ol>
<script>
allData=readAllData();
allData.then(function(data) {
console.log(data)
dataArray=Object.keys(data)
dataArray.forEach(function(element,index){
// if(index%2==0){
// color="sandybrown"
// }
// else{
// color="lightyellow"
// }
if(data[element].booleanval) {
$('#listFiles').append('<li id="fileName" >' + '<a style="color:lightseagreen" href="./visualization.html?name=' + element + '" target="_blank">' + element.split("_")[0]+"_CBV" + '</a>' + '</li>')
// $('#listFiles').append('<li id="fileName" >' + '<a style="color:lightseagreen" href="./SharkViewer-master/index.html?name=' + element.split("_")[0] + '" target="_blank">' + element.split("_")[0]+"_3D" + '</a>' + '</li>')
// $('#listFiles').append('<textarea rows="4" cols="50">Report an Issue</textarea>')
// $('#listFiles').append('<button class="okButton" id="' + element + '" >Looks Great!</button> <button class="NotokButton" id="' + element + '" >Report an Issue</button>')
}
else{
$('#listFiles').append('<li id="fileName">' + '<a style="color:maroon" href="./visualization.html?name=' + element + '" target="_blank">' + element + '</a>' + '</li>')
// $('#listFiles').append('<textarea rows="4" cols="50">Report an Issue</textarea>')
// $('#listFiles').append('<button class="okButton" id="' + element + '" >Looks Great!</button> <button class="NotokButton" id="' + element + '" >Report an Issue</button>')
}
})
$(".okButton").click(function(){
console.log(this.id)
callUpdateData(this.id,true) });
$(".NotokButton").click(function(){
console.log(this.id)
callUpdateData(this.id,false) });
})
function callUpdateData(file,val)
{
console.log("Reaching here")
updateData(file,val)
}
</script>
</body>
</html>