コード例 #1
0
ファイル: SearchPanel.php プロジェクト: pscheit/psc-cms
 protected function doInit()
 {
     // das zuerst machen, da das html von f::inputSet bei html() schon gemorphed wird
     $widget = $this->getAutoCompleteWidget();
     $widgetSelector = \Psc\JS\jQuery::getClassSelector($widget);
     $content = NULL;
     $content .= f::inputSet(f::input($widget, $this->getHint()))->setStyle('width', '90%')->html();
     // gilt für alle
     // ist auch in ajax.dialog.add.speakers
     $content .= f::hint($this->getExplanation());
     $this->html = f::group($this->getLabel(), $content, f::GROUP_COLLAPSIBLE)->setStyle('width', '80%');
     $this->constructParams['widget'] = new \Psc\JS\Code($widgetSelector);
     $this->constructParams['delay'] = $this->getAutoCompleteDelay();
     $this->constructParams['minLength'] = $this->getAutoCompleteMinLength();
     $this->constructParams['url'] = $this->getAutoCompleteURL();
     $this->constructParams['maxResults'] = $this->getMaxResults();
     if ($this->getAutoCompleteBody() != NULL) {
         $this->constructParams['body'] = $this->getAutoCompleteBody();
     }
     $this->constructParams['eventManager'] = new \Psc\JS\Code('main.getEventManager()');
     $this->autoLoad();
 }
コード例 #2
0
ファイル: Base.php プロジェクト: pscheit/psc-cms
 public function wrapHTML($componentContent)
 {
     $forClass = 'component-for-' . implode('-', (array) $this->getFormName());
     $wrapper = HTML::tag('div', new stdClass(), array('class' => array('component-wrapper', 'input-set-wrapper', $forClass)));
     $wrapper->content->component = $componentContent;
     $wrapper->content->hint = $this->hasHint() ? f::hint($this->hint) : NULL;
     $wrapper->content->break = $this->hasHint() && !$this->isBlock($componentContent) ? '<br />' : NULL;
     $wrapper->content->js = NULL;
     $wrapper->setContentTemplate("%component%\n%js%%break%\n%hint%");
     return $wrapper;
 }
コード例 #3
0
 protected function getFormDocumentation()
 {
     $html = \Psc\UI\Group::create($this->trans('component.navigation.doc.levels', array(), 'cms'), array(Form::hint($this->trans('component.navigation.doc.reading', array(), 'cms')) . '<br />', '<br />'))->setStyle('margin-top', '7px');
     $html .= \Psc\UI\Group::create($this->trans('component.navigation.doc.newPage', array(), 'cms'), array(Form::hint($this->trans('component.navigation.doc.addNode', array(), 'cms'))));
     return $html;
 }
コード例 #4
0
ファイル: DeleteButton.php プロジェクト: pscheit/psc-cms
 public function disable()
 {
     parent::disable();
     $this->hint = Form::hint($this->deleteHint)->templatePrepend('<br />');
     $this->after($this->hint);
 }