コード例 #1
0
 protected function getWrapper($obj, $grid)
 {
     $id = $this->action->getIdForRecord($obj);
     list($url, $params) = $this->divideUrlAndParams($this->action->getUrl($obj, $id));
     $start = sprintf("<span class='live-edit' id='%s' livetemplate='%s' liveurl='%s' livedata='%s' placeholder='%s'>", $grid->getId() . '_' . $this->field->getFieldName() . '-' . $grid->escape($id), $grid->escape($this->getInputTemplate()), $url, Am_Controller::getJson($params), $grid->escape($this->action->getPlaceholder()));
     $stop = '</span>';
     return array($start, $stop);
 }
コード例 #2
0
ファイル: LiveEdit.php プロジェクト: grlf/eyedock
 protected function getWrapper($obj, $grid)
 {
     $id = $this->action->getIdForRecord($obj);
     $val = $obj->{$this->field->getFieldName()};
     list($url, $params) = $this->divideUrlAndParams($this->action->getUrl($obj, $id));
     $start = sprintf('<span class="live-edit%s" id="%s" livetemplate="%s" liveurl="%s" livedata="%s" placeholder="%s" data-init-callback="%s">', $val ? '' : ' live-edit-placeholder', $grid->getId() . '_' . $this->field->getFieldName() . '-' . $grid->escape($id), $grid->escape($this->getInputTemplate()), $url, $grid->escape(Am_Controller::getJson($params)), $grid->escape($this->action->getPlaceholder()), $grid->escape($this->action->getInitCallback()));
     $stop = '</span>';
     return array($start, $stop);
 }