Ejemplo n.º 1
0
 function render()
 {
     if (isset($GLOBALS['xoTheme'])) {
         $GLOBALS['xoTheme']->addScript('include/color-picker.js');
     } else {
         echo "<script type=\"text/javascript\" src=\"" . XOOPS_URL . "/include/color-picker.js\"></script>";
     }
     $this->setExtra(' style="background-color:' . $this->getValue() . ';"');
     return parent::render() . "\n<input type='reset' value=' ... ' onclick=\"return TCP.popup('" . XOOPS_URL . "/include/',document.getElementById('" . $this->getName() . "'));\">\n";
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  * @param	object    $object   reference to targetobject (@link IcmsPersistableObject)
  * @param	string    $key      the form name
  */
 function __construct($object, $key)
 {
     $var = $object->vars[$key];
     if (isset($object->controls[$key])) {
         $control = $object->controls[$key];
         $form_maxlength = isset($control['maxlength']) ? $control['maxlength'] : (isset($var['maxlength']) ? $var['maxlength'] : 255);
         $form_size = isset($control['size']) ? $control['size'] : 50;
     } else {
         $form_maxlength = 255;
         $form_size = 50;
     }
     parent::__construct($var['title'], $key, $form_size, $form_maxlength, $object->getVar($key, 'e'));
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  * @param	object    $object   reference to targetobject (@link IcmsPersistableObject)
  * @param	string    $key      the form name
  */
 function __construct($caption, $name, $include_file, $size, $maxlength, $value = "")
 {
     $this->_include_file = $include_file;
     parent::__construct($caption, $name, $size, $maxlength, $value);
 }
Ejemplo n.º 4
0
 function __construct($caption, $name, $size = 15, $value = 0)
 {
     $value = !is_numeric($value) ? time() : intval($value);
     parent::__construct($caption, $name, $size, 25, $value);
 }