public function to($type) { if ($type == 'html' && $this->cfg->mode == 'edit') { response::getInstance()->addJs('checkboxFields'); } return parent::to($type); }
public function to($type) { $ret = parent::to($type); if ($type == 'html' && $this->cfg->mode == 'edit') { $ret = '<span id="' . $this->id . 'Container">' . $ret . '</span>'; $resp = response::getInstance(); $resp->addJs('jqueryui'); $resp->addJs('formAutocomplete'); $prm = $this->cfg->jsPrm; $prm['name'] = $this->id . '[]'; $prm['nameNew'] = $this->id . '[new]'; $resp->blockJquery('$("#' . $this->id . 'Container").formAutocomplete(' . json_encode($prm) . ');'); } return $ret; }