JUIButtonSet

I’m to publish this extension I developed some time ago for my private use but I hope many of you will enjoy it: JUIButtonSet

It is very easy to use, just extract the zip file into protected/estensions directory and in the place you want a Toolbar or a Buttonset you write something like:





$this->widget('ext.JuiButtonSet.JuiButtonSet', array(

    'items' => array(

        array(

            'label'=>'Menu button 1',

            'icon-position'=>'left',

            'url'=>array('create') //urls like 'create', 'update' & 'delete' generates an icon beside the button

        ),

        array(

            'label'=>'Menu button 2',

            'icon-position'=>'top',

            'icon'=>'folder-open', // This a CSS class starting with ".ui-icon-"

            'url'=>array('action2')

        ),

    ),

    'htmlOptions' => array('style' => 'clear: both;'),

));



Comments and suggestions are very welcome.

Soon, I hope to publish an update with some improvements.

Looks very nice at first sight. I would personally advice following:

[list=1]

[*]Introduce htmlOptions also for each button, so user can set for example style of a button (i.e. height etc.).

[*]If label is empty string, button should be exactly square (width = height, if not forcing it with htmlOptions), now there is a visible space in place of label; this would allow to built nice looking toolbars without captions.

[*]While jQuery UI images are cool, it would be a great idea to introduce icons loaded from for example iconUrl or sth.

[*]Check ‘icon-position’=>‘top’, for me it looks like behind text (centerd, middle, anyway not top).

[/list]

Once again, thanks for sharing a good looking extension with us!

Hi Trejder,Thanks for your feedback.

I’ll be implementing some of your suggestions/enhancements soon.

I’ll begin to fix the reported bugs.

Best regards.

Ricardo.

Good luck with that, Ricardo and all the best! :)

Hello, suport subitems?

Thank you very much.

i really love this extension… good for simple toolbar action, thx…

is it possible to execute Java Script, such as open dialog?