closes #114. updated ajaxify to allow for get parameters to be passed in without issues.

This commit is contained in:
psychobunny
2013-07-23 15:06:31 +08:00
parent 9e7afcf0ab
commit 6f6a2e4127
4 changed files with 19 additions and 10 deletions

View File

@@ -35,13 +35,13 @@ var ajaxify = {};
url = url.slice(RELATIVE_PATH.length);
}
var tpl_url = templates.get_custom_map(url);
var tpl_url = templates.get_custom_map(url.split('?')[0]);
if (tpl_url == false && !templates[url]) {
if(url === '' || url === '/') {
tpl_url = 'home';
} else {
tpl_url = url.split('/')[0];
tpl_url = url.split('/')[0].split('?')[0];
}
} else if (templates[url]) {
@@ -75,10 +75,6 @@ var ajaxify = {};
return false;
}
ajaxify.onclick = function(ev) {
}
$('document').ready(function() {
if (!window.history || !window.history.pushState) return; // no ajaxification for old browsers