本文整理汇总了PHP中TEntry::getEditable方法的典型用法代码示例。如果您正苦于以下问题:PHP TEntry::getEditable方法的具体用法?PHP TEntry::getEditable怎么用?PHP TEntry::getEditable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEntry
的用法示例。
在下文中一共展示了TEntry::getEditable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: 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();
}
}
示例3: 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();
}
}