Example #1
0
 /**
  * Rerender this form (form is rendered already) .
  *
  * @param boolean $redrawForm - whether render this form again or not, optional default true
  * @param boolean $hasRecordChange - if record change, need to render subforms, optional default true
  * @return string - HTML text of this form's read mode
  */
 public function rerender($redrawForm = true, $hasRecordChange = true)
 {
     if ($redrawForm) {
         BizSystem::clientProxy()->redrawForm($this->m_Name, FormRenderer::render($this));
     }
     if ($hasRecordChange) {
         $this->rerenderSubForms();
     }
 }
Example #2
0
 /**
  * Render html content of this form
  *
  * @return string - HTML text of this form's read mode
  */
 protected function renderHTML()
 {
     $formHTML = FormRenderer::render($this);
     $otherHTML = $this->rendercontextmenu();
     if (preg_match('/iPad/si', $_SERVER['HTTP_USER_AGENT']) || preg_match('/iPhone/si', $_SERVER['HTTP_USER_AGENT'])) {
         $otherHTML .= "\n        \t\t<script>\n\t\t\t\tvar a=document.getElementsByTagName('a');\n\t\t\t\tfor(var i=0;i<a.length;i++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i].getAttribute('href').indexOf('javascript:')==-1\n\t\t\t\t\t&& a[i].getAttribute('href').indexOf('#')==-1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t    a[i].onclick=function()\n\t\t\t\t\t\t    {\n\t\t\t\t\t\t\t    try{\n\t\t\t\t\t\t    \t\tshow_loader();\n\t\t\t\t\t\t    \t}catch(e){\n\t\t\t\t\t\t    \t\t\n\t\t\t\t\t\t    \t}\n\t\t\t\t\t\t        window.location=this.getAttribute('href');\n\t\t\t\t\t\t        return false\n\t\t\t\t\t\t    }\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t</script>       \t\t\n        \t\t";
     }
     if (!$this->m_ParentFormName) {
         if (($viewObj = $this->getViewObject()) != null) {
             $viewObj->m_LastRenderedForm = $this->m_Name;
         }
     }
     return $formHTML . "\n" . $otherHTML;
 }
Example #3
0
 /**
  * Render html content of this form
  *
  * @return string - HTML text of this form's read mode
  */
 protected function renderHTML()
 {
     include_once OPENBIZ_BIN . "/easy/FormRenderer.php";
     $formHTML = FormRenderer::render($this);
     $otherHTML = $this->rendercontextmenu();
     return $formHTML . "\n" . $otherHTML;
 }