/** * Read array meta data, and store to meta object * * @param array $xmlArr * @return void */ protected function readMetaData(&$xmlArr) { parent::readMetaData($xmlArr); $this->cssClass = isset($xmlArr["ATTRIBUTES"]["CSSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSCLASS"] : "input_text_s"; $this->cssErrorClass = isset($xmlArr["ATTRIBUTES"]["CSSERRORCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSERRORCLASS"] : $this->cssClass . "_error"; $this->cssFocusClass = isset($xmlArr["ATTRIBUTES"]["CSSFOCUSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSFOCUSCLASS"] : $this->cssClass . "_focus"; $this->mode = isset($xmlArr["ATTRIBUTES"]["MODE"]) ? $xmlArr["ATTRIBUTES"]["MODE"] : null; $this->config = isset($xmlArr["ATTRIBUTES"]["CONFIG"]) ? $xmlArr["ATTRIBUTES"]["CONFIG"] : null; }
/** * Render / draw the element according to the mode * * @return string HTML text */ public function render() { Openbizx::$app->getClientProxy()->includeCalendarScripts(); $format = $this->dateFormat ? $this->dateFormat : "%Y-%m-%d"; $sHTML = parent::render(); $showTime = 'false'; //$image = "<img src=\"".Openbizx::$app->getImageUrl()."/calendar.gif\" border=0 title=\"Select date...\" align='top' hspace='2'>"; $sHTML .= "<a class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('{$this->objectName}','{$format}',{$showTime},true);\"></a>"; return $sHTML; }
/** * Render / draw the element according to the mode * * @return string HTML text */ public function render() { Openbizx::$app->getClientProxy()->includeCalendarScripts(); $format = $this->dateFormat ? $this->dateFormat : "%Y-%m-%d %H:%M:%S"; $sHTML = parent::render(); $showTime = "'24'"; //$image = "<img src=\"".Openbizx::$app->getImageUrl()."/calendar.gif\" border=0 title=\"Select date...\" align='top' hspace='2'>"; $sHTML .= "<a title=\"Select date...\" class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('" . $this->objectName . "', '" . $format . "', " . $showTime . ", true); return false;\" onmousemove='window.status=\"Select a datetime\"' onmouseout='window.status=\"\"'></a>"; return $sHTML; }
public function getEvents() { $events = parent::getEvents(); $events['onclick'] .= "Openbizx.CallFunction('" . $this->formName . ".LoadPicker({$this->valuePicker},{$this->objectName})')"; return $events; }