small fixes with timing in system.js
This commit is contained in:
parent
17e1b0ffe2
commit
00e8c98341
@ -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 {
|
||||
@ -101,10 +101,6 @@ 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 = {}
|
||||
|
||||
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){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user