Legend:
- Unmodified
- Added
- Removed
-
base.php
r22 r23 166 166 { 167 167 $DefinitionItems[] = array('Name' => $Index, 'Caption' => $Item['TextBefore'].$Required, 'Value' => $DbRow[$Index], 'SourceTable' => $List['TableName'], 'SourceItemId' => $DbRow['Id'], 'Type' => $Item['Type']); 168 } else $DefinitionItems[] = array('Name' => $Index, 'Type' => 'Hidden', 'Caption' => '', 'Value' => $DbRow[$Index]);168 } else $DefinitionItems[] = array('Name' => $Index, 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $DbRow[$Index]); 169 169 } 170 170 } … … 246 246 if($Item['Name'] == $Column) 247 247 { 248 $DefinitionItems[] = array('Name' => $Column, 'Type' => 'Hidden', 'Caption' => '', 'Value' => $ColumnValue);249 } 250 } 251 $DefinitionItems[] = array('Name' => 'Column', 'Type' => 'Hidden', 'Caption' => '', 'Value' => $Column);248 $DefinitionItems[] = array('Name' => $Column, 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $ColumnValue); 249 } 250 } 251 $DefinitionItems[] = array('Name' => 'Column', 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $Column); 252 252 253 253 $Form = new Form(); … … 288 288 if($Item['Name'] == $Column) 289 289 { 290 $DefinitionItems[] = array('Name' => $Column, 'Type' => 'Hidden', 'Caption' => '', 'Value' => $ColumnValue);290 $DefinitionItems[] = array('Name' => $Column, 'Type' => TypeHiddenId, 'Caption' => '', 'Value' => $ColumnValue); 291 291 } 292 292 } … … 468 468 'Items' => $Items, 469 469 ); 470 if(!array_key_exists($List['TableName'], $TypeDefinitionList)) 471 { 472 $ClassName = 'List'.$DbRow['TableName']; 473 if(class_exists($ClassName)) $List['Class'] = new $ClassName; 474 } 470 475 $Lists[$List['TableName']] = $List; 471 476 } else $Lists[$List['TableName']] = NULL; … … 514 519 function ExecuteListEvent($Table, $Event, $Parameters) 515 520 { 516 $Callback = 'List'.$Table.$Event; 517 if(is_callable($Callback)) $Callback($Parameters); 521 $ListDefinition = GetListDefinition($Table); 522 if(array_key_exists('Class', $ListDefinition)) 523 { 524 $ListObject = $ListDefinition['Class']; 525 if(is_callable(array($ListObject, $Event))) return($ListObject->$Event($Parameters)); 526 else return($ListDefinition['TableName'].'->'.$Event.'('.$List.')'); 527 } else return($ListDefinition['TableName'].'->'.$Event.'('.$List.')'); 518 528 } 519 529
Note:
See TracChangeset
for help on using the changeset viewer.