This commit is contained in:
Daniel Camargo 2016-01-05 14:10:20 -02:00
parent 2639a53221
commit 2ee070b82c

View File

@ -319,7 +319,6 @@ var Restaurant = function(id) {
// Check the restaurant cache age and reload the hours if it is necessary // Check the restaurant cache age and reload the hours if it is necessary
self.reloadHours = function( forceLoad, callback ){ self.reloadHours = function( forceLoad, callback ){
dateTime.reload();
var load = false; var load = false;
var now = ( Math.floor( new Date().getTime() / 1000 ) ); var now = ( Math.floor( new Date().getTime() / 1000 ) );
if( forceLoad ){ if( forceLoad ){
@ -332,6 +331,7 @@ var Restaurant = function(id) {
if( self.loadingHours ){ if( self.loadingHours ){
return; return;
} }
dateTime.reload();
self.loadingHours = true; self.loadingHours = true;
var url = App.service + 'restaurant/hours/' + self.id_restaurant; var url = App.service + 'restaurant/hours/' + self.id_restaurant;
App.http.get( url, { App.http.get( url, {