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

Diff of /nfo/php/libs/org.netfrag.app/WebExplorer/utils.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by jonen, Wed Jul 2 12:32:27 2003 UTC revision 1.9 by jonen, Tue Aug 31 14:22:03 2004 UTC
# Line 4  Line 4 
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   *   *
# Line 54  Line 60 
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
# Line 106  Line 113 
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);
# Line 150  Line 159 
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(
# Line 167  Line 177 
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;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.9

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