|
|
@ -11,6 +11,7 @@ |
|
|
|
<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) { |
|
|
@ -29,6 +30,29 @@ |
|
|
|
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> |
|
|
|
|
|
|
@ -54,7 +78,7 @@ |
|
|
|
|
|
|
|
<div class="file-names-container"> |
|
|
|
{% for file in filetoname_dict %} |
|
|
|
<a href="" class="file-names">{{file["debris"]}}</a><br> |
|
|
|
<span class="file-names">{{file["debris"]}}</span><br> |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|