diff --git a/files/sys/system.js b/files/sys/system.js index 20c3803..6d02b5b 100644 --- a/files/sys/system.js +++ b/files/sys/system.js @@ -91,7 +91,7 @@ SYSTEM.prototype.handle_call_pages_page = function (html,entry,id,forced,cached) SYSTEM.prototype.handle_call_pages_entry = function (entry,id,forced,cached) { var url = entry['url']+(window.location.search.substr(1) ? '&'+window.location.search.substr(1) : '' ); //check loaded state of div - reload only if required - if(forced || this.state[entry['div']] !== url || !$(entry['div']).length){ + if(forced || this.state[entry['div']] !== url || !$(entry['div']).length || $(entry['div']).html() === ''){ //load page this.call_url(url,function(data){system.handle_call_pages_page(data,entry,id,forced,cached);},{},'html',true); } else { @@ -100,11 +100,7 @@ SYSTEM.prototype.handle_call_pages_entry = function (entry,id,forced,cached) { } //internal function to handle pagestate results SYSTEM.prototype.handle_call_pages = function (data,id,forced,cached) { - if(data['status']){ - //clear old state - //this.state = {} - this.state_info = {} - + if(data['status']){ this.log_info('load pages: endpoint '+this.endpoint+' group:'+this.group+' state:'+id+' - '+(cached ? 'cached ' : (forced ? 'forced' : 'success'))); //state not found? if(data['result'].length === 0){