41 $this->
class = 'picker';
43 $this->registerClientScript();
57 if ($this->
value !== null) {
58 $value = $this->evaluateExpression($this->
value, array(
'data' =>
$data,
'row' => $row));
59 }
else if ($this->name !== null) {
63 $class = preg_replace(
'/\s+/',
'.', $this->
class);
64 $value = !isset($value) ? $this->grid->nullDisplay : $this->grid->getFormatter()->format($value, $this->type);
65 $value = CHtml::link($value,
'#', array(
'class' =>
$class));
67 if ($this->grid->json) {
77 public function registerClientScript()
80 $cs = Yii::app()->getClientScript();
82 $cs->registerPackage(
'picker');
85 $gridId = $this->grid->id;
86 $class = preg_replace(
'/\s+/',
'.', $this->
class);
91 __CLASS__ .
'#' . $this->
id,
93 $(document).on(
'click',
'#{$gridId} a.{$class}',
function() {
94 if ($(
this).hasClass(
'pickeron')) {
95 $(
this).removeClass(
'pickeron').picker(
'toggle');
98 $(
'#{$gridId} a.pickeron')
99 .removeClass(
'pickeron')
100 .each(
function (i, elem) {
101 $(elem).picker(
'toggle');
105 .picker(
'toggle').addClass(
'pickeron');
return false;