当前位置: 首页>>代码示例>>PHP>>正文


PHP TElement::show方法代码示例

本文整理汇总了PHP中TElement::show方法的典型用法代码示例。如果您正苦于以下问题:PHP TElement::show方法的具体用法?PHP TElement::show怎么用?PHP TElement::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TElement的用法示例。


在下文中一共展示了TElement::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Class Constructor
  * @param $type    Type of the message (info, error)
  * @param $message Message to be shown
  * @param $action  Action to process
  */
 public function __construct($type, $message, TAction $action = NULL)
 {
     $this->id = uniqid();
     if (!is_null($action)) {
         $this->action = '__adianti_load_page(\'' . $action->serialize() . '\');';
     }
     if (TPage::isMobile()) {
         $img = new TElement('img');
         $img->src = "lib/adianti/images/{$type}.png";
         $table = new TTable();
         $table->width = '250px';
         $table->bgcolor = '#E5E5E5';
         $table->style = "border-collapse:collapse";
         $row = $table->addRow();
         $row->addCell($img);
         $row->addCell($message);
         $table->show();
     } else {
         TPage::include_css('lib/adianti/include/tmessage/tmessage.css');
         // creates a pannel to show the dialog
         $painel = new TElement('div');
         $painel->{'class'} = 'tmessage';
         $painel->id = 'tmessage_' . $this->id;
         // creates a table for layout
         $table = new TTable();
         // creates a row for the icon and the message
         $row = $table->addRow();
         $row->addCell(new TImage("lib/adianti/images/{$type}.png"));
         $scroll = new TScroll();
         $scroll->setSize(350, 70);
         $scroll->add($message);
         $scroll->setTransparency(true);
         $cell = $row->addCell($scroll);
         // add the table to the pannel
         $painel->add($table);
         // show the pannel
         $painel->show();
         $script = new TElement('script');
         $script->{'type'} = 'text/javascript';
         $script->add(' $(function() {
             $( "#' . $painel->id . '" ).dialog({
                 height: 180,
                 width: 440,
                 stack: false,
                 zIndex: 3000,
                 modal: true,
                 buttons: {
                     OK: function() {
                         $( this ).dialog( "close" ); ' . $this->action . '
                     }
                 }
                 }).css("visibility", "visible");
                 
             	$( "#' . $painel->id . ' a" ).click(function () {
             	    window.open($(this).attr(\'href\'));
                 }); 
             });');
         $script->show();
     }
 }
开发者ID:enieber,项目名称:adianti,代码行数:66,代码来源:TMessage.class.php

示例2: show

 /**
  * Shows the widget at the screen
  */
 public function show()
 {
     if ($this->items) {
         // iterate the checkgroup options
         foreach ($this->items as $index => $label) {
             // instantiates a new CheckButton
             $button = new TCheckButton("{$this->name}[]");
             $button->setTip($this->tag->title);
             $button->setIndexValue($index);
             $button->setProperty('checkgroup', $this->name);
             // verify if the checkbutton is checked
             if (@in_array($index, $this->value)) {
                 //$button->setProperty('checked', '1');
                 $button->setValue($index);
                 // value=indexvalue (checked)
             }
             // check whether the widget is non-editable
             if (!parent::getEditable()) {
                 $button->setEditable(FALSE);
             }
             // create the label for the button
             $obj = new TLabel($label);
             $obj->add($button);
             $obj->show();
             if ($this->layout == 'vertical') {
                 // shows a line break
                 $br = new TElement('br');
                 $br->show();
                 echo "\n";
             }
         }
     }
 }
开发者ID:enieber,项目名称:adianti,代码行数:36,代码来源:TCheckGroup.class.php

示例3: show

 public function show()
 {
     foreach ($this->elements as $item => $value) {
         $li = new TElement('li');
         $a = new TElement('a');
         $a->href = "#{$item}";
         $a->add($item);
         $li->add($a);
         $this->ul->add($li);
     }
     parent::add($this->ul);
     foreach ($this->elements as $item => $value) {
         $conteudo = new TElement('div');
         $conteudo2 = new TElement('div');
         $conteudo->id = $item;
         $conteudo->add($value);
         parent::add($conteudo);
     }
     $script = new TElement('script');
     $script->type = 'text/javascript';
     $code = "  \$(function() {\n\$( '#{$this->id}' ).tabs();\n});";
     $script->add($code);
     parent::add($script);
     parent::show();
 }
开发者ID:cbsistem,项目名称:PWD-Lib,代码行数:25,代码来源:PNoteBook.class.php

示例4: show

 /**
  * Shows the widget at the screen
  */
 public function show()
 {
     $link = new TElement('a');
     if ($this->action) {
         //$url['class'] = $this->action;
         //$url_str = http_build_query($url);
         $action = str_replace('#', '&', $this->action);
         $link->href = "index.php?class={$action}";
         $link->generator = 'adianti';
     } else {
         $link->href = '#';
     }
     if (isset($this->image)) {
         $image = new TImage($this->image);
         $image->style = 'padding-right: 8px';
         $link->add($image);
     }
     $link->add($this->label);
     // converts into ISO
     $this->add($link);
     if ($this->menu instanceof TMenu) {
         $this->{'class'} = 'dropdown-submenu';
         parent::add($this->menu);
     }
     parent::show();
 }
开发者ID:enieber,项目名称:adianti,代码行数:29,代码来源:TMenuItem.class.php

示例5: show

 /**
  * Show the highlighted source code
  */
 public function show()
 {
     $span = new TElement('span');
     $span->style = 'font-size:10pt';
     $span->add(highlight_string($this->content, TRUE));
     $span->show();
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:10,代码来源:TSourceCode.class.php

示例6: TElement

 /**
  * método construtor
  * instancia objeto TQuestion
  * @param $message = pergunta ao usuário
  * @param $action_yes = ação para resposta positiva
  * @param $action_no = ação para resposta negativa
  */
 function __construct($message, $url_yes, $url_no)
 {
     // instancia o painel para exibir o diálogo
     $painel = new TElement('div');
     $painel->class = "tquestion";
     // cria um botão para a resposta positiva
     $button1 = new TElement('input');
     $button1->type = 'button';
     $button1->value = 'Sim';
     $button1->onclick = "javascript:location='{$url_yes}'";
     $button1->id = 'bt1';
     // cria um botão para a resposta negativa
     $button2 = new TElement('input');
     $button2->type = 'button';
     $button2->value = 'Não';
     $button2->onclick = "javascript:location='{$url_no}'";
     // cria uma tabela para organizar o layout
     $table = new TTable();
     $table->align = 'center';
     $table->cellspacing = 10;
     // cria uma linha para o ícone e a mensagem
     $row = $table->addRow();
     $row->addCell(new TImage('app.misc/images/question.png'));
     $row->addCell($message);
     // cria uma linha para os botões
     $row = $table->addRow();
     $row->addCell($button1);
     $row->align = 'left';
     $row->addCell($button2);
     // adiciona a tabela ao painél
     $painel->add($table);
     // exibe o painél
     $painel->show();
 }
开发者ID:laiello,项目名称:almoxarifadocedup,代码行数:41,代码来源:TQuestion.class.php

示例7: show

 public function show()
 {
     foreach ($this->sources as $s) {
         parent::add($s);
     }
     parent::show();
 }
开发者ID:cbsistem,项目名称:PWD-Lib,代码行数:7,代码来源:PAudio.class.php

示例8: show

 /**
  * Show the widget at the screen
  */
 public function show()
 {
     if ($this->items) {
         // iterate the RadioButton options
         foreach ($this->items as $index => $label) {
             $button = new TRadioButton($this->name);
             $button->setTip($this->tag->title);
             $button->setValue($index);
             // check if contains any value
             if ($this->value == $index) {
                 // mark as checked
                 $button->setProperty('checked', '1');
             }
             // check whether the widget is non-editable
             if (!parent::getEditable()) {
                 $button->setEditable(FALSE);
             }
             // create the label for the button
             $obj = new TLabel($label);
             $obj->add($button);
             $obj->show();
             if ($this->layout == 'vertical') {
                 // shows a line break
                 $br = new TElement('br');
                 $br->show();
             }
             echo "\n";
         }
     }
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:33,代码来源:TRadioGroup.class.php

示例9: show

 /**
  * Shows the tag
  */
 public function show()
 {
     $stylename = 'tscroll' . $this->id;
     $style = new TStyle($stylename);
     if (!$this->transparency) {
         $style->border = '1px solid #c2c2c2';
         $style->background = '#ffffff';
     }
     $style->padding_left = "{$this->margin}px";
     $style->padding_top = "{$this->margin}px";
     $style->padding_right = "{$this->margin}px";
     $style->padding_bottom = "{$this->margin}px";
     $style->width = $this->width . 'px';
     $style->height = $this->height . 'px';
     $style->overflow = 'auto';
     $style->scroll = 'none';
     // check if there's any TSourceCode inside
     if (is_array($this->children)) {
         foreach ($this->children as $child) {
             if ($child instanceof TSourceCode) {
                 $style->background_color = '#ffffff';
             }
         }
     }
     // show the style
     $style->show();
     $this->{'class'} = $stylename;
     parent::show();
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:32,代码来源:TScroll.class.php

示例10: show

 public function show()
 {
     $time = new TElement('div');
     $time->id = "ptimer_" . uniqid();
     $url = 'engine.php';
     $code = "\n\ntimer({$url},'{$this->page}',{$this->time},'{$time->id}');\n\n";
     TScript::create($code);
     $time->show();
 }
开发者ID:cbsistem,项目名称:adiantiframework,代码行数:9,代码来源:Timer.class.php

示例11: show

 /**
  * Shows the widget at the screen
  */
 public function show()
 {
     if ($this->items) {
         foreach ($this->items as $item) {
             parent::add($item);
         }
     }
     parent::show();
 }
开发者ID:enieber,项目名称:adianti,代码行数:12,代码来源:TMenu.class.php

示例12: show

 /**
  * Shows the widget at the screen
  */
 public function show()
 {
     $js_mask = str_replace('yyyy', 'yy', $this->mask);
     if (parent::getEditable()) {
         $script = new TElement('script');
         $script->type = 'text/javascript';
         $script->add("\n            \t\$(function() {\n                \$(\"#{$this->id}\").datepicker({\n                    showOn: 'button',\n                    buttonImage: 'lib/adianti/images/tdate.png',\n                    buttonImageOnly: true,    \n            \t\tchangeMonth: true,\n            \t\tchangeYear: true,\n            \t\tdateFormat: '{$js_mask}',\n            \t\tshowButtonPanel: true\n            \t});\n            });");
         $script->show();
     }
     parent::show();
 }
开发者ID:enieber,项目名称:adianti,代码行数:14,代码来源:TDate.class.php

示例13: show

 /**
  * Show
  */
 public function show()
 {
     $script = new TElement('script');
     $script->{'type'} = 'text/javascript';
     $code = '$(document).ready( function() {
                  $(\'.dropdown-toggle\').dropdown()
              });';
     $script->add($code);
     $script->show();
     parent::show();
 }
开发者ID:enieber,项目名称:adianti,代码行数:14,代码来源:TMenuBar.class.php

示例14: show

 public function show()
 {
     $btn = '  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>';
     $titulo = new TElement('h4');
     $titulo->add($this->titulo);
     $msg = new TElement('p');
     $msg->add($this->msg);
     $this->add($btn);
     $this->add($titulo);
     $this->add($msg);
     parent::show();
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:12,代码来源:PAlert.php

示例15: __construct

 public function __construct()
 {
     parent::__construct('ul');
     $this->class = 'dropdown-menu dropdown-messages';
     $messages = array();
     $messages[] = array(TSession::getValue('login'), 'Yesterday', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...');
     $messages[] = array(TSession::getValue('login'), 'Yesterday', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...');
     $messages[] = array(TSession::getValue('login'), 'Yesterday', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...');
     $a = new TElement('a');
     $a->{'class'} = "dropdown-toggle";
     $a->{'data-toggle'} = "dropdown";
     $a->{'href'} = "#";
     $a->add(TElement::tag('i', '', array('class' => "fa fa-envelope fa-fw")));
     $a->add(TElement::tag('span', count($messages), array('class' => "badge badge-notify")));
     $a->add(TElement::tag('i', '', array('class' => "fa fa-caret-down")));
     $a->show();
     foreach ($messages as $message) {
         $name = $message[0];
         $date = $message[1];
         $body = $message[2];
         $li = new TElement('li');
         $a = new TElement('a');
         $div = new TElement('div');
         $a->href = '#';
         $li->add($a);
         $a->add($div);
         $div->add(TElement::tag('strong', $name));
         $div->add(TElement::tag('span', TElement::tag('em', $date), array('class' => 'pull-right text-muted')));
         $div2 = new TElement('div');
         $div2->add($body);
         $a->add($div2);
         parent::add($li);
         parent::add(TElement::tag('li', '', array('class' => 'divider')));
     }
     $li = new TElement('li');
     $a = new TElement('a');
     $li->add($a);
     $a->class = 'text-center';
     $a->href = '#';
     $a->add(TElement::tag('strong', 'Read messages'));
     $a->add($i = TElement::tag('i', '', array('class' => 'fa fa-inbox')));
     parent::add($li);
     parent::add(TElement::tag('li', '', array('class' => 'divider')));
     $li = new TElement('li');
     $a = new TElement('a');
     $li->add($a);
     $a->class = 'text-center';
     $a->href = '#';
     $a->add(TElement::tag('strong', 'Send message'));
     $a->add($i = TElement::tag('i', '', array('class' => 'fa fa-envelope-o')));
     parent::add($li);
 }
开发者ID:edurbs,项目名称:sobcontrole,代码行数:52,代码来源:MessageList.class.php


注:本文中的TElement::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。