| | |
| | | } |
| | | else if ($attrib['type'] == 'link') { |
| | | $btn_content = isset($attrib['content']) ? $attrib['content'] : ($attrib['label'] ? $attrib['label'] : $attrib['command']); |
| | | $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex', 'target'); |
| | | $link_attrib = array_merge(html::$common_attrib, array('href', 'onclick', 'tabindex', 'target')); |
| | | if ($attrib['innerclass']) |
| | | $btn_content = html::span($attrib['innerclass'], $btn_content); |
| | | } |
| | |
| | | */ |
| | | public function _write($templ = '', $base_path = '') |
| | | { |
| | | $output = empty($templ) ? $this->default_template : trim($templ); |
| | | $output = trim($templ); |
| | | |
| | | if (empty($output)) { |
| | | $output = $this->default_template; |
| | | $is_empty = true; |
| | | } |
| | | |
| | | // set default page title |
| | | if (empty($this->pagetitle)) { |
| | |
| | | } |
| | | |
| | | // add css files in head, before scripts, for speed up with parallel downloads |
| | | if (!empty($this->css_files) && |
| | | (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>'))) |
| | | if (!empty($this->css_files) && !$is_empty |
| | | && (($pos = stripos($output, '<script ')) || ($pos = stripos($output, '</head>'))) |
| | | ) { |
| | | $css = ''; |
| | | foreach ($this->css_files as $file) { |