|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>Library</title>
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
|
|
|
|
|
|
|
|
<!--TEST-->
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
$(".librarian-names").click(function(event){
|
|
|
|
var thename = $(this).text();
|
|
|
|
$.getJSON('{{ url_for('static', filename='js/realjson.json') }}', function(test) {
|
|
|
|
alert(thename);
|
|
|
|
// iterate in test[i].librarian to find where the name is present
|
|
|
|
//to get the test[i].debris that goes with it
|
|
|
|
var alldocs = [];
|
|
|
|
for (var i = 0; i < test.length; ++i) {
|
|
|
|
var item = test[i];
|
|
|
|
if(item.librarian.includes(thename)){
|
|
|
|
ledocument = item.debris;
|
|
|
|
// alert(ledocument);
|
|
|
|
alldocs.push(ledocument);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
alert(alldocs);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".file-names").click(function(event){
|
|
|
|
var thefile = $(this).text();
|
|
|
|
$.getJSON('{{ url_for('static', filename='js/realjson.json') }}', function(test) {
|
|
|
|
alert(thefile);
|
|
|
|
// iterate in test[i].librarian to find where the name is present
|
|
|
|
//to get the test[i].debris that goes with it
|
|
|
|
var allpeeps = [];
|
|
|
|
var category = null;
|
|
|
|
for (var i = 0; i < test.length; ++i) {
|
|
|
|
var item = test[i];
|
|
|
|
if(item.debris.includes(thefile)){
|
|
|
|
ledocument = item.librarian;
|
|
|
|
// alert(ledocument);
|
|
|
|
allpeeps.push(ledocument);
|
|
|
|
};
|
|
|
|
category = item.method;
|
|
|
|
};
|
|
|
|
alert(allpeeps);
|
|
|
|
alert(category);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="nav-top">
|
|
|
|
<ul>
|
|
|
|
<li><a class="nav-button" style="text-align: left;">BOUGHT</a></li>
|
|
|
|
<li><a class="nav-button" style="text-align: center;">STOLEN</a>
|
|
|
|
<li><a class="nav-button" style="text-align: right;">REPURPOSED</a>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="main">
|
|
|
|
<div class="main-column-left">
|
|
|
|
|
|
|
|
<div id="listofpeople">
|
|
|
|
{% for librarian in librarians %}
|
|
|
|
<!-- <a href="#" class="librarian-names">{{ librarian }}</a> -->
|
|
|
|
<span class="librarian-names">{{ librarian }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<div class="file-names-container">
|
|
|
|
{% for file in filetoname_dict %}
|
|
|
|
<span class="file-names">{{file["debris"]}}</span><br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="main-column-right">
|
|
|
|
<a href="{{ url_for('static', filename='realjson.json') }}">test link</a>
|
|
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% endblock content %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="nav-bottom">
|
|
|
|
<ul>
|
|
|
|
<li><a class="nav-button" style="text-align: left;">COPIED</a></li>
|
|
|
|
<li><a class="nav-button" style="text-align: center;">FOUND</a></li>
|
|
|
|
<li><a class="nav-button" style="text-align: right;">GIFT</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|