mirror of
https://gitlab.com/CodeSolutionsProject/CodeShare.git
synced 2026-02-18 02:51:34 +01:00
Infinite scroll fixed
This commit is contained in:
@@ -9,7 +9,7 @@ function doAjax(postValue) {
|
||||
conexion.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
conexion.send(postValue); //Las variables a mandar, en este caso POST
|
||||
}
|
||||
|
||||
newFilter=false;
|
||||
function ajaxresponse(){
|
||||
if(conexion.readyState == 4){ //Esto es para que cambie cuando haya respuesta, que no es en todos los momentos
|
||||
o++;
|
||||
@@ -18,7 +18,8 @@ function ajaxresponse(){
|
||||
newFilter=false;
|
||||
ajaxPut.innerHTML = conexion.responseText; //Pondra todo lo devuelto por "file" (Que sera un php que de //echos dependiendo de lo enviado) en un div
|
||||
}else{
|
||||
ajaxPut.innerHTML = ajaxPut.innerHTML+conexion.responseText;
|
||||
if($("#end").length == 0)
|
||||
ajaxPut.innerHTML = ajaxPut.innerHTML+conexion.responseText;
|
||||
}
|
||||
}
|
||||
reHightlight();
|
||||
@@ -41,7 +42,9 @@ function getAjax(reset=false) {
|
||||
if(reset){
|
||||
resetFilter();
|
||||
}
|
||||
|
||||
if(!newFilter && $("#end").length!=0){
|
||||
return;
|
||||
}
|
||||
var checkboxes = document.getElementsByClassName("codeFilterCheckBoxInput");
|
||||
var i;
|
||||
var count = false;
|
||||
|
||||
Reference in New Issue
Block a user