|
@@ -16,7 +16,7 @@
|
|
// | || ' \| | _|
|
|
// | || ' \| | _|
|
|
// |___|_||_|_|\__|
|
|
// |___|_||_|_|\__|
|
|
function init(){
|
|
function init(){
|
|
- // console.log("EdlpTheme init()");
|
|
|
|
|
|
+ console.log("EdlpTheme init()");
|
|
|
|
|
|
initHistory();
|
|
initHistory();
|
|
|
|
|
|
@@ -78,7 +78,6 @@
|
|
// });
|
|
// });
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
// _ _
|
|
// _ _
|
|
// /_\ (_)__ ___ __
|
|
// /_\ (_)__ ___ __
|
|
// / _ \ | / _` \ \ /
|
|
// / _ \ | / _` \ \ /
|
|
@@ -130,7 +129,7 @@
|
|
_$body.removeClass('ajax-loading');
|
|
_$body.removeClass('ajax-loading');
|
|
};
|
|
};
|
|
function onAjaxLoaded(data, url, ajax_path, sys_path, selector){
|
|
function onAjaxLoaded(data, url, ajax_path, sys_path, selector){
|
|
- // console.log('ajax loaded : data', data);
|
|
|
|
|
|
+ console.log('ajax loaded url:'+url+' ajax_path:'+ajax_path+' sys_path:'+sys_path+' data', data);
|
|
|
|
|
|
// reset all style may been added by other pages (like masonry for productions)
|
|
// reset all style may been added by other pages (like masonry for productions)
|
|
// and replace all content with newly loaded
|
|
// and replace all content with newly loaded
|
|
@@ -261,14 +260,16 @@
|
|
if(origin_path){
|
|
if(origin_path){
|
|
var path_elements = origin_path.split('~~');
|
|
var path_elements = origin_path.split('~~');
|
|
console.log(path_elements);
|
|
console.log(path_elements);
|
|
|
|
+ var sys_path = path_elements[0];
|
|
|
|
+ var url = path_elements[1];
|
|
// create history state
|
|
// create history state
|
|
var state = {
|
|
var state = {
|
|
- ajax_path: parseAjaxSysPath(path_elements[0]),
|
|
|
|
- sys_path: path_elements[0],
|
|
|
|
|
|
+ ajax_path: parseAjaxSysPath(sys_path),
|
|
|
|
+ sys_path: sys_path,
|
|
};
|
|
};
|
|
console.log('state', state);
|
|
console.log('state', state);
|
|
// record history state
|
|
// record history state
|
|
- history.replaceState(state, null, path_elements[1]);
|
|
|
|
|
|
+ history.replaceState(state, null, url);
|
|
// load content through ajax
|
|
// load content through ajax
|
|
ajaxLoadContent(null, state.sys_path, state.ajax_path);
|
|
ajaxLoadContent(null, state.sys_path, state.ajax_path);
|
|
// reset the cookie
|
|
// reset the cookie
|