Difference between revisions of "How can I show the Map inside a tab"

From JReviews Documentation
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Read the article about [[Adding tabs to listing detail page]].
+
Read the article about [[Adding jQuery UI tabs to listing detail page]]. The included _tabs suffixed detail theme file already displays the map inside a tab.
 
+
To show the map inside a tab move the code that outputs the Map in the detail.thtml theme file into one of the tabs.
+
 
+
<source lang="php">
+
<!--  BEGIN MAP -->
+
<?php if(isset($listing['Geomaps']) && $listing['Geomaps']['lat']!='' && $listing['Geomaps']['lon']!=''):?>
+
<div class="clear"></div>
+
<?php echo $this->renderControllerView('geomaps','map_detail',array('width'=>'100%','height'=>'300'));?>
+
<?php endif;?>
+
<!--  END MAP -->
+
</source>
+
 
+
 
+
 
+
There is an issue when the Map is loaded in a hidden tab, this is a fix:
+
 
+
Open the <span style="color: blue">\theme_css\jquery_ui_theme\jquery-ui-1.8.5.custom.css</span> file and replace
+
 
+
<source lang="css">
+
.ui-tabs .ui-tabs-hide {
+
display: none !important;
+
}
+
</source>
+
 
+
 
+
with:
+
 
+
<source lang="css">
+
.ui-tabs .ui-tabs-hide {
+
    position: absolute;
+
    left: -5000px;
+
}
+
</source>
+
 
+
  
  

Latest revision as of 09:57, 15 December 2013

Read the article about Adding jQuery UI tabs to listing detail page. The included _tabs suffixed detail theme file already displays the map inside a tab.