Showing posts with label customize. Show all posts
Showing posts with label customize. Show all posts

Tuesday, 9 June 2015

Yii: jQuery UI widget dialog with ok and close buttons.

Yii: jQuery UI widget dialog with ok and close buttons.

<?php
$this->beginWidget('system.zii.widgets.jui.CJuiDialog',
array(
'id'=>'dialog'.$this->id,
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>$this->id.' Dialog box 1',
'width'=> '800px',
'height' => '600',
'position' => 'top',
'top' => '50px',
'modal' => true,
'buttons' => array(
"Ok"=>'js:function(){alert("xxx")}',
'Close'=>'js:function() {$(this).dialog("close");}'
),
'autoOpen'=>false,
)
)
);
?>

Reference:

Yii 1.1: Customize admin grid view/update/delete buttons.

In admin.php, change the following:


'class' => 'CButtonColumn',
  'template' => '{update}{delete}',
    'updateButtonUrl' =>'Yii::app()->createUrl("/customer/editmember1",array("id" => $data->primaryKey))',
    'updateButtonImageUrl'=>Yii::app()->request->baseUrl.'/images/edit.jpg',
    deleteButtonUrl' =>'Yii::app()->createUrl("/customer/delete",array("id" => $data->primaryKey))',
    'deleteButtonImageUrl'=>Yii::app()->request->baseUrl.'/images/delete.jpg', 
),

Reference:

Parenting tips to inculcate learning habits in your kid

Parenting tips to inculcate learning habits in your kid Tip #1) Children do not learn things, they emitate. So, try to do things by yours...