diff -ruN ./a/openbiz/bin/easy/element/ListboxInputText.php ./b/openbiz/bin/easy/element/ListboxInputText.php --- ./a/openbiz/bin/easy/element/ListboxInputText.php 1970-01-01 01:00:00.000000000 +0100 +++ ./b/openbiz/bin/easy/element/ListboxInputText.php 2011-09-01 09:17:27.000000000 +0100 @@ -0,0 +1,53 @@ +m_cssErrorClass = isset($xmlArr["ATTRIBUTES"]["CSSERRORCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSERRORCLASS"] : $this->m_cssClass."_error"; + $this->m_cssFocusClass = isset($xmlArr["ATTRIBUTES"]["CSSFOCUSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSFOCUSCLASS"] : $this->m_cssClass."_focus"; + $this->m_cssClass = isset($xmlArr["ATTRIBUTES"]["CSSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CSSCLASS"] : "input_text"; + } + + public function render() + { + // Get Values for element + $name = $this->m_Name; + $style = $this->getStyle(); + $function = $this->getFunction(); + $value = $this->m_Value; + $valueArray = explode('=', $value); + + // Set class information for states + if($this->GetFormObj()->m_Errors[$this->m_Name]) + $function .= "onchange=\"this.className='$this->m_cssClass'\""; + else + $function .= "onfocus=\"this.className='$this->m_cssFocusClass'\" onblur=\"this.className='$this->m_cssClass'\""; + + // Set values for dropdown element + $this->m_cssClass = $this->m_cssErrorClass = $this->m_cssErrorClass = ''; + $this->m_Name .= '[]'; //for array (dropdown, textbox) + $this->m_Style = 'float:left; width:95px; margin-right:7px;'; + $this->m_Value = $valueArray[0]; //first element of array + + // Render dropdown element + $html = parent::render(); + + // Generate textbox + if(!$valueArray[1]) $valueArray[1] = $this->getDefaultValue(); + $html .= ' "; + + // Restore Values and Name for rendering total element + $this->m_Value = $value; + $this->m_Name = $name; + + return $html; + } +} + +?> \ No newline at end of file diff -ruN ./a/siremis/modules/ser/common/select/values.xml ./b/siremis/modules/ser/common/select/values.xml --- ./a/siremis/modules/ser/common/select/values.xml 2011-08-23 22:58:21.000000000 +0100 +++ ./b/siremis/modules/ser/common/select/values.xml 2011-08-26 16:20:43.000000000 +0100 @@ -22,4 +22,9 @@ + + + + + diff -ruN ./a/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.php ./b/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.php --- ./a/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.php 1970-01-01 01:00:00.000000000 +0100 +++ ./b/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.php 2011-08-26 15:55:53.000000000 +0100 @@ -0,0 +1,197 @@ +_run_search($this->m_limit); + if ($resultSet !== null) + { + $field = 'flags'; + while ($recArray = $this->_fetch_record($resultSet)) + { + if (isset($recArray[$field])) + { + $flags = decbin($recArray[$field]); + + // Make a mask for bitwise AND + $sflagsMask = ''; // Settable Flags + $oflagsMask = ''; // Other Flags + + for ($i = 0 ; $i < strlen($flags)-2 ; $i++) + { + $sflagsMask .= '0'; + $oflagsMask .= '1'; + } + + $sflagsMask .= '11'; + $oflagsMask .= '00'; + + $sflags = $sflagsMask & $flags; + $oflags = $oflagsMask & $flags; + + $recArray['flags_other'] = $oflags; + $recArray['flags'] = ""; + // Set flags + for ($i = 0 ; $i < strlen($sflags) ; $i++) + { + $rindex = strlen($sflags) - $i; + if ($rindex == 2 && $sflags[$i] === '1') + { + $this->addFlag($recArray,"Probing","2"); + } + + if ($rindex == 1 && $sflags[$i] === '1') + { + $this->addFlag($recArray,"Inactive","1"); + } + } + if (!isset($recArray['flags_text_label'])) + { + $recArray['flags_text_label'] .= '-'; + } + } + + if (isset($recArray['attrs'])) + { + $attrs = explode(';', $recArray['attrs']); + if(count($attrs) > 1){ + for ( $i = 0 ; $i < count($attrs) ; $i++){ + $recArray['attrs_other'] = ''; + $attr = explode('=',$attrs[$i]); + if ($attr[0] == "weight") + { + $recArray['attrs'] = $attrs[$i]; + } + else + { + $recArray['attrs_other'] .= $attrs[$i]; + } + } + }else{ + $attr = explode('=',$recArray['attrs']); + if($attr[0] != 'weight'){ + $recArray['attrs_other'] = $recArray['attrs']; + unset($recArray['attrs']); + } + } + } + $resultRecords[] = $recArray; + } + } + else + return null; + + return $resultRecords; + } + + public function updateRecord($recArr, $oldRecord=null) + { + $oflags = $recArr['flags_other']; + + if ($recArr['flags'][0] === ","){ + $recArr['flags'] = "00"; + } + + $inactive = "0"; + $probing = "0"; + if(strlen($recArr['flags'])>0){ + $sflagsArr = explode(",",$recArr['flags']); + $inactive = (array_search("1",$sflagsArr) !== FALSE) ? "1" : "0"; + $probing = (array_search("2",$sflagsArr) !== FALSE) ? "1" : "0"; + } + + $sflags = $probing . $inactive; + + $recArr['flags'] = (string)(bindec($oflags) | bindec($sflags)); + + $attributes = explode(',',$recArr['attrs']); + + if(strlen($attributes[0]) == 0){ + $recArr['attrs'] = ''; + }else{ + if(strlen($attributes[1]) > 0){ + $recArr['attrs'] = str_replace(',','=',$recArr['attrs']); + $recArr['attrs'].= ';'; + }else{ + $recArr['attrs'] = $attributes[0] . '=0;'; + } + } + $recArr['attrs'] .= $recArr['attrs_other']; + + if(substr($recArr['attrs'],-1) == ';'){ + $recArr['attrs'] = substr($recArr['attrs'],0,-1); + } + + return parent::updateRecord($recArr, $oldRecord); + } + + public function insertRecord($recArr) + { + $oflags = $recArr['flags_other']; + + if ($recArr['flags'][0] == ","){ + $recArr['flags'] = "00"; + } + + $inactive = "0"; + $probing = "0"; + if(strlen($recArr['flags'])>0){ + $sflagsArr = explode(",",$recArr['flags']); + $inactive = (array_search("1",$sflagsArr) !== FALSE) ? "1" : "0"; + $probing = (array_search("2",$sflagsArr) !== FALSE) ? "1" : "0"; + } + + $sflags = $probing . $inactive; + + $recArr['flags'] = (string)(bindec($oflags) | bindec($sflags)); + + $attributes = explode(',',$recArr['attrs']); + + if(strlen($attributes[0]) == 0){ + $recArr['attrs'] = ''; + }else{ + if(strlen($attributes[1]) > 0){ + $recArr['attrs'] = str_replace(',','=',$recArr['attrs']); + $recArr['attrs'].= ';'; + }else{ + $recArr['attrs'] = $attributes[0] . '=0;'; + } + } + $recArr['attrs'] .= $recArr['attrs_other']; + + if(substr($recArr['attrs'],-1) == ';'){ + $recArr['attrs'] = substr($recArr['attrs'],0,-1); + } + + return parent::insertRecord($recArr); + } +} + +?> diff -ruN ./a/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.xml ./b/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.xml --- ./a/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.xml 2011-08-23 22:58:21.000000000 +0100 +++ ./b/siremis/modules/ser/rtg/dispatcher/do/DispatcherDO.xml 2011-08-18 11:37:29.000000000 +0100 @@ -1,5 +1,5 @@ - + diff -ruN ./a/siremis/modules/ser/rtg/dispatcher/form/DispatcherCopyForm.xml ./b/siremis/modules/ser/rtg/dispatcher/form/DispatcherCopyForm.xml --- ./a/siremis/modules/ser/rtg/dispatcher/form/DispatcherCopyForm.xml 2011-08-23 22:58:21.000000000 +0100 +++ ./b/siremis/modules/ser/rtg/dispatcher/form/DispatcherCopyForm.xml 2011-06-03 12:22:47.000000000 +0100 @@ -4,9 +4,11 @@