本文整理汇总了PHP中TEntry::show方法的典型用法代码示例。如果您正苦于以下问题:PHP TEntry::show方法的具体用法?PHP TEntry::show怎么用?PHP TEntry::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEntry
的用法示例。
在下文中一共展示了TEntry::show方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Shows the widget
*/
public function show()
{
$tag = new TEntry($this->name);
$tag->setEditable(FALSE);
$tag->setProperty('id', $this->name);
$tag->setSize(40);
$tag->setProperty('onchange', "aux = document.getElementsByName('{$this->text_name}'); aux[0].value = this.value;");
$tag->show();
// define the tag properties
$this->tag->name = $this->text_name;
$this->tag->onchange = "entry = document.getElementById('{$this->name}'); entry.value = this.value;";
$this->tag->style = "width:{$this->size}px;";
// tamanho em pixels
// creates an empty <option> tag
$option = new TElement('option');
$option->add('');
$option->value = '0';
// valor da TAG
// add the option tag to the combo
$this->tag->add($option);
if ($this->items) {
// iterate the combobox items
foreach ($this->items as $chave => $item) {
// creates an <option> tag
$option = new TElement('option');
$option->value = $chave;
// define the index
$option->add($item);
// add the item label
// verify if this option is selected
if ($chave == $this->value) {
// mark as selected
$option->selected = 1;
}
// add the option to the combo
$this->tag->add($option);
}
}
// verify whether the widget is editable
if (!parent::getEditable()) {
// make the widget read-only
$this->tag->readonly = "1";
$this->tag->{'class'} = 'tfield_disabled';
// CSS
}
// shows the combobox
$this->tag->show();
}
示例2: 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();
}
示例3: show
/**
* Show the widget
*/
public function show()
{
// check if it's not editable
if (parent::getEditable()) {
$serialized_action = '';
if ($this->action) {
// get the action class name
if (is_array($callback = $this->action->getAction())) {
$classname = get_class($callback[0]);
$inst = new $classname();
$ajaxAction = new TAction(array($inst, 'onSelect'));
if ($classname == 'TStandardSeek') {
$ajaxAction->setParameter('parent', $this->action->getParameter('parent'));
$ajaxAction->setParameter('database', $this->action->getParameter('database'));
$ajaxAction->setParameter('model', $this->action->getParameter('model'));
$ajaxAction->setParameter('display_field', $this->action->getParameter('display_field'));
$ajaxAction->setParameter('receive_key', $this->action->getParameter('receive_key'));
$ajaxAction->setParameter('receive_field', $this->action->getParameter('receive_field'));
}
$string_action = $ajaxAction->serialize(FALSE);
if ($this->useOutEvent) {
$this->setProperty('onBlur', "serialform=(\$('#{$this->formName}').serialize());\n ajaxLookup('{$string_action}&'+serialform, this)");
}
}
$serialized_action = $this->action->serialize(FALSE);
}
parent::show();
$image = new TImage('lib/adianti/images/ico_find.png');
$link = new TElement('a');
$link->onmouseover = 'style.cursor = \'pointer\'';
$link->onmouseout = 'style.cursor = \'default\'';
$link->onclick = "javascript:serialform=(\$('#{$this->formName}').serialize());\n __adianti_append_page('engine.php?{$serialized_action}&'+serialform)";
$link->add($image);
$link->show();
if ($this->auxiliar) {
echo ' ';
$this->auxiliar->show();
}
} else {
parent::show();
}
}
示例4: show
/**
* Show the widget
*/
public function show()
{
// check if it's not editable
if (parent::getEditable()) {
if (!TForm::getFormByName($this->formName) instanceof TForm) {
throw new Exception(TAdiantiCoreTranslator::translate('You must pass the ^1 (^2) as a parameter to ^3', __CLASS__, $this->name, 'TForm::setFields()'));
}
$serialized_action = '';
if ($this->action) {
// get the action class name
if (is_array($callback = $this->action->getAction())) {
$classname = is_object($callback[0]) ? get_class($callback[0]) : $callback[0];
$inst = new $classname();
$ajaxAction = new TAction(array($inst, 'onSelect'));
if ($classname == 'TStandardSeek') {
$ajaxAction->setParameter('parent', $this->action->getParameter('parent'));
$ajaxAction->setParameter('database', $this->action->getParameter('database'));
$ajaxAction->setParameter('model', $this->action->getParameter('model'));
$ajaxAction->setParameter('display_field', $this->action->getParameter('display_field'));
$ajaxAction->setParameter('receive_key', $this->action->getParameter('receive_key'));
$ajaxAction->setParameter('receive_field', $this->action->getParameter('receive_field'));
}
$string_action = $ajaxAction->serialize(FALSE);
if ($this->useOutEvent) {
$this->setProperty('seekaction', "serialform=(\$('#{$this->formName}').serialize());\n ajaxLookup('{$string_action}&'+serialform, document.{$this->formName}.{$this->name})");
$this->setProperty('onBlur', $this->getProperty('seekaction'), FALSE);
}
}
$serialized_action = $this->action->serialize(FALSE);
}
parent::show();
$this->button->onclick = "javascript:serialform=(\$('#{$this->formName}').serialize());\n __adianti_append_page('engine.php?{$serialized_action}&'+serialform)";
$this->button->show();
if ($this->auxiliar) {
echo ' ';
$this->auxiliar->show();
}
} else {
parent::show();
}
}
示例5: show
/**
* Show the widget
*/
public function show()
{
$this->button->show();
parent::show();
}