Yii Framework Forum: [EXTENSION] jQuery UI widgets - Yii Framework Forum

Jump to content

  • (8 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] jQuery UI widgets Rate Topic: ***** 2 Votes

#141 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 566
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 02 November 2009 - 11:00 AM

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
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
1

#142 User is offline   transistor 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 05-June 09
  • Location:Mexico

Posted 07 November 2009 - 09:08 PM

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.
0

#143 User is offline   transistor 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 05-June 09
  • Location:Mexico

Posted 07 November 2009 - 09:11 PM

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.
0

#144 User is offline   Lollinger.de 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 19-May 09
  • Location:Ulm, Germany

Posted 11 November 2009 - 04:23 AM

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?
0

#145 User is offline   luis diego 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 02-February 10
  • Location:Costa Rica

Posted 17 March 2010 - 01:47 PM

Hello, anybody know how to set this options to the EDatePicker
'changeMonth' => 'true',
'changeYear' => 'true',






0

#146 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 05 May 2010 - 03:09 PM

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
0

#147 User is offline   fastcrash 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 245
  • Joined: 10-March 10
  • Location:South Jakarta

Posted 06 May 2010 - 04:14 AM

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.
0

#148 User is offline   ithank 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 07-June 10
  • Location:Costa Rica

Posted 02 July 2010 - 11:47 AM

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
0

#149 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 02 July 2010 - 01:28 PM

View Postithank, on 02 July 2010 - 11:47 AM, said:

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


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
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#150 User is offline   ithank 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 07-June 10
  • Location:Costa Rica

Posted 02 July 2010 - 10:18 PM

View Posttri, on 02 July 2010 - 01:28 PM, said:

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


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.
0

#151 User is offline   Drewniacki 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 19-July 10
  • Location:GdaƄsk, Poland

Posted 25 July 2010 - 07:52 AM

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.
0

#152 User is offline   ggogggo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-October 10

Posted 25 November 2010 - 04:55 AM

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

Quote


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 :)
0

#153 User is offline   huanito 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 21-November 10

Posted 21 January 2011 - 03:55 PM

View Postithank, on 02 July 2010 - 11:47 AM, said:

<snip>
: the date selected is not being saved into the model
</snip>
		<?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?



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',
0

#154 User is offline   Mahdi 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 127
  • Joined: 23-August 10
  • Location:Tunisia

Posted 16 February 2011 - 06:58 AM

View Posttransistor, on 07 November 2009 - 09:11 PM, said:

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.


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

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

0

#155 User is offline   Ikbel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 24-January 11

Posted 17 February 2011 - 04:18 AM

I have the same problem as Mahdi , plz help me
0

#156 User is offline   Mahdi 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 127
  • Joined: 23-August 10
  • Location:Tunisia

Posted 19 February 2011 - 03:21 AM

View Posttransistor, on 07 November 2009 - 09:11 PM, said:

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,

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)));

0

#157 User is offline   PeRoChAk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 578
  • Joined: 26-November 10
  • Location:Lahore, Pakistan

Posted 14 March 2011 - 04:12 AM

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.
Cheers
Perochak
Web Design - Logo Design - Application Development

My Blog | Forums Comparison
0

#158 User is offline   chang 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 16-January 12

Posted 16 January 2012 - 02:00 PM

Hi,
1)I copy example from http://www.yiiframew.../extension/jui/ from <<"Panel" mode:>>
which uses option << 'alwaysOpen'=>false,>>

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

2)
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
0

Share this topic:


  • (8 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • 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