Changeset 13622

Show
Ignore:
Timestamp:
11/23/07 18:05:43 (1 year ago)
Author:
adrenalin
Message:

Corrected mispelled 'childs' to 'children', which might force someone to change the CSS class names


Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/fi.protie.navigation/documentation/CHANGES

    r10955 r13622  
    66  which might even break existing functionality. 
    77- All items marked with "+" represent completly new features. 
     8 
     92007-11-23 adrenalin 
     10  ! Corrected mispelled 'childs' to 'children', which might force someone to change the 
     11    CSS class names 
    812 
    9132007-06-12 adrenalin 
  • trunk/midcom/fi.protie.navigation/main.php

    r12996 r13622  
    200200     
    201201    /** 
    202      * Check if item has childs and if so, add childs-class to list item ul class name 
    203      *  
    204      * @access public 
    205      * @var boolean 
    206      */ 
    207     var $has_childs_to_class = false; 
    208      
    209     /** 
    210      * CSS class for has childs 
    211      *  
    212      * @access public 
    213      * @var string 
    214      */ 
    215     var $css_has_childs = 'childs'; 
     202     * Check if item has children and if so, add children-class to list item ul class name 
     203     *  
     204     * @access public 
     205     * @var boolean 
     206     */ 
     207    var $has_children_to_class = false; 
     208     
     209    /** 
     210     * CSS class for has children 
     211     *  
     212     * @access public 
     213     * @var string 
     214     */ 
     215    var $css_has_children = 'children'; 
    216216     
    217217    /** 
     
    478478            $url_name_to_class = ''; 
    479479            $first_last = ''; 
    480             $has_childs = ''; 
     480            $has_children = ''; 
    481481             
    482482            if($item_counter == 1 && $item_counter == $item_count) 
     
    501501            } 
    502502             
    503             if($this->has_childs_to_class) 
    504             { 
    505                 $childs = $this->_nap->list_nodes($child[MIDCOM_NAV_ID]); 
    506                 if(count($childs)>0) 
    507                 { 
    508                     $has_childs = $this->css_has_childs
     503            if($this->has_children_to_class) 
     504            { 
     505                $children = $this->_nap->list_nodes($child[MIDCOM_NAV_ID]); 
     506                if(count($children)>0) 
     507                { 
     508                    $has_children = $this->css_has_children
    509509                } 
    510510            } 
     
    520520            } 
    521521             
    522             $this->_display_element($item, $indent, $active, $selected, $component, $url_name_to_class, $first_last, $has_childs); 
     522            $this->_display_element($item, $indent, $active, $selected, $component, $url_name_to_class, $first_last, $has_children); 
    523523        } 
    524524        echo "{$indent}</ul>\n"; 
     
    571571            $url_name_to_class = ''; 
    572572            $first_last = ''; 
    573             $has_childs = ''; 
     573            $has_children = ''; 
    574574             
    575575            if($item_counter == 1 && $item_counter == $item_count) 
     
    586586            } 
    587587             
    588             if($this->has_childs_to_class) 
    589             { 
    590                 $childs = $this->_nap->list_child_elements($child[MIDCOM_NAV_ID]); 
    591                 if(is_array($childs) && count($childs)>0) 
    592                 { 
    593                     $has_childs = $this->css_has_childs
     588            if($this->has_children_to_class) 
     589            { 
     590                $children = $this->_nap->list_child_elements($child[MIDCOM_NAV_ID]); 
     591                if(is_array($children) && count($children)>0) 
     592                { 
     593                    $has_children = $this->css_has_children
    594594                } 
    595595            } 
     
    633633            } 
    634634             
    635             $this->_display_element($item, $indent, $active, $selected, $component, $url_name_to_class, $first_last, $has_childs); 
     635            $this->_display_element($item, $indent, $active, $selected, $component, $url_name_to_class, $first_last, $has_children); 
    636636        } 
    637637         
     
    639639    } 
    640640     
    641     function _display_element($item, $indent, $active, $selected, $component, $url_name_to_class, $first_last, $has_childs
     641    function _display_element($item, $indent, $active, $selected, $component, $url_name_to_class, $first_last, $has_children
    642642    { 
    643643        // Check if user has requested URL name to be included in class 
     
    673673        } 
    674674         
    675          // Check if the has childs is supposed to be drawn 
    676         if ($this->has_childs_to_class && $has_childs !== '') 
    677         { 
    678             $css_class .= ' '.$has_childs
     675         // Check if the has children is supposed to be drawn 
     676        if ($this->has_children_to_class && $has_children !== '') 
     677        { 
     678            $css_class .= ' '.$has_children
    679679        } 
    680680