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;'),
));
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!