Dotclear

Changeset 276:2735b6d59082


Ignore:
Timestamp:
05/16/11 10:07:02 (14 years ago)
Author:
Tomtom33 <tbouron@…>
Branch:
formfilters
Message:

Clean code for custom columns

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/posts.php

    r242 r276  
    193193$starting_script = dcPage::jsLoad('js/_posts_list.js'); 
    194194 
    195 $starting_script = $filterSet->header(); 
     195$starting_script .= $filterSet->header(); 
    196196 
    197197dcPage::open(__('Entries'),$starting_script); 
  • inc/admin/lib.pager.php

    r246 r276  
    2020     protected $callback; 
    2121     protected $html; 
    22      protected $order; 
    2322     protected $visibility; 
    2423      
    25      public function __construct($id,$title,$callback,$html = null,$order = null) 
     24     public function __construct($id,$title,$callback,$html = null) 
    2625     { 
    2726          if (!is_string($id) || $id === '') { 
     
    3837          if (!empty($html)) { 
    3938               $html = ' '.$html; 
    40           } 
    41            
    42           if (!is_int($order)) { 
    43                $order = null; 
    4439          } 
    4540           
     
    6358          $this->callback = $callback; 
    6459          $this->html = $html; 
    65           $this->order = $order; 
    6660          $this->visibility = true; 
    6761     } 
     
    135129          $this->addColumn('adminUserList','entries',__('Entries'),array('adminUserList','getEntries')); 
    136130           
     131          $core->callBehavior('adminGenericListConstruct',$this); 
     132           
    137133          $this->setColumnsVisibility(); 
    138            
    139           $core->callBehavior('adminGenericListConstruct',$this); 
    140      } 
    141       
    142      public function addColumn($context,$id,$title,$callback,$html = null,$order = null) 
     134     } 
     135      
     136     public function addColumn($context,$id,$title,$callback,$html = null) 
    143137     { 
    144138          try { 
     
    147141               } 
    148142                
    149                $c = new adminGenericColumn($id,$title,$callback,$html,$order); 
     143               $c = new adminGenericColumn($id,$title,$callback,$html); 
    150144               $this->columns[$context][$c->getInfo('id')] = $c; 
    151145          } 
     
    210204               $pager->var_page = 'page'; 
    211205                
    212                $html_block = '<table class="clear"><tr>'; 
     206               $html_block = '<table class="maximal clear"><tr>'; 
    213207                
    214208               foreach ($this->columns[$this->context] as $k => $v) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map