• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List

E:/E/GEAMP/www/openbiz/openbiz/bin/easy/element/ColumnText.php

00001 <?PHP
00017 include_once("LabelText.php");
00018 
00028 class ColumnText extends LabelText
00029 {
00030     public $m_Sortable;
00031     public $m_ColumnStyle;    
00032 
00039     protected function readMetaData(&$xmlArr)
00040     {
00041         parent::readMetaData($xmlArr);
00042         $this->m_Sortable = isset($xmlArr["ATTRIBUTES"]["SORTABLE"]) ? $xmlArr["ATTRIBUTES"]["SORTABLE"] : null;        
00043         $this->m_ColumnStyle = $this->m_Style;
00044     }
00045 
00052     public function setSortFlag($flag=null)
00053     {
00054         $this->m_SortFlag = $flag;
00055     }
00056 
00063     public function renderLabel()
00064     {
00065         if ($this->m_Sortable == "Y")
00066         {
00067             $rule = $this->m_Name;
00068 
00069             $function = $this->m_FormName . ".SortRecord($rule,$this->m_SortFlag)";
00070             if($this->m_SortFlag == "ASC" || $this->m_SortFlag == "DESC"){
00071               $class=" class=\"current\" ";
00072             }else{
00073               $class=" class=\"normal\" ";
00074             }
00075             if ($this->m_SortFlag == "ASC")
00076               $span_class = " class=\"sort_up\" ";
00077             else if ($this->m_SortFlag == "DESC")
00078                 $span_class = " class=\"sort_down\" ";
00079             $sHTML = "<a href=javascript:Openbiz.CallFunction('" . $function . "') $class ><span $span_class >" . $this->m_Label ."</span>";            
00080             $sHTML .= "</a>";
00081         }
00082         else
00083         {
00084             $sHTML = $this->m_Label;
00085         }
00086         return $sHTML;
00087     }
00088     
00089     public function matchRemoteMethod($method)
00090     {
00091         return ($this->m_Sortable == "Y" && $method == "sortrecord");
00092     }
00093 }
00094 ?>

Generated on Thu Apr 19 2012 17:09:13 for openbiz by  doxygen 1.7.2