Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // hay casos en que las vistas muy voluminosas causan que el HTML sin formato se vea
- // primero que el efecto de jQueryUi.tabs(). Solución: haremos el tab visible solo cuando
- // todo el html haya sido cargado, usando script jQuery posicionado con:
- // CClientScript::POS_LOAD.
- //
- // por: Christian Salazar, christiansalazarh@gmail.com
- //
- $this->widget('zii.widgets.jui.CJuiTabs',array(
- 'id'=>'article_tab',
- 'htmlOptions'=>array('style'=>'display: none;'), // INVISIBLE..
- 'tabs'=>array(
- 'Datos del Articulo'=>$this->renderPartial('_form',
- array('model'=>$model),true),
- 'Imagenes'=>$this->renderPartial('_form-images',
- array('model'=>$model),true),
- 'Opciones'=>$this->renderPartial('_form-options',
- array('model'=>$model),true),
- 'Stock'=>$this->renderPartial('_form-stock',
- array('model'=>$model),true),
- ),
- 'options'=>array(
- 'collapsible'=>false,
- 'cookie'=>9000,
- ),
- ));
- // VISIBLE solo cuando cargue todo..
- Yii::app()->getClientScript()->registerScript("articletab", // un ID unico tambien
- "$('#article_tab').show();" ,CClientScript::POS_LOAD); // el ID del tab
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement