[gen] Fixed some problems with groups having style='tabs'.
This commit is contained in:
parent
7adbc7e4bc
commit
4d78996938
6 changed files with 54 additions and 35 deletions
|
@ -811,10 +811,16 @@ function showTab(tabId) {
|
|||
}
|
||||
|
||||
// Function that initializes the state of a tab
|
||||
function initTab(cookieId, defaultValue) {
|
||||
var toSelect = readCookie(cookieId);
|
||||
if (!toSelect) { showTab(defaultValue) }
|
||||
else { showTab(toSelect); }
|
||||
function initTab(tabsId, defaultValue) {
|
||||
var selectedTabId = readCookie(tabsId);
|
||||
if (!selectedTabId) { showTab(defaultValue) }
|
||||
else {
|
||||
/* Ensure the selected tab exists (it could be absent because of field
|
||||
visibility settings) */
|
||||
var selectedTab = document.getElementById('tab_' + selectedTabId);
|
||||
if (selectedTab) { showTab(selectedTabId) }
|
||||
else { showTab(defaultValue) }
|
||||
}
|
||||
}
|
||||
|
||||
// List-related Javascript functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue