trying to fix redirect to home bug : replaced cookie by localStorage, seems to work
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
_$body.removeClass('ajax-loading');
|
||||
};
|
||||
function onAjaxLoaded(data, url, ajax_path, sys_path, selector){
|
||||
console.log('ajax loaded url:'+url+' ajax_path:'+ajax_path+' sys_path:'+sys_path+' data', data);
|
||||
console.log('ajax loaded url:'+url+' ajax_path:'+ajax_path+' sys_path:'+sys_path);
|
||||
|
||||
// reset all style may been added by other pages (like masonry for productions)
|
||||
// and replace all content with newly loaded
|
||||
@@ -272,8 +272,9 @@
|
||||
history.replaceState(state, null, origin_url);
|
||||
// load content through ajax
|
||||
ajaxLoadContent(null, state.sys_path, state.ajax_path);
|
||||
// reset the cookie
|
||||
deleteCookie('edlp_origin_path');
|
||||
// reset the storage
|
||||
window.localStorage.removeItem("edlp_origin_path");
|
||||
window.localStorage.removeItem("edlp_origin_url");
|
||||
|
||||
}else{
|
||||
history.replaceState({home:true}, null, url);
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
_$body.removeClass('ajax-loading');
|
||||
};
|
||||
function onAjaxLoaded(data, url, ajax_path, sys_path, selector){
|
||||
console.log('ajax loaded url:'+url+' ajax_path:'+ajax_path+' sys_path:'+sys_path+' data', data);
|
||||
console.log('ajax loaded url:'+url+' ajax_path:'+ajax_path+' sys_path:'+sys_path);
|
||||
|
||||
// reset all style may been added by other pages (like masonry for productions)
|
||||
// and replace all content with newly loaded
|
||||
@@ -272,8 +272,9 @@
|
||||
history.replaceState(state, null, origin_url);
|
||||
// load content through ajax
|
||||
ajaxLoadContent(null, state.sys_path, state.ajax_path);
|
||||
// reset the cookie
|
||||
deleteCookie('edlp_origin_path');
|
||||
// reset the storage
|
||||
window.localStorage.removeItem("edlp_origin_path");
|
||||
window.localStorage.removeItem("edlp_origin_url");
|
||||
|
||||
}else{
|
||||
history.replaceState({home:true}, null, url);
|
||||
|
||||
Reference in New Issue
Block a user