diff options
| -rw-r--r-- | library/WT/Gedcom/Tag.php | 4 | ||||
| -rw-r--r-- | modules_v2/extra_info/module.php | 4 | ||||
| -rw-r--r-- | sidebar.php | 52 |
3 files changed, 36 insertions, 24 deletions
diff --git a/library/WT/Gedcom/Tag.php b/library/WT/Gedcom/Tag.php index 5d6385a671..b70c79f6ed 100644 --- a/library/WT/Gedcom/Tag.php +++ b/library/WT/Gedcom/Tag.php @@ -928,10 +928,10 @@ class WT_Gedcom_Tag { // Translate a label/value pair, such as "Occupation: Farmer" public static function getLabelValue($tag, $value, $record=null) { return - '<div class="fact_'.preg_replace('/[^_A-Za-z0-9]/', '', $tag).'">'. + '<span class="fact_'.preg_replace('/[^_A-Za-z0-9]/', '', $tag).'">'. /* I18N: a label/value pair, such as "Occupation: Farmer". Some languages may need to change the punctuation. */ WT_I18N::translate('<span class="label">%1$s:</span> <span class="field">%2$s</span>', self::getLabel($tag, $record), $value). - '</div>'; + '</span>'; } // Get a list of facts, for use in the "fact picker" edit control diff --git a/modules_v2/extra_info/module.php b/modules_v2/extra_info/module.php index 407cfd4d21..4a7897b4c9 100644 --- a/modules_v2/extra_info/module.php +++ b/modules_v2/extra_info/module.php @@ -77,13 +77,13 @@ class extra_info_WT_Module extends WT_Module implements WT_Module_Sidebar { }
}
- echo '<div id="hitcounter">';
+ echo '<tr><td><div id="hitcounter">';
if ($SHOW_COUNTER && (empty($SEARCH_SPIDER))) {
//print indi counter only if displaying a non-private person
require WT_ROOT.'includes/hitcount.php';
echo WT_I18N::translate('Hit Count:'). ' '. $hitCount;
}
- echo '</div>';// close #hitcounter
+ echo '</div></td></tr>';// close #hitcounter
}
// Implement WT_Module_Sidebar
diff --git a/sidebar.php b/sidebar.php index 3b5adb4888..6a66ea0311 100644 --- a/sidebar.php +++ b/sidebar.php @@ -116,30 +116,42 @@ if (isset($controller)) { if (empty($famid)) $famid = safe_POST('famid', WT_REGEX_XREF, ''); } - echo '<div id="sidebarAccordion2">'; - foreach ($sidebarmods as $mod) { - if (isset($controller)) $mod->setController($controller); - if ($mod->hasSidebarContent()) { - if ($mod->getName()=="extra_info") { - echo '<h3 id="', $mod->getName(), '"><a href="#">', $mod->getTitle(), '</a></h3>', - '<div id="sb_content_', $mod->getName(), '">', $mod->getSidebarContent(), '</div>', - WT_JS_START,'jQuery("#sidebarAccordion2").accordion({active:0, autoHeight: false, collapsible: true});', WT_JS_END; - } + +echo WT_JS_START; //jQuery code to remove table elements from INDI facts +?> +jQuery(document).ready(function() { + jQuery('#sidebarAccordion2 table').replaceWith(function() { return $(this).contents(); }); + jQuery('#sidebarAccordion2 tbody').replaceWith(function() { return $(this).contents(); }); + jQuery('#sidebarAccordion2 tr').replaceWith(function() { return $(this).contents(); }); + jQuery('#sidebarAccordion2 td').replaceWith(function() { return $(this).contents(); }); +}); +<?php +echo WT_JS_END; + +echo '<div id="sidebarAccordion2">'; +foreach ($sidebarmods as $mod) { + if (isset($controller)) $mod->setController($controller); + if ($mod->hasSidebarContent()) { + if ($mod->getName()=="extra_info") { + echo '<h3 id="', $mod->getName(), '"><a href="#">', $mod->getTitle(), '</a></h3>', + '<div id="sb_content_', $mod->getName(), '"><table><tbody>', $mod->getSidebarContent(), '</tbody></table></div>', + WT_JS_START,'jQuery("#sidebarAccordion2").accordion({active:0, autoHeight: false, collapsible: true});', WT_JS_END; } } - echo '</div>'; +} +echo '</div>'; - $counter = 0; - echo '<div id="sidebarAccordion">'; - foreach ($sidebarmods as $mod) { - if (isset($controller)) $mod->setController($controller); - if ($mod->hasSidebarContent()) { - if ($mod->getName()!="extra_info") { - echo '<h3 id="', $mod->getName(), '"><a href="#">', $mod->getTitle(), '</a></h3>', - '<div id="sb_content_', $mod->getName(), '">', $mod->getSidebarContent(), '</div>'; - $counter++; - } +$counter = 0; +echo '<div id="sidebarAccordion">'; +foreach ($sidebarmods as $mod) { + if (isset($controller)) $mod->setController($controller); + if ($mod->hasSidebarContent()) { + if ($mod->getName()!="extra_info") { + echo '<h3 id="', $mod->getName(), '"><a href="#">', $mod->getTitle(), '</a></h3>', + '<div id="sb_content_', $mod->getName(), '">', $mod->getSidebarContent(), '</div>'; + $counter++; } } +} echo '</div>'; echo WT_JS_START,'jQuery("#sidebarAccordion").accordion({active:0, autoHeight: false, collapsible: true});', WT_JS_END; |
