[gen] Fixed some problems with groups having style='tabs'.

This commit is contained in:
Gaetan Delannay 2014-04-30 15:10:11 +02:00
parent 7adbc7e4bc
commit 4d78996938
6 changed files with 54 additions and 35 deletions

View file

@ -47,8 +47,7 @@ img { border: 0; vertical-align: middle }
/* Styles that apply when viewing content of XHTML fields, that mimic styles
that ckeditor uses for displaying XHTML content in the edit view. */
.xhtml { margin-top: 5px; background-color: white;
padding: 6px; border: 1px dashed grey; border-radius: 0.3em }
.xhtml { background-color: white; padding: 6px; font-size: 95% }
.xhtml img { margin-right: 5px }
.xhtml p { margin: 3px 0 7px 0 }
.clickable { cursor: pointer }
@ -156,7 +155,7 @@ td.search { padding-top: 8px }
.homeTable th { padding-top: 5px; font-size: 105% }
.first { margin-top: 0px }
.error { margin: 5px }
.podName { font-size: 90% }
.podName { font-size: 95% }
.podTable { margin-left: 15px }
.cbCell { width: 10px; text-align: center}
.tabs { position:relative; bottom:-2px }

View file

@ -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