| 4 |
* $Id$ |
* $Id$ |
| 5 |
* |
* |
| 6 |
* $Log$ |
* $Log$ |
| 7 |
|
* Revision 1.9 2004/08/31 14:22:03 jonen |
| 8 |
|
* added removing of 'template' hash-value, needed to recognize empty hash-refs |
| 9 |
|
* |
| 10 |
|
* Revision 1.8 2003/12/14 01:52:26 jonen |
| 11 |
|
* implemented 'SELECT' mode for selecting existing object-refereneces as child-nodes |
| 12 |
|
* |
| 13 |
* Revision 1.7 2003/07/02 12:32:27 jonen |
* Revision 1.7 2003/07/02 12:32:27 jonen |
| 14 |
* fixed bugs |
* fixed bugs |
| 15 |
* |
* |
| 60 |
//print "item: " . Dumper($item); |
//print "item: " . Dumper($item); |
| 61 |
//print "options: " . Dumper($options); |
//print "options: " . Dumper($options); |
| 62 |
if( is_array($item) ) { |
if( is_array($item) ) { |
| 63 |
|
//print "is_array($item)<br>"; |
| 64 |
//$cur_row_index = $this->_datasource->get_cur_data_index(); |
//$cur_row_index = $this->_datasource->get_cur_data_index(); |
| 65 |
//$parent_guid = $this->_datasource->_data[$cur_row_index]['guid']; |
//$parent_guid = $this->_datasource->_data[$cur_row_index]['guid']; |
| 66 |
// build list for selection form |
// build list for selection form |
| 113 |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
| 114 |
$container->add(_HTML_SPACE, html_a( $url_short, $key . " add new"), html_br()); |
$container->add(_HTML_SPACE, html_a( $url_short, $key . " add new"), html_br()); |
| 115 |
|
|
| 116 |
|
if($item[tmp]) { unset($item[tmp]); } |
| 117 |
|
|
| 118 |
if(count($item) != 0) { |
if(count($item) != 0) { |
| 119 |
foreach($item as $key => $value) { |
foreach($item as $key => $value) { |
| 120 |
$link_meta = php::untwingle_reference($value, $options); |
$link_meta = php::untwingle_reference($value, $options); |
| 159 |
|
|
| 160 |
// debug |
// debug |
| 161 |
//$options = $this->_options['decode_args']; |
//$options = $this->_options['decode_args']; |
| 162 |
//print "item: $item<br/>"; |
//print "item(expr): " . Dumper($item); |
| 163 |
|
//print "options(expr): " . Dumper($options); |
| 164 |
|
|
| 165 |
if($item == "_REF") { |
if($item == "_REF") { |
| 166 |
$link_vars_create = array( |
$link_vars_create = array( |
| 177 |
} |
} |
| 178 |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
| 179 |
$item = html_a( $url_short, " create"); |
$item = html_a( $url_short, " create"); |
| 180 |
|
} elseif($item == "_REF_SELECT") { |
| 181 |
|
$link_vars_create = array( |
| 182 |
|
'ecdid' => $options[label], |
| 183 |
|
'ecdm' => $options[parent_guid], |
| 184 |
|
'ecdmx' => $options[parent_class], |
| 185 |
|
'ecmod' => "select", |
| 186 |
|
'ecat' => 'list' |
| 187 |
|
); |
| 188 |
|
foreach($hidden_elements as $label => $value) { |
| 189 |
|
if(!$link_vars_create[$label]) { |
| 190 |
|
$link_vars_create[$label] = $value; |
| 191 |
|
} |
| 192 |
|
} |
| 193 |
|
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
| 194 |
|
$item = html_a( $url_short, " select"); |
| 195 |
} else { |
} else { |
| 196 |
// resolve 'o_{guid}_{classname}' - encoded string |
// resolve 'o_{guid}_{classname}' - encoded string |
| 197 |
$link_meta = php::untwingle_reference($item); |
$link_meta = php::untwingle_reference($item); |
|
//print Dumper($link_meta); |
|
| 198 |
|
|
| 199 |
if (!is_array($link_meta)) { |
if (!is_array($link_meta)) { |
| 200 |
//return $item; |
//return $item; |