OKyJIucT
11/23/2014 - 12:51 PM

Callback

Callback

$this->widget('ImperaviRedactorWidget', array(
  // You can either use it for model attribute
  'model' => '',
  'value' => $data->text,
  'attribute' => 'text',
  // or just for input field
  'name' => 'Part[translate][' . $data->id . ']',
  // Some options, see http://imperavi.com/redactor/docs/
  'options' => array(
      'toolbar' => false,
      'minHeight' => 250,
      'maxHeight' => 250,
      'keyupCallback' => 'js: function(){
          $(".btn-' . $data->id . '").val("Сохранить").removeClass("btn-success").addClass("btn-warning");
       }',
  ),
  'htmlOptions' => array(
      'row' => '12'
  ),
));