Commit d47eca70 authored by Patrick's avatar Patrick
Browse files

update next function

parent da8a93b9
......@@ -181,12 +181,19 @@ a:hover {
background-color: #f1f1f1;
color: black;
margin-left:42%;
cursor: pointer;
border-radius: .2rem;
}
.next {
background-color: #04AA6D;
background-color: #2196f3 !important;
color: white;
cursor: pointer;
border-radius: .2rem;
}
.next:hover{
background-color: #007bff !important;
}
.round {
......
......@@ -265,8 +265,8 @@
</div>
</div>
<div class="container" style="margin-top:1em;"><a href="#" class="previous">&laquo; Previous</a>
<a href="#" class="next">Next &raquo;</a></div>
<div class="container" style="margin-top:1em;"><a onclick="pagecountback()" class="previous">&laquo; Previous</a>
<a onclick="pagecount()" class="next">Next &raquo;</a></div>
<hr>
<div class="container">
......@@ -424,6 +424,7 @@
<link rel="stylesheet" href="./css/search.css">
<link rel="stylesheet" href="./css/language.css">
<script src="js/search.js"></script>
<script src="js/paper_nextpage.js"></script>
</body>
......
var pagenumb = 0
function pagecount(){
pagenumb = pagenumb + max_paper_list
nextpage()
}
function pagecountback(){
pagenumb = pagenumb - (max_paper_list)
if (pagenumb <= 0){
pagenumb = -1
}
nextpage()
}
var nextpage = function() {
// $.getJSON("./content/content.json", function (result) {
// stuff = result;
// var new_row = document.getElementById("row_main")
// new_row.innerHTML = "";
// var arrayLength = stuff.length;
// for (var i = 0; i < arrayLength; i++) {
// addcontent(stuff[i]);
// //Do something
// }
// });
// get paper from the Sabo result
stuff_paper = jsonContent;
var new_row = document.getElementById("cont_paper")
new_row.innerHTML = "";
var arrayLength = stuff_paper.length;
for (var i = 0; i < arrayLength; i++) {
if (i > pagenumb && i <= (pagenumb + max_paper_list) && i<= arrayLength){
// if (Math.abs(arrayLength - i) <= (max_paper_list)) {
console.log("close to " + i)
addpaper(stuff_paper[i]);
// }
}
//Do something
}
json_to_bib(stuff_paper)
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ Website for Geoinformatic Research Group (Prof. Coors)
### Tasks for Patrick:
- [ ] In the current "add_paper.js", all BIBTEX buttons share the same ID and not work yet. I will hide this feature for now and add it back when the BIBTEX is read made. (for later)
- [ ] Currently, I have set in the public/js/config.js the max number of the paper lists. We have to implement the "show more"/ "Pagination" feature. (Patrick)
- [ ] Make sure the Search feature works. (Patrick)
- [x] Make sure the Search feature works. (Patrick)
- [ ] Currently, the "public\js\language.js" only translate some part of the webpage.(later..)
### Tasks for Joe:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment