Skip to content
Snippets Groups Projects
Commit 627ce820 authored by Ere Maijala's avatar Ere Maijala
Browse files

Added a parameter to ajaxLoadTab() to make the addition of hash to the URL...

Added a parameter to ajaxLoadTab() to make the addition of hash to the URL optional so that also the default tab can be loaded via ajax without jumping to the tab.
parent 00c1b7ab
No related merge requests found
...@@ -146,7 +146,7 @@ function registerTabEvents() { ...@@ -146,7 +146,7 @@ function registerTabEvents() {
}); });
} }
function ajaxLoadTab(tabid) { function ajaxLoadTab(tabid, setHash) {
// if we're flagged to skip AJAX for this tab, just return true and let the // if we're flagged to skip AJAX for this tab, just return true and let the
// browser handle it. // browser handle it.
if(document.getElementById(tabid).parentNode.className.indexOf('noajax') > -1) { if(document.getElementById(tabid).parentNode.className.indexOf('noajax') > -1) {
...@@ -173,7 +173,9 @@ function ajaxLoadTab(tabid) { ...@@ -173,7 +173,9 @@ function ajaxLoadTab(tabid) {
if(typeof syn_get_widget === "function") { if(typeof syn_get_widget === "function") {
syn_get_widget(); syn_get_widget();
} }
window.location.hash = tabid; if (typeof setHash == 'undefined' || setHash) {
window.location.hash = tabid;
}
} }
}); });
return false; return false;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment