[EXTENSION] jQuery UI widgets

Uploaded to jQuery UI 1.7, please visit the extension in the extensions' repository

Quote

Updated to jQuery UI 1.7, please visit the extension in the extensions' repository for more info.

Hi,

I have problem with jui 2.0.

When I try dialog without buttons:



<?php $this->beginWidget('application.extensions.jui.EDialog', 


    array('name'=>'dialogo', 


          'theme'=>'cupertino', 


          'compression'=>'packed', 


          'htmlOptions'=>array('title'=>'Hello dialog'))); ?>


<p>Hello world</p>


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


I have error:

Quote

PHP Error

Description

Array to string conversion

Source File

E:\www\projects\mysite.pl\protected\extensions\jui\EDialog.php(229)

00217:

00218:      foreach ($this->callbacks as $key=>$val) {

00219:          $encodedOptions = str_replace("'callback_{$key}':'{$key}'", "{$key}: {$val}", $encodedOptions);

00220:      }

00221:

00222:      if (!empty($this->buttons)) {

00223:          $b = array();

00224:          foreach ($this->buttons as $key=>$val) {

00225:            $b[] = "'{$key}'".':'.str_replace(array("\n", "\r", "\t"), '', $val);

00226:          }

00227:          $buttons = “‘buttons’:{” . implode(’,’, $B) . ‘}’;

00228:      }

00229: $encodedOptions = str_replace("'buttons':'buttons'", $buttons, $encodedOptions);

00230:

00231:      return $encodedOptions;

00232:    }

00233:

00234:    /**

00235:    * Generates the javascript code for the widget

00236:    *

00237:    * @return string

00238:    */

00239:    protected function jsCode($id)

00240:    {

00241:      $options = $this->makeOptions();     

What is wrong?

Hi, I couldn’t reproduce it  :o

Can someone else try to reproduce this?

Quote

Can someone else try to reproduce this?

No "success". For me, the posted code worked fine.

greets

I did not do anything special. I paste the code from the example to index view file.

I do get the same error.  Something to do with the buttons option.  I just pasted the code in, tried it and got the same error.

R

Hello… maybe this is more a question related to the jQuery UI … but … is it normal that on localhost if I set 'compression'=>'packed' in the dialog options it takes a lot of time and cpu to load the page?

Another thing: the date picker is shown correctly using the following code:

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


              array(


                    'name'=>'cp',


                    'language'=>'it',


                    'mode'=>'imagebutton',


                    'theme'=>'ui-lightness',


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


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


                   )


             );

but the datepicker shown is very small… you can’t even read the numbers on it… does this happens to you too? I also tried it with an empty webapp (generated with yiic) but nothing changed…  ::)

thanks.

bye,

Giovanni.

p.s.

thanks for this great extension… it would be great to have the tabs widget too but for me the most important are the datepicker and the dialog.

[quote author=Virtual DarKness link=topic=622.msg6945#msg6945 date=1237484168]

Hello… maybe this is more a question related to the jQuery UI … but … is it normal that on localhost if I set 'compression'=>'packed' in the dialog options it takes a lot of time and cpu to load the page?

[/qoute]

Can you check which process is eating your CPU? maybe your browser of your HTTPd… also, try the minified, it's said to work better than the packed.

Quote

Another thing: the date picker is shown correctly using the following code:

Will check later, I'm not at home.

Quote

thanks for this great extension.. it would be great to have the tabs widget too but for me the most important are the datepicker and the dialog.

Sure, I'll include the tabs too.

Quote

Can you check which process is eating your CPU? maybe your browser of your HTTPd... also, try the minified, it's said to work better than the packed.

the process is firefox… maybe also due to the firebug extension… but also using chrome it takes a lot more time to load the page…

anyway… with the minified version (“min”) it runs fine :)

Quote

Sure, I'll include the tabs too.

:) great, thanks!

bye,

Giovanni.

New release (2.1), including ETabs (and ETab). Wrapper for the Tabs widget. It works in two modes (see the extension). ETab is a container for a tab (in normal mode), and ETabs is the tab panel (works also in Ajax mode)

Thanks a lot!

Happy that you implemented it so that it works in ajax mode too!!  :)

bye,

Giovanni.

Hi,

on the documentation could you please add also the “theme” option? It took me some time to figure it  :P

something like:

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

thanks.

also… about the dialog box… would be useful / time saving to have a small example that shows how to open a dialog by clicking on a link … like a small simulation of a “delete” icon clicked or something like this…  ::) …anyway I’ll have to look at it so if you don’t have it already I’ll post it here.

bye,

Giovanni.

p.s.

I still have the problem with the calendar widget that makes the calendar looks too small… did you checked this? thanks.

Hi,

try set fontSize atribute.

Quote

try set fontSize atribute.

hi, seems to work… but don't understand why, if I change it inside EDatePicker.php (just for a test) it works, but if I change it in my code like this:

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


              array(


                'name'=>'cp',


		'fontSize'=>'2em',


		'effect'=>'fadeIn',


...

it doesn’t do anything…  ::)

thanks.

bye,

Giovanni.

Hi,

maybe try to clear the assets folder?

hi,

tried to clear the assets folder but didn't helped…

as you can see from my piece of code I’ve also tried to change the effect property and that one works fine, just the fontSize seems to be ignored. But I guess I’m missing something :P  ::)

anyway, thanks for your help  :)

bye,

Giovanni.

I wanna include timeFormat (yy-m-d H:i:s) in field datepicker.

How to do that?

Thanks

I'm using jui 2.0, it was working good on yii 1.0.3 until this morning when I upgrade to yii 1.0.4 it stop working and threw this error :

Quote

PHP Error

Description

Object of class EDatePicker could not be converted to string

Source File

/public_html/pay/protected/views/peg/_form.php(63)

00051: <div class="simple">

00052: <?php

00053:      echo CHtml::activeLabelEx($peg,'tlahir_a');

00054:      echo ($showform ? CHtml::encode($peg->tlahir_a) :

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

00056:                    'model'=>$peg,

00057:                      'attribute'=>'tlahir_a',

00058:                      'language'=>'',

00059:                      'theme'=>'redmond',

00060:                      'compression'=>'none',

00061:                      'mode'=>'imagebutton'

00062:      ))

00063: );

Any idea how to workaround?

-majin-

Hi,

try clear your assets folder.