/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/Module/DataItem.php
ViewVC logotype

Annotation of /nfo/php/libs/org.netfrag.app/WebExplorer/Module/DataItem.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations)
Sat Nov 22 18:44:41 2003 UTC (20 years, 9 months ago) by udo
Branch: MAIN
Changes since 1.6: +15 -4 lines
update for expand data item

1 jonen 1.1 <?
2     /*
3     ## -----------------------------------------------------------------------------
4 udo 1.7 ## $Id: DataItem.php,v 1.6 2003/05/13 14:55:52 joko Exp $
5 jonen 1.1 ## -----------------------------------------------------------------------------
6 jonen 1.2 ## $Log: DataItem.php,v $
7 udo 1.7 ## Revision 1.6 2003/05/13 14:55:52 joko
8     ## parameters for MetaBox
9     ##
10 joko 1.6 ## Revision 1.5 2003/05/10 18:27:17 jonen
11     ## + supports now mode 'create' via widget 'CreateDataItem'
12     ##
13 jonen 1.5 ## Revision 1.4 2003/04/11 00:52:19 joko
14     ## minor update: prepared for being one level more abstract by using $negotiation_options
15     ##
16 joko 1.4 ## Revision 1.3 2003/04/10 06:27:36 joko
17     ## ++ _args[mode] == 'delete' => new FlexibleDataItem
18     ##
19 joko 1.3 ## Revision 1.2 2003/04/06 01:33:45 jonen
20     ## + purged code
21     ##
22 jonen 1.2 ## Revision 1.1 2003/04/04 00:50:44 jonen
23     ## + initial commit
24     ##
25 jonen 1.1 ## Revision 1.1 2003/03/01 22:57:23 cvsmax
26     ## + inital commit
27     ##
28     ##
29     ## -----------------------------------------------------------------------------
30     */
31    
32 joko 1.3
33     loadModule('WebExplorer::Module::AbstractGUIModule');
34    
35 jonen 1.1 class WebExplorer_Module_DataItem extends WebExplorer_Module_AbstractGUIModule {
36    
37    
38     function set_gui_object() {
39 udo 1.7
40 joko 1.6 // NEW [2003-04-22]: inject metadata about chooser (item|list|tree) into _args[options]
41     // Please visit WebExplorer::Module::DataTree - there is a similar chooser at the top!!!
42     // TODO: abstract this out into some reusable, generic component sometimes (SimpleChooser?)
43     $this->_args[options][links] = array(
44     'list' => array(
45     array( name => 'item', url => url::view_as('item') ),
46     array( name => 'tree', url => url::view_as('tree', array( ecdid => $_GET[ecdm] )) ),
47     //array( name => 'reset filter', url => url::filter('tree') ),
48     ),
49     'meta' => array(
50     'selected' => $this->_args[options][data_locator_meta][abstract_type]
51     )
52     );
53    
54     // debug
55 udo 1.7 //print Dumper($this->_args) . "<br>";
56    
57 joko 1.6
58 udo 1.7 if($this->_args['mode'] == 'view') {
59 jonen 1.1 $this->_gui_object = new DataItem($this->_args['caption'], $this->_args['options']);
60     }
61     elseif($this->_args['mode'] == 'edit') {
62     $this->_gui_object = new EditDataItem($this->_args['caption'], $this->_args['options'] );
63 joko 1.3 }
64     elseif($this->_args['mode'] == 'delete') {
65     // 'EditDataItem' already has an infrastructure to do "Confirm"ations,
66     // so we just try to use it here to let the user confirm the new "delete"-action.
67    
68     // TODO:
69     // Try to implement this aspect of the required infrastructure independent of
70     // an 'EditDataItem'. Maybe it should become a 'GenericNegotiation'-ecom-component?!
71     // Aim: Abstract way of handling 'Confirm', 'Cancel' actions on arbitrary "question"???
72 joko 1.4 $negotiation_options = array(
73     );
74    
75     $this->_gui_object = new FlexibleNegotiation($this->_args['caption'], $this->_args['options'], $negotiation_options );
76 jonen 1.5 }
77    
78     elseif($this->_args['mode'] == 'create') {
79     $this->_gui_object = new CreateDataItem($this->_args['caption'], $this->_args['options'] );
80 udo 1.7 }
81     // added this for full expanded objects
82     elseif($this->_args['mode'] == 'expand') {
83     $this->_gui_object = new ExpandDataItem($this->_args['caption'], $this->_args['options'] );
84     }
85     elseif($this->_args['mode'] == 'expandedit') {
86     $this->_gui_object = new ExpandEditDataItem($this->_args['caption'], $this->_args['options'] );
87 jonen 1.1 }
88     }
89    
90    
91     }
92    
93     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed