Пример #1
0
 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;
 }
Пример #2
0
 /**
  * @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);
 }
Пример #3
0
 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;
 }
Пример #4
0
 protected function createContainers()
 {
     $containers = array();
     foreach ($this->tabs as $tab) {
         $containers[] = HTML::tag('div', $tab->html(), array('class' => 'content-container'));
     }
     return $containers;
 }
Пример #5
0
 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());
 }
Пример #6
0
 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();
 }
Пример #7
0
 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>');
     }
 }
Пример #8
0
 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);
     }
 }
Пример #9
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
  */
 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');
     }
 }
Пример #10
0
 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;
     }
 }
Пример #11
0
 /**
  * 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);
 }
Пример #12
0
 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);
 }
Пример #13
0
 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;
 }
Пример #14
0
 public static function createWithTitle($title, $content = NULL)
 {
     return new static(HTML::esc($title), $content);
 }
Пример #15
0
 protected function doInit()
 {
     $this->html = HTML::tag('a', HTML::esc($this->label), array('href' => $this->uri));
 }
Пример #16
0
 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;
 }
Пример #17
0
 public function getInnerHTML()
 {
     return Group::create($this->getFormLabel() ?: 'Bild', HTML::tag('input', NULL, array('type' => 'hidden', 'name' => $this->getFormName(), 'value' => $this->getId())));
 }
Пример #18
0
 protected function doInit()
 {
     parent::doInit();
     $this->html->addClass(HTML::class2html($this->entity->getEntityName()) . '-form')->addClass('\\Psc\\entity-form');
 }
Пример #19
0
 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>');
 }
Пример #20
0
 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());
 }
Пример #21
0
 protected function doInit()
 {
     $this->html = HTML::tag('div', NULL, array('class' => 'pages-menu'));
     $this->autoLoadJoose($this->getJooseSnippet());
 }
Пример #22
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;
 }