4 |
* $Id$ |
* $Id$ |
5 |
* |
* |
6 |
* $Log$ |
* $Log$ |
7 |
|
* Revision 1.19 2003/07/14 09:54:58 jonen |
8 |
|
* fixed bug related to 'item delete' |
9 |
|
* |
10 |
|
* Revision 1.18 2003/07/02 12:18:00 jonen |
11 |
|
* fixed bugs |
12 |
|
* |
13 |
* Revision 1.17 2003/06/25 23:45:05 joko |
* Revision 1.17 2003/06/25 23:45:05 joko |
14 |
* trying to switch from "ap" completely to "t" |
* trying to switch from "ap" completely to "t" |
15 |
* |
* |
311 |
|
|
312 |
'), |
'), |
313 |
|
|
314 |
// check right $_GET[ap] |
// check right $_GET[ap] - depreciated |
315 |
create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value [ap]: $_in[ap], sure this is right here?<br>" : null;'), |
//create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value [ap]: $_in[ap], sure this is right here?<br>" : null;'), |
316 |
|
|
317 |
// write components variables to out |
// write components variables to out |
318 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
324 |
if($_in[ecom_label]) { |
if($_in[ecom_label]) { |
325 |
foreach($vars as $key) { |
foreach($vars as $key) { |
326 |
if($_in[$key]) { |
if($_in[$key]) { |
327 |
|
//print "var: " . $key . " value: " . $_in[$key] . "<br>"; |
328 |
$label = $_in[ecom_label]; |
$label = $_in[ecom_label]; |
329 |
$_out[options][ecoms][$label][$key] = $_in[$key]; |
$_out[options][ecoms][$label][$key] = $_in[$key]; |
330 |
} |
} |
382 |
if($ident) { array_push($tmp, $ident); } |
if($ident) { array_push($tmp, $ident); } |
383 |
} |
} |
384 |
if($cnt == 1) { |
if($cnt == 1) { |
385 |
//print "Single selection, ident : " . $tmp[0] . "<br>"; |
print "Single selection, ident : " . $tmp[0] . "<br>"; |
386 |
$_out[options][ecoms][$label][ecom_data_ident] = $tmp[0]; |
$_out[options][ecoms][$label][ecom_data_ident] = $tmp[0]; |
387 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
388 |
} elseif($cnt > 1) { |
} elseif($cnt > 1) { |
389 |
// TODO: implement multi-selection actions on rows(items) here!! |
// TODO: implement multi-selection actions on rows(items) here!! |
390 |
print "Multi-Selection!! Current Ident(s) $tmp" . "<br>"; |
print "Multi-Selection!! Current Ident(s) $tmp" . "<br>"; |
391 |
$_out[options][ecoms][$label][ecom_data_ident] = $tmp; |
$_out[options][ecoms][$label][ecom_data_ident] = $tmp; |
392 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
393 |
} |
} |
394 |
} else { |
} else { |
395 |
print "ident: " . Dumper($_out[options][ecoms][$label][ecom_data_ident]) . "<br>"; |
print "ident: " . Dumper($_out[options][ecoms][$label][ecom_data_ident]) . "<br>"; |
396 |
} |
} |
397 |
//$_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident]; |
$_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident]; |
398 |
$_out[options][ecoms][$label][ecom_mode] = $_in[ecom_data_form_action]; |
$_out[options][ecoms][$label][ecom_mode] = $_in[ecom_data_form_action]; |
399 |
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
//print "in: " . Dumper($_in) . "<br>"; |
400 |
|
//print "out: " . Dumper($_out) . "<br>"; |
401 |
} |
} |
402 |
'), |
'), |
403 |
|
|
405 |
// handle data form buttons |
// handle data form buttons |
406 |
create_function('&$_in, &$_out', ' |
create_function('&$_in, &$_out', ' |
407 |
$label = $_in[ecom_label]; |
$label = $_in[ecom_label]; |
408 |
if($_in[ecom_data_action_edit]) { $_out[options][ecoms][$label][ecom_mode] = "edit"; } |
if($_in[ecom_data_action_edit]) { |
409 |
if($_in[ecom_data_action_cancel]) { $_out[options][ecoms][$label][ecom_mode] = "view"; } |
$_out[options][ecoms][$label][ecom_mode] = "edit"; |
410 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
411 |
|
} |
412 |
|
if($_in[ecom_data_action_cancel]) { |
413 |
|
$_out[options][ecoms][$label][ecom_mode] = "view"; |
414 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
415 |
|
} |
416 |
|
|
417 |
// Action.Create |
// Action.Create |
418 |
if($_in[ecom_data_action_create]) { |
if($_in[ecom_data_action_create]) { |
419 |
print Dumper($_out[options][ecoms][$label]); |
//print Dumper($_out[options][ecoms][$label]); |
420 |
$_out[options][ecoms][$label][ecom_mode] = "create"; |
$_out[options][ecoms][$label][ecom_mode] = "create"; |
421 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
422 |
} |
} |
423 |
|
|
424 |
// Action.Delete [new of 2003-04-09] |
// Action.Delete [new of 2003-04-09] |
430 |
// could/should we do this for "edit" and/or "view" actions as well? |
// could/should we do this for "edit" and/or "view" actions as well? |
431 |
// look at ecom/FlexibleDataItem! |
// look at ecom/FlexibleDataItem! |
432 |
|
|
433 |
|
$_out[options][ecoms][$label][ecom_abstract_type] = "item"; |
434 |
} |
} |
|
|
|
435 |
'), |
'), |
436 |
|
|
437 |
// propagate datasources to ecoms |
// propagate datasources to ecoms |