Commit 42a96de0 authored by Raph El's avatar Raph El

Hotfix agenda

parent 02612952
......@@ -45,8 +45,9 @@ var agenda = {
var startMoment = this.getStartMoment(day);
// mylog.log("agenda.searchDay startMoment", startMoment);
var startDDDD = new Date(startMoment);
// mylog.log("agenda.searchDay startDDDD", startDDDD);
mylog.log("agenda.searchDay startDDDD", startDDDD);
searchObject.startDate = Math.floor(startDDDD / 1000);
startSearch(10, 30, searchCallback, true);
},
addDay : function(){
......@@ -122,6 +123,7 @@ var agenda = {
agenda.dayCount += days;
agenda.nbSearch = 0;
loadingData = false;
agenda.searchDay(agenda.dayCount);
});
......
......@@ -83,7 +83,7 @@ function startSearch(indexMin, indexMax, callBack, notUrl){
// startNewsSearch(true);
//else{
mylog.log('directory.js startSearch callBack', typeof callBack, loadingData);
mylog.log('directory.js startSearch agenda. callBack', typeof callBack, loadingData);
if(loadingData) return;
loadingData = true;
......@@ -91,7 +91,7 @@ function startSearch(indexMin, indexMax, callBack, notUrl){
//MAPREMOVE
//showIsLoading(true);
mylog.log('directory.js startSearch searchObject.indexMin', searchObject.indexMin, indexMax, searchObject.indexStep, searchObject.types);
mylog.log('directory.js startSearch agenda. searchObject.indexMin', searchObject.indexMin, indexMax, searchObject.indexStep, searchObject.types);
searchObject.indexMin = (typeof indexMin == 'undefined') ? 0 : indexMin;
autoCompleteSearch(indexMin, indexMax, callBack, notUrl);
}
......@@ -655,6 +655,7 @@ function searchCallback(data) {
searchObject.types.length == 1 &&
$.inArray( "events", searchObject.types) >= 0 ){
mylog.log("directory.js agenda. noResult");
loadingData = false;
agenda.addDay();
} else if(
typeof agenda.countsLaunchSesearch != "undefined" &&
......@@ -664,8 +665,11 @@ function searchCallback(data) {
$.inArray( "events", searchObject.types) >= 0 ){
mylog.log("directory.js agenda nbLaunchSesearch");
agenda.countsLaunchSesearch++;
loadingData = false;
agenda.addDay();
}
mylog.log("directory.js agenda. ELSE");
}
}
}
......
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