Перейти к содержимому


Фотография
- - - - -

Tabs (вкладки) VS <table>


Лучший Ответ Soft , 05 June 2013 - 21:59

Вопрос отпал. Добрые люди помогли.

 

Таблица должна выглядеть так(взять в <div>) 

<?php if ($this->checkPosition('tab-text')) : ?>

           <div id="tab-text">
  <table  class="jsTableSorter tablesorter zebra">
      <caption><b>Представители в Украине</b></caption>
      <thead>
      <tr align="center">
   <th>Логотип</th>
   <th>Название</th>
   <th>Город</th>
   <th>Сайт</th>
      </tr>
      </thead>
      <tbody > 
          <?php echo $this->renderPosition('tab-text', $positionParams); ?>
         </tbody>
  </table>
     </div>
 <?php endif; ?>

 

Перейти к сообщению


  • Закрытая тема Тема закрыта
Сообщений в теме: 3

#1 Soft

Soft

Отправлено 03 June 2013 - 09:01

По мотивам http://forum.jbzoo.c...aser-tablitcej/

 

вопрос:

 

Почему <table> не хочет нормально работать, если таблицу размещать внутри вкладок?

(таблица отображается, но видна во всех вкладках, а не в одной)


  • 0

#2 SmetDenis

SmetDenis

Отправлено 03 June 2013 - 22:06

А есть ссылка на сайт?


  • 0
JBZoo v4.0 и новый чудный мир Open Source GPL
Отключайте проверку лицензий как можно скорее!



— Есть два типа людей: Кто еще не делает бекапы и кто уже делает бекапы.


#3 Soft

Soft

Отправлено 05 June 2013 - 09:22

А есть ссылка на сайт?

http://dcp.1gb.ua/in...d=13&Itemid=311 (при переключении вкладок таблица не исчезает)

 

Если без таблицы выводить, то получается как здесь на вкладке "3".(Здесь другой метод вкладок использован, и другие моменты вылазят)

 

В код для таблицы делаю только такие изменения в фулл.пхп (выделил изменения)

 

<?php

 
defined('_JEXEC') or die('Restricted access');
$this->app->jbassets->tablesorter();
 
$align = $this->app->jbitem->getMediaAlign($item, $layout);
 
echo $this->renderPosition('title',     array('style' => 'jbtitle'));
echo $this->renderPosition('subtitle',  array('style' => 'jbsubtitle'));
echo $this->renderPosition('likes',     array(
        'style' => 'jbblock',
        'class' => 'align-left'
    )
);
echo $this->renderPosition('rating', array(
        'style' => 'jbblock',
        'class' => 'align-right',
    )
);
 
?><?php $this->app->jbassets->jQueryUi(); ?>
<div class="clear clr"></div>
 
<div class="rborder item-body">
 
    <?php if ($this->checkPosition('image')) : ?>
        <div class="item-image align-<?php echo $align;?>">
            <?php echo $this->renderPosition('image'); ?>
        </div>
    <?php endif; ?>
 
    <?php if ($this->checkPosition('anons')) : ?>
        <div class="item-anons">
            <?php echo $this->renderPosition('anons'); ?>
        </div>
    <?php endif; ?>
 
    <?php if ($this->checkPosition('meta')) : ?>
        <hr/>
        <div class="item-meta">
            <?php echo $this->renderPosition('meta', array(
                'style'    => 'jbblock',
                'labelTag' => 'strong',
                'tag'      => 'p'
            )); ?>
        </div>
    <?php endif; ?>
    <div class="clear clr"></div>
</div>
 
 
 
<?php if ( $this->checkPosition('tab-text')
        || $this->checkPosition('tab-gallery')
        || $this->checkPosition('tab-properties')
        || $this->checkPosition('tab-reviews')
        || $this->checkPosition('tab-comments')
    ) :
 
    $positionParams = array(
        'style'    => 'jbblock',
        'tag'      => 'div',
        'labelTag' => 'h3',
        'clear'    => true
    );
 
    ?>
    <div id="jbzoo-tabs" class="rborder">
        <ul>
            <?php if ($this->checkPosition('tab-text')) : ?>
                <li><a href="<?php echo $this->app->jbenv->getCurrentUrl();?>#tab-text"><?php echo JText::_('JBZOO_ITEM_TAB_DESCRIPTION');?></a></li>
            <?php endif; ?>
 
            <?php if ($this->checkPosition('tab-properties')) : ?>
                <li><a href="<?php echo $this->app->jbenv->getCurrentUrl();?>#tab-properties"><?php echo JText::_('JBZOO_ITEM_TAB_PROPS');?></a></li>
            <?php endif; ?>
 
 
            <?php if ($this->checkPosition('tab-gallery')) : ?>
                <li><a href="<?php echo $this->app->jbenv->getCurrentUrl();?>#tab-gallery"><?php echo JText::_('JBZOO_ITEM_TAB_GALLERY');?></a></li>
            <?php endif; ?>
 
            <?php if ($this->checkPosition('tab-reviews')) : ?>
                <li><a href="<?php echo $this->app->jbenv->getCurrentUrl();?>#tab-reviews"><?php echo JText::_('JBZOO_ITEM_TAB_REVIEWS');?></a></li>
            <?php endif; ?>
 
            <?php if ($this->checkPosition('tab-comments')) : ?>
                <li><a href="<?php echo $this->app->jbenv->getCurrentUrl();?>#tab-comments"><?php echo JText::_('JBZOO_ITEM_TAB_COMMENTS');?> (<?php echo $item->getCommentsCount();?>)</a></li>
            <?php endif; ?>
        </ul>
 
       
<table  class="jsTableSorter tablesorter zebra">
    <caption><b>Представители в Украине</b></caption>
        <thead>
        <tr align="center">
            <th>Логотип</th>
            <th>Название</th>
            <th>Город</th>
            <th>Сайт</th>
        </tr>
        </thead>
        <tbody > 
<tr>
<?php if ($this->checkPosition('tab-text')) : ?>
           <div id="tab-text"><?php echo $this->renderPosition('tab-text', $positionParams); ?></div>
       
        <?php endif; ?>
</tr>
</tbody>
 </table>
 
        <?php if ($this->checkPosition('tab-gallery')) : ?>
            <div id="tab-gallery"><?php echo $this->renderPosition('tab-gallery', $positionParams); ?></div>
 
        <?php endif; ?>
 
        <?php if ($this->checkPosition('tab-properties')) : ?>
            <div id="tab-properties">
                <ul class="item-properties"><?php echo $this->renderPosition('tab-properties', array('style' => 'list'));?></ul>
            </div>
        <?php endif; ?>
 
        <?php if ($this->checkPosition('tab-reviews')) : ?>
            <div id="tab-reviews"><?php echo $this->renderPosition('tab-reviews', $positionParams); ?></div>
        <?php endif; ?>
 
        <?php if ($this->checkPosition('tab-comments')) : ?>
            <div id="tab-comments"><?php echo $this->renderPosition('tab-comments', $positionParams); ?></div>
        <?php endif; ?>
    </div>
 
    <?php $this->app->jbassets->jQueryUi(); ?>
    <script type="text/javascript">
        jQuery(function ($) {
            $('#jbzoo-tabs').tabs();
        });
    </script>
<?php endif; ?>
 
 

 


  • 0

#4 Soft

Soft

Отправлено 05 June 2013 - 21:59   Лучший Ответ

Вопрос отпал. Добрые люди помогли.

 

Таблица должна выглядеть так(взять в <div>) 

<?php if ($this->checkPosition('tab-text')) : ?>

           <div id="tab-text">
  <table  class="jsTableSorter tablesorter zebra">
      <caption><b>Представители в Украине</b></caption>
      <thead>
      <tr align="center">
   <th>Логотип</th>
   <th>Название</th>
   <th>Город</th>
   <th>Сайт</th>
      </tr>
      </thead>
      <tbody > 
          <?php echo $this->renderPosition('tab-text', $positionParams); ?>
         </tbody>
  </table>
     </div>
 <?php endif; ?>

 


  • 1




Click to return to top of page in style!