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


PHP TEntry::getEditable方法代码示例

本文整理汇总了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();
 }
开发者ID:enieber,项目名称:adianti,代码行数:14,代码来源:TDate.class.php

示例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();
     }
 }
开发者ID:enieber,项目名称:adianti,代码行数:45,代码来源:TSeekButton.class.php

示例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();
     }
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:44,代码来源:TSeekButton.class.php


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