[EXTENSION] jQuery UI widgets

Hi,

great extension, but I think I stumbled upon a tiny bug:

line 122, EAccordion reads:


      'active'=>array('type'=>array('boolean', 'number')),

but only this works for me:


      'active'=>array('type'=>array('boolean', 'integer')),

Never heard of that data-type “number” in PHP … maybe in Objective-PHP ;)

Best regards,

schmunk

This is fine extension.

A question:

How can I make a tab disabled?

At the jQuery Tabs page, I see that it can be done like so:




$('.selector').tabs({ disabled: [1, 2] });



I tried:




<?php $this->beginWidget('application.extensions.jui.ETabs', array('name' => 'datos_anuncio', 'option' => array('disabled' => '1'))); ?>



But I get a CException saying that Property "ETabs.option" is not defined.

and




<?php $this->beginWidget('application.extensions.jui.ETabs', array('name' => 'datos_anuncio', 'disabled' => '[1]')); ?>



Same error but Property "ETabs.disabled" is not defined.

Hope someone can help.

Thank you.

This is fine extension.

A question:

How can I make a tab disabled?

At the jQuery Tabs page, I see that it can be done like so:




$('.selector').tabs({ disabled: [1, 2] });



I tried:




<?php $this->beginWidget('application.extensions.jui.ETabs', array('name' => 'datos_anuncio', 'option' => array('disabled' => '1'))); ?>



But I get a CException saying that Property "ETabs.option" is not defined.

and




<?php $this->beginWidget('application.extensions.jui.ETabs', array('name' => 'datos_anuncio', 'disabled' => '[1]')); ?>



Same error but Property "ETabs.disabled" is not defined.

Hope someone can help.

Thank you.

Hi,

is there a posibility to interlace different tabs an tab panels? I want to generate a tab panel with some tabs. one oft thes tabs should contain either an tab panel with some tabs. The code so far is:




<?php $this->beginWidget('application.extensions.jui.ETabs', array('name'=>'panel1')); ?>

	<?php $this->beginWidget('application.extensions.jui.ETab', array('name'=>'tab11', 'title'=>'Tab 1')); ?>

			

	<?php $this->endWidget('application.extensions.jui.ETab'); ?>

	

	<?php $this->beginWidget('application.extensions.jui.ETab', array('name'=>'tab12', 'title'=>'Tab 2')); ?>

		

		<?php $this->beginWidget('application.extensions.jui.ETabs', array('name'=>'panel2')); ?>

			<?php $this->beginWidget('application.extensions.jui.ETab', array('name'=>'tab21', 'title'=>'Tab 1')); ?>

				

			<?php $this->endWidget('application.extensions.jui.ETab'); ?>

			<?php $this->beginWidget('application.extensions.jui.ETab', array('name'=>'tab22', 'title'=>'Tab 2')); ?>

			

			<?php $this->endWidget('application.extensions.jui.ETab'); ?>

		<?php $this->endWidget('application.extensions.jui.ETabs'); ?>

			

	<?php $this->endWidget('application.extensions.jui.ETab'); ?>

	<?php $this->beginWidget('application.extensions.jui.ETab', array('name'=>'tab13', 'title'=>'Tab 3')); ?>

	

	<?php $this->endWidget('application.extensions.jui.ETab'); ?>

<?php $this->endWidget('application.extensions.jui.ETabs'); ?>



But this leads not to the goal. All tabs are shown in the first tab panel. Have anyone an idea how i can fix this problem, without using ajax tabs?

Hello, anybody know how to set this options to the EDatePicker


'changeMonth' => 'true',

'changeYear' => 'true',

Somehow I can’t use Datepicer in 1.1.2

Trying simple:


$this->widget('application.extensions.jui.EDatePicker',

              array(

                    'name'=>'dp',

                    'language'=>'es',

                    'mode'=>'button',

                    'theme'=>'cupertino',

                    'value'=>date('Y-m-d'),

                    'htmlOptions'=>array('size'=>10)

                   )

             );



Pop up does not appear when clicked.

Any suggestions?

CoLT

Actually when some field empty there is message say "Name required blaa blaa…"

but the error message not shown, when i added datepicker,why?

when i comment the datepicker, its show again.

this error effect to all field in the form.

this my date picker code


		<?php echo $form->labelEx($model,'tgl', array('class'=>'label1')); ?>

		<?php


		$this->widget('application.extensions.jui.EJqueryUiInclude', array('theme'=>'humanity'));

		$this->widget('application.extensions.jui.EDatePicker',

              array(

                    'name'=>'news[tgl]',

                    'language'=>'en',

                    'mode'=>'imagebutton',

                    'theme'=>'humanity',

                    'value'=>$model->tgl,

					'dateFormat'=>'dd/mm/yy',

                    'options'=>array('changeMonth'=>true,'changeYear'=>true,'constrainInput'=>true,'yearRange'=>'1950:2000'),

                    'htmlOptions'=>array('style'=>'margin-right:4px;width:150px;')

                   )

             );

		?>

		<?php echo $form->error($model,'tgl'); ?>

where is the error?

thanks.

I’m relatively new to Yii (working with v1.1.2) and just came across jui (v2.4.2) as I’ve been trying to enhance both usability and visual components. I have have been able to find answers to just about all of my formatting and usability issues with the EDatePicker, but have one major issue that I can’t resolve: the date selected is not being saved into the model (if a value exists in record, it’s read into the widget just fine). Here’s my current code. I do have to say in advance that I’ve a large number of combinations trying to get it to work.


		<?php  $this->widget('application.extensions.jui.EDatePicker', array(

                      'name'=>'birthday',

                      'model'=>$model,

                      'attribute'=>'birthday',

                      'compression'=>'none',

                      'fontSize'=>'0.9em',

                      'options'=>array('changeMonth'=>true, 'changeYear'=>true, 'yearRange'=>'1950:2010'),

                      'value'=>$model->birthday,

                  ));

                ?>



I’ve tried putting the ‘value’ setting inside of ‘htmlOptions’, with and without the ‘attribute’ setting, etc. to no effect.

Any ideas?

The other minor, but potentially annoying issue is that when I click into the text field associated with this widget, the browser window flashes extreme quickly/briefly as the calendar starts to display.

Any ideas on either of these? Or is this a dead project (based on the lack of activity in this forum lately)?

TIA,

Henry

I think many people now use the Zii library that comes with the framework

Have a look at CJuiDatePicker.

I use it myself like this




        $this->widget('zii.widgets.jui.CJuiDatePicker', array(

            'name'=>CHtml::activeName($model, 'date_attribute'),

            'model'=>$model,

            'value'=>$model->date_atribute,

            'language'=>'sv',

            'options'=>array(

              'onClose'=>'js:function(){$("#'.CHtml::activeId($model,"date_attribute").'").focus();}',

              'gotoCurrent'=>true,

            ),

            'htmlOptions'=>array(

               ...

            ),

        ));



/Tommy

I was wondering if that was the way to go.

I tried the CJuiDatePicker, as you suggest, and was able to get it to mostly work (Never could get the calendar to go to the date in the associated field if there was one already there). I’ll try that again.

Thanks Tommy.

Class properties of widgets (like i.e. EDatePicker::$mode) are set private. It would me much easier to extend them if they were set protected.

hi :)

i have a little problem…

i’m sorry if it was already explained, but i could not find it

im trying to use two instances of the jui.ESlider but it does not seem to work - i get

sample code goes like this:




$this->widget('application.extensions.jui.ESlider',

              array(

                    'name'=>'distanceSlider',

                    'theme'=>'excite-bike',

                    'enabled'=>true,

                    'minValue'=>1.0,

                    'maxValue'=>floatval(Yii::app()->params['maxPointer']['distance']),

                    'value'=>array(floatval($pointerForm->distance)),

                    'linkedElements'=>array('AnalyzerPointerForm_distance'),

                    'numberOfHandlers'=>1,

                    'range'=>false,

                    'htmlOptions'=>array('style'=>'margin-left: 120px; width: 180px; height:10px; ')

                   )

             );


....


    $this->widget('application.extensions.jui.ESlider',

              array(

                    'name'=>'intervalSlider',

                    'theme'=>'excite-bike',

                    'enabled'=>true,

                    'minValue'=>1.0,

                    'maxValue'=>floatval(Yii::app()->params['maxPointer']['interval']),

                    'value'=>array(floatval($pointerForm->interval)),

                    'linkedElements'=>array('AnalyzerPointerForm_interval'),

                    'numberOfHandlers'=>1,

                    'range'=>false,

                    'htmlOptions'=>array('style'=>'width: 200px; height:10px; ')

                   )

             );

 



any help is appreciated :)

You probably moved on by now. <_< But just in case…and for other folks:

‘value’ is in the right place. It loads the datepicker with the initial date from the model.

‘name’ is more likely the culprit.

usually the ‘name’ format is like ‘modelname[fieldname]’

so the name posted ‘birthday’ with the new value probably wasn’t being recognized. It was probably looking for a post named like modelname[birthday]

To see how the fields are named check the HTML source of your page.

also if you need ‘id’ as well (you may not) then it would be in the form

‘id’=>‘modelname_fieldname’,

I have the same problem but with select property, have you found a solution?


$('#tabs').tabs('selected', '#tab1');

I have the same problem as Mahdi , plz help me

Hi,

In the file "EJqueryUiWidget.php", Property "option" must be public.


public $options = array();


$this->beginWidget('application.extensions.jui.ETabs', array('name'=>'tabs','options'=>array('selected'=>2)));

Any help regarding using Sortable JUI component.

Actually, I wants to use the items from data base to have the position of the items updated.

Hi,

1)I copy example from http://www.yiiframework.com/extension/jui/ from <<"Panel" mode:>>

which uses option << ‘alwaysOpen’=>false,>>

But in application.extensions.jui.EAccordion it is not used => I get the error

class EJqueryUiWidget …

it seems in line 102

"private $callbacks = array();"

must be replaced "protected $callbacks = array();"

or my IDE PhpStorm and I, something do not understand


thanks for this great extension