Beispiel #1
0
 protected function createElement()
 {
     $element = new \Kendo\Html\Element('div');
     $tabs = new \Kendo\Html\Element('ul');
     $element->append($tabs);
     $items = $this->getProperty('items');
     $hasContentUrls = false;
     $contentUrls = array();
     if ($items) {
         foreach ($items as $item) {
             $tabs->append($item->createElement());
             if ($hasContentUrls == false) {
                 $hasContentUrls = strlen($item->getProperty("contentUrl"));
             }
             $contentUrls[] = $item->getProperty("contentUrl");
             $contentElement = $item->createContentElement();
             if ($contentElement) {
                 $element->append($contentElement);
             }
         }
     }
     if ($hasContentUrls) {
         $this->setProperty('contentUrls', $contentUrls);
     }
     return $element;
 }
Beispiel #2
0
 public function html()
 {
     $element = $this->createElement();
     $wrapper = new \Kendo\Html\Element('div');
     $wrapper->attr('class', 'k-tabstrip-wrapper');
     $wrapper->append($element);
     $this->addAttributes($element);
     return $wrapper->outerHtml();
 }
 protected function createElement()
 {
     $element = new \Kendo\Html\Element('textarea');
     $content = $this->getProperty('content');
     if (gettype($content) == "string") {
         $element->html($content);
     }
     return $element;
 }
Beispiel #4
0
 protected function createElement()
 {
     $input = new \Kendo\Html\Element('input', true);
     $value = $this->getProperty('value');
     $input->attr('type', 'color');
     if (isset($value)) {
         $input->attr('value', $value);
     }
     return $input;
 }
Beispiel #5
0
 public function html()
 {
     $html = parent::html();
     if ($this->getProperty('pageable')) {
         $pager = new \Kendo\Html\Element('div');
         $pager->attr('id', "{$this->id}_pager");
         $html = "{$html} {$pager->outerHtml()}";
     }
     return $html;
 }
Beispiel #6
0
 public function createContentElement()
 {
     $content = $this->getProperty('content');
     $contentUrl = $this->getProperty('contentUrl');
     if ($content || $contentUrl) {
         $contentElement = new \Kendo\Html\Element('div');
         $contentElement->html($content);
         return $contentElement;
     }
 }
 protected function renderContent($element)
 {
     $content = $this->getProperty('content');
     if ($content) {
         $subgroup = new \Kendo\Html\Element('ul');
         $subitem = new \Kendo\Html\Element('li');
         $subitem->html($content);
         $subgroup->append($subitem);
         $element->append($subgroup);
     }
 }
 public function createElement()
 {
     $element = new \Kendo\Html\Element('li');
     if ($this->getProperty('expanded')) {
         $element->attr('data-expanded', 'true');
     }
     $this->renderSprite($element);
     $this->renderText($element);
     $this->renderItems($element);
     return $element;
 }
Beispiel #9
0
 protected function createElement()
 {
     $items = $this->getProperty('items');
     $element = new \Kendo\Html\Element('ul');
     if ($items) {
         foreach ($items as $item) {
             $element->append($item->createElement());
         }
     }
     return $element;
 }
Beispiel #10
0
 protected function createElement()
 {
     $element = new \Kendo\Html\Element('div');
     $content = $this->getProperty('content');
     if (gettype($content) == "string") {
         $element->html($content);
     } else {
         // serialize content by removing it from the ignore list
         $this->ignore = array_diff(array('content'), $this->ignore);
     }
     return $element;
 }
Beispiel #11
0
 protected function createElement()
 {
     $element = new \Kendo\Html\Element('div');
     $element->attr('class', 'k-splitter');
     $panes = $this->getProperty('panes');
     if (isset($panes)) {
         foreach ($panes as $pane) {
             $element->append($pane->createElement());
         }
     }
     return $element;
 }
 protected function createItem()
 {
     $element = new \Kendo\Html\Element('li');
     if ($this->getProperty('expanded')) {
         $element->attr('class', 'k-state-active');
     }
     if ($this->getProperty('enabled') === false) {
         $element->attr('disabled', 'disabled');
     }
     $text = $this->getProperty('text');
     if ($text) {
         $element->append(new \Kendo\Html\Text($text));
     }
     return $element;
 }
Beispiel #13
0
 protected function createElement()
 {
     $tag = $this->getProperty('tag');
     if (gettype($tag) != 'string') {
         $tag = 'textarea';
     }
     $element = new \Kendo\Html\Element($tag);
     if ($tag != 'textarea') {
         $element->attr('contentEditable', 'true');
     }
     $content = $this->getProperty('content');
     if (gettype($content) == "string") {
         $element->html($content);
     }
     return $element;
 }
Beispiel #14
0
 private function createInput($name, $propertyName)
 {
     $element = new \Kendo\Html\Element('input', true);
     $element->attr('name', $name);
     $element->attr('type', 'range');
     if ($this->getProperty('min') !== null) {
         $element->attr('min', $this->getProperty('min'));
     }
     if ($this->getProperty('max') !== null) {
         $element->attr('max', $this->getProperty('max'));
     }
     if ($this->getProperty('step') !== null) {
         $element->attr('step', $this->getProperty('step'));
     }
     if ($this->getProperty($propertyName) !== null) {
         $element->attr('value', $this->getProperty($propertyName));
     }
     return $element;
 }
Beispiel #15
0
 protected function createElement()
 {
     $element = new \Kendo\Html\Element('input', true);
     $element->attr('type', 'file');
     return $element;
 }