joris

sample

Mar 20th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. array(
  2.     'class'=>'CButtonColumn',
  3.     'header'=>'Action',
  4.     'template'=>'{addasset}{edit}{hapus}',
  5.     'htmlOptions'=>array('style'=>'width: 170px'),
  6.     'buttons'=>array
  7.     (
  8.         'addasset' => array
  9.         (
  10.             'label'=>'Add Asset',
  11.             'url'=>'Yii::app()->createUrl("po/addasset", array("id"=>$data->id))',
  12.             'options'=>array(
  13.                 'class'=>'btn btn-success',
  14.             ),
  15.         ),
  16.         'edit' => array
  17.         (
  18.             'label'=>'Edit',
  19.             'url'=>'Yii::app()->createUrl("po/update", array("id"=>$data->id))',
  20.             'options'=>array(
  21.                 'class'=>'btn btn-warning',
  22.             ),
  23.         ),
  24.         'hapus' => array
  25.         (
  26.             'label'=>'Delete',
  27.             'url'=>'Yii::app()->createUrl("po/delete", array("id"=>$data->id))',
  28.             'options' => 'ajax' => array(
  29.                 'type' => 'get',
  30.                 'url'=>'js:$(this).attr("href")',
  31.                 'success' => 'js:function(data) {
  32.                    $.fn.yiiGridView.update("my-grid");
  33.                    $("myId").hide();
  34.                }'
  35.             ),
  36.         ),
  37.     ),
  38. ),
Advertisement
Add Comment
Please, Sign In to add comment