/[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.6 by jonen, Sun Feb 23 23:43:55 2003 UTC revision 1.8 by jonen, Thu Mar 20 04:25:43 2003 UTC
# Line 72  class DefaultGUIDatalist extends DataLis Line 72  class DefaultGUIDatalist extends DataLis
72       *       *
73       */       */
74      var $_default_checked_items = array();      var $_default_checked_items = array();
75        
76        
77        /**
78         * This array holds the list of
79         * hidden items.
80         *
81         */
82         var $_hidden_items = array();
83    
84    
85      /**      /**
# Line 83  class DefaultGUIDatalist extends DataLis Line 91  class DefaultGUIDatalist extends DataLis
91      * This variable tells us whether to display select all checkbox      * This variable tells us whether to display select all checkbox
92      */      */
93      var $_allow_select_all = TRUE;      var $_allow_select_all = TRUE;
94    
   
95      /**      /**
96       * This function sets a prefix for all       * This function sets a prefix for all
97       * variables that are used in the item list       * variables that are used in the item list
# Line 321  class DefaultGUIDatalist extends DataLis Line 328  class DefaultGUIDatalist extends DataLis
328          if ($obj == '') {          if ($obj == '') {
329              $obj = " ";              $obj = " ";
330          }          }
         // if item is match by expression we will replace it with an link object    
         elseif($this->_decode_column_item_expr($obj)) {    
           $obj = $this->_decode_column_item_expr($obj);    
         }    
         // if item is an Array we will replace it with an selection form object    
         elseif($this->_decode_column_item_array($obj)) {  
           $obj = $this->_decode_column_item_array($obj);    
         }    
331    
332          //make sure we don't put a right border on the last          //make sure we don't put a right border on the last
333          //column we are working on.          //column we are working on.
# Line 450  class DefaultGUIDatalist extends DataLis Line 449  class DefaultGUIDatalist extends DataLis
449              $container->push(form_hidden($this->_vars["search_fieldVar"], $field));              $container->push(form_hidden($this->_vars["search_fieldVar"], $field));
450          }          }
451    
452          $hidden_fields = $this->get_hidden_fields();          if(is_array($this->hidden_items)) {  
453          if(is_array($hidden_fields)) {              foreach($this->hidden_items as $key => $value) {  
           foreach($hidden_fields as $key => $value) {    
454              $container->push(form_hidden($key, $value));                $container->push(form_hidden($key, $value));  
455            }            }
456          }          }
# Line 780  class DefaultGUIDatalist extends DataLis Line 778  class DefaultGUIDatalist extends DataLis
778              $td->set_tag_attribute("align", "left");              $td->set_tag_attribute("align", "left");
779              if ($this->_has_action_column("FIRST") &&              if ($this->_has_action_column("FIRST") &&
780                  $this->_datasource->get_total_rows()) {                  $this->_datasource->get_total_rows()) {
781                  $td->push(html_img("/phphtmllib/images/widgets/arrow_right.gif"));                  $td->push(html_img("img/widgets/arrow_right.gif"));
782              }              }
783              else {              else {
784                  $td->push(" ");                  $td->push(" ");
# Line 790  class DefaultGUIDatalist extends DataLis Line 788  class DefaultGUIDatalist extends DataLis
788              $td->set_tag_attribute("align", "right");              $td->set_tag_attribute("align", "right");
789              if ($this->_has_action_column("LAST") &&              if ($this->_has_action_column("LAST") &&
790                  $this->_datasource->get_total_rows()) {                  $this->_datasource->get_total_rows()) {
791                  $td->push(html_img("/phphtmllib/images/widgets/arrow_left.gif"));                  $td->push(html_img("img/widgets/arrow_left.gif"));
792              }              }
793              else {              else {
794                  $td->push(" ");                  $td->push(" ");
# Line 916  class DefaultGUIDatalist extends DataLis Line 914  class DefaultGUIDatalist extends DataLis
914          return $script;          return $script;
915      }      }
916    
917      function get_hidden_fields() {      function add_hidden_item($label, $value) {
918           user_error("DefaulGUIDataList::get_hidden_fields() - ".        $this->_hidden_items[$label] = $value;
                            "child class must override this method ".  
                            "this function should return a hash for hidden fields, if not needed just return" );  
     }  
   
     function _decode_column_item_array($obj) {  
          user_error("DefaulGUIDataList::_decode_column_item_array() - ".  
                            "child class must override this method ".  
                            "this function should decode the column_item if it is a (sub-) array,".  
                            "array should e.g. replaced by a select form." );  
     }  
     
     function _decode_column_item_expr($obj) {  
          user_error("DefaulGUIDataList::_decode_column_item_expr() - ".  
                            "child class must override this method ".  
                            "this function should decode the column_item, if it is encoded for e.g. objects" );  
919      }      }
920    
921  }  }
922    
923  /**  /**

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

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