Yii syntax to customize position of CJuidialog on screen

Default position of Cjuidialog is ‘center’. I want to change it

to be for example left = 300px, top = 50px.

I have consulted original documentation of JQuery UI but my problem

is that I do not know the right syntax to use in yii.

Here is my code and what I’ve tryed so far without success.





$this->beginWidget('zii.widgets.jui.CJuiDialog', array(

    'id'=>'PaymentmethodNotAvailable',

    'options'=>array(

    

       'title'=>'Information',

       

        'width'=>475,

        'height'=>225,

        'autoOpen'=>false,

        'resizable'=>true,

        'modal'=>true,

          .

          .

          .


        'position'=>array('left'=>300, 'top'=50), <-- not working


         'left' => 300,  <-- not working either

         'top' => 50,    <-- not working either

          .

          .

          .

        

        'overlay'=>array(

            'backgroundColor'=>'#000',

            'opacity'=>'3.5'

        ),

        'buttons'=>array(

        ),

    ),

));




Any help is highly appreciated.

thxs

I know this is an old thread, but I found it using Google and someone else with the same question may find it too. So here’s the answer. First, for reference read the jQuery UI documentation about the position option.

To translate this into an option for the Yii CJuiDialog widget:


$this->beginWidget('zii.widgets.jui.CJuiDialog',array(


...


    // additional javascript options for the dialog plugin

    'options'=>array(


...


        'position'=>array('my'=>'top','at'=>'top'),

OR

        'position'=>array(300,50),

    ),

));

I hope this helps someone.