I have two problems extending CButtonColumn and would appreciate any help as I found no solution in documentation. I've separated both problems into two topic as they are quite different and one post holding both of them become to long - no one would like to read it! :] So this is continuity to this post.
A terrible mess happens if I use below code, but I can't find what is wrong with it?
'class'=>'CButtonColumn', 'template'=>'{down} {delete}', 'buttons'=>array ( 'down' => array ( 'label'=>'[-]', 'url'=>'"#"', 'visible'=>'$data->ID > 0', 'click'=>'alert("Going down!");', ), ),
If I use the code exactly as in the example, the down button does not work and upon each page refresh I got JS error in the console, saying: "missing ) after argument list - jQuery('#zlecenia-grid a.down').live('click',alert("Going down!")".
If I remove ; after closing braced, even stranger things happens - I see that alert upon page refresh, not after click, and my JS console gots error saying: "b is undefined in assets/418d6bd7/jquery.min.js line: 49".
And the strangest part is that errors in down button declaration are also influencing delete button. I.e. clicking it shows my own controller-error suggesting that delete request was sent in GET while it has to be sent in POST. This is really weird, as I do not changed delete button declaration even a bit and was surprised that one button can influence another one.