Yii Framework Forum: zii extensions - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

zii extensions Rate Topic: -----

#1 User is offline   makro 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 05-November 09
  • Location:Novara, IT

Posted 11 November 2009 - 02:42 PM

Hi!!
I'm developing using Yii 1.1b... it's simply amazing

I'm trying to use zii extensions like CJuiTabs.
I can't understand if is there a way to write panels content outside the panels array and without use a file per tab (renderPartial).

something like

<?php $this->beginWidget('zii.widget.ui.CJuiTabs'); ?>
//php code for tab 1

//php code for tab 2

//php code for tab 3

<?php $this->endWidget('zii.widget.ui.CJuiTabs'); ?>


It is like jui extensions... that is clean to write

Any help?

Thanks in advance,
Marco
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,892
  • Joined: 04-October 08
  • Location:DC, USA

Posted 11 November 2009 - 05:57 PM

Unfortunately this is not supported because to define a tab, you need to insert at two places: one for the tab title and one for the tab content.
0

#3 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 11 November 2009 - 10:24 PM

What about the clip widget?

http://www.yiiframew...api/CClipWidget
http://php-thoughts.cubedwater.com - my bloggings about Yii
0

#4 User is offline   makro 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 05-November 09
  • Location:Novara, IT

Posted 12 November 2009 - 02:37 AM

Thanks,
I'm going to have a look at CClipWidget.

I think it should be nice to have the possibility to create panels/tabs with code like http://www.yiiframew.../extension/jui/ or pogostick extension

Anyway I can create a new view file for the tab panels with some if/switch inside... and then call some renderPartial with parameter from the main file...

Marco
0

#5 User is offline   makro 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 05-November 09
  • Location:Novara, IT

Posted 12 November 2009 - 03:17 AM

CClipWidget did the trick!
It could be a solution, now I can continue with the development and see.

Thanks!
Marco
0

#6 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 16 November 2009 - 07:19 AM

Hi,
Is there a way to define the functions for the sortable start/stop events?
<?php
$this->widget('zii.widgets.jui.CJuiSortable', array(
 ....
 'options'=>array(
   'stop:function(event,ui){...}',
 ),
 ...
));
?>


won't work
0

#7 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,892
  • Joined: 04-October 08
  • Location:DC, USA

Posted 16 November 2009 - 07:53 AM

Use this:
<?php
$this->widget('zii.widgets.jui.CJuiSortable', array(
 ....
 'options'=>array(
   'stop'=>'js:function(event,ui){...}',
 ),
 ...
));
?>

0

#8 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 17 November 2009 - 01:37 AM

Thanks :rolleyes:
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users