I have a small problem with CButtonColumn.deleteConfirmation or I misunderstand, how does it (should it) work.
Documentation for this property says:
“the confirmation message to be displayed when delete button is clicked. By setting this property to be false, no confirmation message will be displayed. This property is used only if $this->buttons[‘delete’][‘click’] is not set.”.
If so, then where did I make a mistake in the code:
array
(
'class'=>'CButtonColumn',
'deleteConfirmation'=>'This should not appear, since buttons->delete->click is set',
'buttons'=>array
(
'update'=>array
(
'imageUrl'=>FALSE,
'label'=>'edytuj',
'options'=>array('title'=>'Edycja oferty'),
'visible'=>'$row > 0'
),
'delete'=>array
(
'imageUrl'=>FALSE,
'label'=>'usuń',
'options'=>array('title'=>'Usunięcie oferty'),
'click'=>"js:'Delete user?'"
),
),
'template'=>'{update} | {delete}'
)
that I still see message, I’m not suppose to see after clicking delete (“This should not appear, since buttons->delete->click is set”).
For click of delete button, I tried both:
js:'Delete user?'
and:
function(){alert("Delete user?");}
In both situation I still see message defined in deleteConfirmation, not the one from buttons[‘delete’][‘click’]'s alert. What am I doing wrong?
BTW: Please not, that I’m still using 1.1.4 (if this is a bug and was fixed) and that I’m in an extremely high lack of caffeine, after sleeping only four hours (in case I would be missing something dumbly obvious)! :]