|
|
@ -12,6 +12,68 @@ |
|
|
|
<script type="text/javascript"> |
|
|
|
$(document).ready(function() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // COOKIE |
|
|
|
// function setCookie(cname,cvalue,exdays) { |
|
|
|
// var d = new Date(); |
|
|
|
// d.setTime(d.getTime() + (exdays*24*60*60*1000)); |
|
|
|
// var expires = "expires=" + d.toGMTString(); |
|
|
|
// document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; |
|
|
|
// } |
|
|
|
|
|
|
|
// function getCookie(cname) { |
|
|
|
// var name = cname + "="; |
|
|
|
// var decodedCookie = decodeURIComponent(document.cookie); |
|
|
|
// var ca = decodedCookie.split(';'); |
|
|
|
// for(var i = 0; i < ca.length; i++) { |
|
|
|
// var c = ca[i]; |
|
|
|
// while (c.charAt(0) == ' ') { |
|
|
|
// c = c.substring(1); |
|
|
|
// } |
|
|
|
// if (c.indexOf(name) == 0) { |
|
|
|
// return c.substring(name.length, c.length); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// return ""; |
|
|
|
// } |
|
|
|
|
|
|
|
// function checkCookie() { |
|
|
|
// var cookiecontent=getCookie("bundleselection"); |
|
|
|
// if (cookiecontent != "") { |
|
|
|
// alert("your selection is " + cookiecontent); |
|
|
|
// } else { |
|
|
|
// alert("You haven't selected anything"); |
|
|
|
// if (cookiecontent != "" && cookiecontent != null) { |
|
|
|
// setCookie("bundleselection", cookiecontent, 30); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
function setCookie(name,value,days) { |
|
|
|
var expires = ""; |
|
|
|
if (days) { |
|
|
|
var date = new Date(); |
|
|
|
date.setTime(date.getTime() + (days*24*60*60*1000)); |
|
|
|
expires = "; expires=" + date.toUTCString(); |
|
|
|
} |
|
|
|
document.cookie = name + "=" + (value || "") + expires + "; path=/"; |
|
|
|
} |
|
|
|
function getCookie(name) { |
|
|
|
var nameEQ = name + "="; |
|
|
|
var ca = document.cookie.split(';'); |
|
|
|
for(var i=0;i < ca.length;i++) { |
|
|
|
var c = ca[i]; |
|
|
|
while (c.charAt(0)==' ') c = c.substring(1,c.length); |
|
|
|
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////URLS///////////// |
|
|
|
|
|
|
|
// setting up variables that we will use for the url later |
|
|
@ -200,14 +262,23 @@ var flag = true; |
|
|
|
///////////CHECKBOXES//////////////// |
|
|
|
|
|
|
|
var listofselecteddocs = []; |
|
|
|
var storedincookie = ["1","2","3"]; |
|
|
|
|
|
|
|
setCookie("cookiecontent",storedincookie,30); //set "user_email" cookie, expires in 30 days |
|
|
|
var cookiecontent=getCookie("cookiecontent");//the list in the cookie |
|
|
|
|
|
|
|
$(document.body).on("click", "input[type='checkbox']", function() { |
|
|
|
|
|
|
|
var self=$(this); |
|
|
|
if(self.is(":checked")){ |
|
|
|
theid = self.attr("id"); |
|
|
|
alert("checkbox id ="+theid +"is checked "); |
|
|
|
listofselecteddocs.push(theid); |
|
|
|
alert(listofselecteddocs.length); |
|
|
|
// push to cookie |
|
|
|
$.cookie("cookiecontent", $.cookie('cookiecontent') + '&' + theid); |
|
|
|
alert(cookiecontent); |
|
|
|
|
|
|
|
// alert(listofselecteddocs.length); |
|
|
|
}else { |
|
|
|
theid = self.attr("id"); |
|
|
|
alert("id = "+theid +"is Unchecked "); |
|
|
@ -220,6 +291,7 @@ var flag = true; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//THE SENDING OF THE LIST TO PYTHON /////////////////// |
|
|
|
|
|
|
|
$("#listoffiles").click(function(){ |
|
|
@ -277,17 +349,61 @@ var flag = true; |
|
|
|
<div class="main"> |
|
|
|
<div class="main-column-left"> |
|
|
|
|
|
|
|
<div id="nav-container"> |
|
|
|
<!-- UP--> |
|
|
|
<div id="listofpeople"> |
|
|
|
{% for librarian in librarians %} |
|
|
|
<span class="librarian-names" id={{librarian}}>{{librarian}}</span> |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
<!-- END UP --> |
|
|
|
|
|
|
|
<!-- DOWN --> |
|
|
|
<div id="listoffiles"> |
|
|
|
<div class="file-names-container"> |
|
|
|
<!--librarians-focused--> |
|
|
|
{% for querylibrarian in urllibrarian %} |
|
|
|
{% for file in filetoname_dict %} |
|
|
|
{% for item in file['librarian'] %} |
|
|
|
{% if item == querylibrarian and urlmethod == []%} |
|
|
|
{% set show_file = file['debrisname'] %} |
|
|
|
<span class="file-names" id="{{show_file}}">{{show_file}}</span><br> |
|
|
|
{% elif item == querylibrarian %} |
|
|
|
{% for urlmeth in urlmethod %} |
|
|
|
{% if urlmeth.lower() == file['method'].lower() %} |
|
|
|
{% set show_file = file['debrisname'] %} |
|
|
|
<span class="file-names" id="{{show_file}}">{{show_file}}</span><br> |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
<!--method-focused--> |
|
|
|
{% for querymethod in urlmethod %} |
|
|
|
{% for file in filetoname_dict %} |
|
|
|
{% if querymethod.lower() == file['method'].lower() and urllibrarian==[] %} |
|
|
|
{% set show_file = file['debrisname'] %} |
|
|
|
<span class="file-names" id="{{show_file}}">{{show_file}}</span><br> |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- END DOWN --> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- submit data --> |
|
|
|
<!-- submit data and buttons--> |
|
|
|
<button id="about">About</button> |
|
|
|
<a href="/test/" target="_blank"><button id="listoffiles">Print</button></a> |
|
|
|
<a href="/"><button id="reset">Reset</button></a> |
|
|
|
<button id="showall">Show All</button> |
|
|
|
|
|
|
|
|
|
|
|
<!-- ABOUT --> |
|
|
|
<div id="intro"> |
|
|
|
<div id="closeintro">x</div> |
|
|
|
<h1>author</h1> |
|
|
@ -355,44 +471,16 @@ var flag = true; |
|
|
|
|
|
|
|
<p>Please consider our absent studio in these following sonic (add term when we have the sound files).</p> |
|
|
|
</div> |
|
|
|
<!-- --> |
|
|
|
|
|
|
|
<!-- HOW TO --> |
|
|
|
<div id="howto"> |
|
|
|
<div id="closehowto">x</div> |
|
|
|
<h1>how to</h1> |
|
|
|
<p>this text will follow soon</p> |
|
|
|
</div> |
|
|
|
<!-- --> |
|
|
|
|
|
|
|
<br> |
|
|
|
<div class="file-names-container"> |
|
|
|
<!--librarians-focused--> |
|
|
|
{% for querylibrarian in urllibrarian %} |
|
|
|
{% for file in filetoname_dict %} |
|
|
|
{% for item in file['librarian'] %} |
|
|
|
{% if item == querylibrarian and urlmethod == []%} |
|
|
|
{% set show_file = file['debrisname'] %} |
|
|
|
<span class="file-names" id="{{show_file}}">{{show_file}}</span><br> |
|
|
|
{% elif item == querylibrarian %} |
|
|
|
{% for urlmeth in urlmethod %} |
|
|
|
{% if urlmeth.lower() == file['method'].lower() %} |
|
|
|
{% set show_file = file['debrisname'] %} |
|
|
|
<span class="file-names" id="{{show_file}}">{{show_file}}</span><br> |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
<!--method-focused--> |
|
|
|
{% for querymethod in urlmethod %} |
|
|
|
{% for file in filetoname_dict %} |
|
|
|
{% if querymethod.lower() == file['method'].lower() and urllibrarian==[] %} |
|
|
|
{% set show_file = file['debrisname'] %} |
|
|
|
<span class="file-names" id="{{show_file}}">{{show_file}}</span><br> |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main-column-right"> |
|
|
|