Exemplo n.º 1
0
 /**
  * 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
  * @return HTMLTag
  */
 public static function group($legend, $content, $flags = 0x0)
 {
     $group = UIHTML::Tag('fieldset', new \stdClass())->addClass('ui-corner-all')->addClass('ui-widget-content')->addClass('\\Psc\\group');
     $group->contentTemplate = "%legend%\n  %div%";
     $group->content->legend = UIHTML::Tag('legend', $legend);
     $group->content->div = UIHTML::Tag('div', $content, array('class' => 'content'));
     if ($flags & self::GROUP_COLLAPSIBLE) {
         $group->content->legend->addClass('collapsible');
     }
     return $group;
 }
Exemplo n.º 2
0
 /**
  * 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;
 }