public function getInnerHTML() { $ace = HTML::tag('div', NULL, array('class' => '\\Psc\\ace-editor')); $group = new Group($this->getFormLabel(), $ace); $group->addClass('\\Psc\\ace-group'); return $group; }
/** * @fixme getTabLabel() (aka das Label für den Tab) von $item bei addLinkable wird nicht benutzt */ public function add($label, $link, $id = NULL) { // @TODO respect das neue RightContentLinkable und rufe den Tab mit TabLabel auf und so $a = HTML::tag('a', HTML::esc($label), array('href' => $link))->addClass('\\Psc\\drop-content-ajax-call'); $a->guid($id); $a->publishGUID(); $this->html->content[] = HTML::tag('li', $a); }
public static function hint($text, $br = FALSE) { $hint = UIHTML::tag('small', nl2br(HTML::esc($text)), array('class' => 'hint')); if ($br) { $hint->templateAppend('<br />'); } return $hint; }
protected function createContainers() { $containers = array(); foreach ($this->tabs as $tab) { $containers[] = HTML::tag('div', $tab->html(), array('class' => 'content-container')); } return $containers; }
protected function doInit() { list($buttons, $this->buttonSnippets) = $this->convertButtons(); $this->html = HTML::tag('div', $buttons, array('class' => '\\Psc\\drop-box')); if (isset($this->label)) { \Psc\UI\Form::attachLabel($this->html, $this->label); } $this->autoLoadJoose($this->getJooseSnippet()); }
public function getInnerHTML() { $componentTabs = array(); foreach ($this->components as $lang => $component) { $componentTabs[] = new Tab(HTML::esc($lang), $component->getInnerHTML()); // ein bildchen für lang? } $tabs = new Tabs($componentTabs); $tabs->setAutoLoad(FALSE); return $tabs->html(); }
protected function doInit() { $this->html = HTML::tag('div', $this->buttons, array('class' => '\\Psc\\buttonset')); if (($this->flags & self::ALIGN_RIGHT) == self::ALIGN_RIGHT) { $this->html->setStyle('float', 'right')->addClass('\\Psc\\buttonset-right'); } if (($this->flags & self::ALIGN_LEFT) == self::ALIGN_LEFT) { $this->html->setStyle('float', 'left')->addClass('\\Psc\\buttonset-left'); } if (($this->flags & self::CLEAR) == self::CLEAR) { $this->html->templateAppend("\n" . '<div class="clear"></div>'); } }
protected function doInit() { $this->html = HTML::tag('form', $this->content, array('method' => $this->method, 'action' => $this->action, 'class' => '\\Psc\\form')); $this->html->guid($this->formId); foreach ($this->httpHeaders as $name => $value) { // fHTML ist mehr basic und macht nur hidden, ohne ids ohne schnickschnack $this->html->content->{$name} = FormHTML::hidden($name, $value)->addClass('psc-cms-ui-http-header'); // \Psc geht nicht weil kein UI } foreach ($this->postData as $key => $value) { $this->html->content->{$key} = FormHTML::hidden($key, $value); } }
/** * Eine Gruppe von Element mit einer Überschrift * * der Inhalt ist eingerückt und es befindet sich ein Rahmen herum * @param mixed $legend der inhalt der Überschrift * @param mixed $content der Inhalt des Containers */ public function __construct($legend, $content = NULL, $flags = 0x0) { parent::__construct('fieldset', new \stdClass()); $this->addClass('ui-corner-all')->addClass('ui-widget-content')->addClass('\\Psc\\group'); $this->contentTemplate = "%legend%\n %div%"; $this->content->legend = HTML::tag('legend', $legend); $this->content->div = HTML::tag('div', $content, array('class' => 'content')); $this->flags = $flags; if ($this->flags & self::COLLAPSIBLE) { $this->setCollapsible(); } if ($this->flags & self::CONTAINING_BLOCK) { $this->addClass('containing-block'); } }
protected function getContentLayout() { $content = $this->content; // entweder eine group oder ein div(wenn label nicht gesetzt) um den eigentlichen content herum if (isset($this->label)) { $contentGroup = new Group($this->label, $content); $contentGroup->getContentTag()->setStyle('min-height', '350px'); } else { $contentGroup = HTML::tag('div', $content); $contentGroup->setStyle('min-height', '350px'); } if (isset($this->accordion)) { return new SplitPane($this->splitWidth, $contentGroup, $this->accordion, 2); return $pane; } else { return $contentGroup; } }
/** * Erzeugt ein neues Tag * * @param string $name * @param mixed $content * @param Array $attributes * @return \Psc\UI\HTMLTag */ public static function tag($name, $content = NULL, array $attributes = NULL) { return \Psc\UI\HTML::tag($name, $content, $attributes); }
public static function open($uniquePrefix = NULL, $action = '') { if (isset($uniquePrefix)) { self::$uniquePrefix = $uniquePrefix . '-'; } $content = new \stdClass(); $content->form = UIHTML::tag('form', new stdClass(), array('method' => 'post', 'action' => $action))->setOption('closeTag', FALSE); return UIHTML::tag('div', $content, array('class' => '\\Psc\\form'))->setOption('closeTag', FALSE); }
public function addSection($headline, array $content, $index = self::END, $openAllIcon = FALSE) { $class = \Psc\HTML\HTML::string2class($headline); $this->addRow('<a href="#">' . HTML::esc($headline) . '</a>' . ($openAllIcon ? '<span class="ui-icon open-all-list psc-cms-ui-icon-secondary ui-icon-newwin" title="Alle öffnen"></span>' : ''), $content, $index, $class); return $this; }
public static function createWithTitle($title, $content = NULL) { return new static(HTML::esc($title), $content); }
protected function doInit() { $this->html = HTML::tag('a', HTML::esc($this->label), array('href' => $this->uri)); }
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; }
public function getInnerHTML() { return Group::create($this->getFormLabel() ?: 'Bild', HTML::tag('input', NULL, array('type' => 'hidden', 'name' => $this->getFormName(), 'value' => $this->getId()))); }
protected function doInit() { parent::doInit(); $this->html->addClass(HTML::class2html($this->entity->getEntityName()) . '-form')->addClass('\\Psc\\entity-form'); }
public function getInnerHTML() { return HTML::tag('div', (object) array('password' => $this->passwordField->getInnerHTML(), 'confirmation' => $this->confirmationField->getInnerHTML()), array('class' => 'password-pane'))->setContentTemplate('<p style="margin-bottom: 10px;">%password%</p><p>%confirmation%</p>'); }
protected function doInit() { $this->html = HTML::tag('input', NULL, array('type' => 'text', 'name' => $this->convertHTMLName(array_merge(array('disabled'), (array) $this->name))))->addClass('\\Psc\\combo-box'); $this->autoLoadJoose($this->getJooseSnippet()); }
protected function doInit() { $this->html = HTML::tag('div', NULL, array('class' => 'pages-menu')); $this->autoLoadJoose($this->getJooseSnippet()); }
/** * Fügt einen Tab hinzu * * Es kann alles angegebenwerden (Low-Level) */ public function add($headline, $content = NULL, $contentLink = NULL, $tabName = NULL, $closeable = NULL) { $this->init(); $this->tabsIndex++; if (!isset($closeable)) { $closeable = $this->closeable; } if (!isset($tabName)) { $tabName = $this->prefix . $this->tabsIndex; } if (!isset($contentLink)) { $contentLink = '#' . $tabName; } $this->html->content->ul->content[] = HTML::Tag('li', array(HTML::Tag('a', HTML::esc($headline), array('title' => $tabName, 'href' => $contentLink)), $closeable ? '<span class="ui-icon ui-icon-gear options"></span>' : NULL, $closeable ? '<span class="ui-icon ui-icon-close">' . HTML::esc($closeable) . '</span>' : NULL))->setGlueContent('%s'); if (isset($content)) { $this->html->content->{$tabName} = HTML::Tag('div', $content, array('id' => $tabName)); } return $this; }