/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/DefaultGUIDataList.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/DefaultGUIDataList.inc

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

revision 1.1 by jonen, Thu Jan 30 03:29:46 2003 UTC revision 1.2 by jonen, Mon Feb 3 16:34:27 2003 UTC
# Line 163  class DefaultGUIDatalist extends DataLis Line 163  class DefaultGUIDatalist extends DataLis
163          if ($obj == '') {          if ($obj == '') {
164              $obj = " ";              $obj = " ";
165          }          }
166            // if item is an Array we will replace it with an link or contained form object
167            elseif( is_array($obj) ) {
168              $cur_row_index = $this->_datasource->get_cur_data_index();
169              $parent_guid = $this->_datasource->_data[$cur_row_index]['guid'];
170              foreach($obj as $key => $value) {
171                if(is_numeric($key)) {
172                    $guid = $value['guid'];
173                    $list[$key] = $guid;
174                }
175                    }
176                    if(is_array($list) ) {
177                  $container = container(
178                      form_open($obj[guid], $_SERVER["PHP_SELF"] ),
179                      form_select("guid", $list),
180                      form_hidden("ap", "oview"),
181                      form_hidden("parent", $parent_guid),
182                      form_submit("submit","view" ),
183                      form_close()
184                      );
185                  $obj = $container;
186                } else {
187                      $obj = html_a($_SERVER["PHP_SELF"] . "?ap=oview&guid=" . $obj['guid'] . "&parent=" . $parent_guid, "view");
188                    }
189            }
190            
191    
192          //make sure we don't put a right border on the last          //make sure we don't put a right border on the last
193          //column we are working on.          //column we are working on.
# Line 282  class DefaultGUIDatalist extends DataLis Line 307  class DefaultGUIDatalist extends DataLis
307          if ($cnt == 1) {          if ($cnt == 1) {
308              $container->push(form_hidden($this->_search_fieldVar, $field));              $container->push(form_hidden($this->_search_fieldVar, $field));
309          }          }
310            
311            $hidden_fields = $this->get_hidden_fields();
312            if(is_array($hidden_fields)) {
313              foreach($hidden_fields as $key => $value) {
314                $container->push(form_hidden($key, $value));
315              }
316            }
317            
318            $container->push(form_close() );
319    
320          return $container;          return $container;
321      }      }
322    
323    
324        function get_hidden_fields() {
325            user_error("DefaulGUIDataList::get_hidden_fields() - ".
326                                       "child class must override this method ".
327                                       "this function should return a hash for hidden fields, if not needed just return" );
328        }
329    
330  }  }
331    
332  /**  /**

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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