Changeset 433

Show
Ignore:
Timestamp:
05/06/07 10:35:01 (2 years ago)
Author:
laurentj
Message:

added support of alternate stylesheet; fixed few things in jResponseHtml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/core/response/jResponseHtml.class.php

    r411 r433  
    9191    /**#@+ 
    9292     * content for the head 
    93      * @var array  
     93     * @var array 
    9494     */ 
    9595    protected $_CSSLink = array (); 
     
    106106    /**#@+ 
    107107     * content for the body 
    108      * @var array  
     108     * @var array 
    109109     */ 
    110110    protected $_bodyTop = array(); 
     
    365365                $more .= $param_name.'="'. htmlspecialchars($param_value).'" '; 
    366366            } 
    367             echo  '<link rel="stylesheet" type="text/css" href="',$src,'" ',$more,$this->_endTag; 
     367            if(!isset($params['rel'])) 
     368                $more .='rel="stylesheet" '; 
     369            echo  '<link type="text/css" href="',$src,'" ',$more,$this->_endTag; 
    368370        } 
    369371 
     
    376378                    $more .= $param_name.'="'. htmlspecialchars($param_value).'" '; 
    377379                } 
    378                 echo  '<link rel="stylesheet" type="text/css" href="',$src,'" ',$more,$this->_endTag; 
     380                if(!isset($params['rel'])) 
     381                    $more .='rel="stylesheet" '; 
     382                echo  '<link type="text/css" href="',$src,'" ',$more,$this->_endTag; 
    379383            } 
    380384            echo '<![endif]-->'; 
     
    383387        if($this->favicon != ''){ 
    384388            $fav = htmlspecialchars($this->favicon); 
    385             echo '<link rel="icon" type="image/x-icon" href="'.$fav.'" />'
    386             echo '<link rel="shortcut icon" type="image/x-icon" href="'.$fav.'" />'
     389            echo '<link rel="icon" type="image/x-icon" href="',$fav,'" ',$this->_endTag
     390            echo '<link rel="shortcut icon" type="image/x-icon" href="',$fav,'" ',$this->_endTag
    387391        } 
    388392 
     
    438442    /** 
    439443     * used to erase some head properties 
    440      * @param array $what list of one or many of this strings : 'CSSLink', 'Styles', 'JSLink', 'JSCode', 'Others','MetaKeywords','MetaDescription' 
    441      */ 
    442     final public function clearHtmlHeader ($what){ 
    443         $cleanable = array ('CSSLink', 'Styles', 'JSLink', 'JSCode', 'Others','MetaKeywords','MetaDescription'); 
     444     * @param array $what list of one or many of this strings : 'CSSLink', 'CSSIELink', 'Styles', 'JSLink', 'JSIELink', 'JSCode', 'Others','MetaKeywords','MetaDescription'. If null, it cleans all values. 
     445     */ 
     446    final public function clearHtmlHeader ($what=null){ 
     447        $cleanable = array ('CSSLink', 'CSSIELink', 'Styles', 'JSLink','JSIELink', 'JSCode', 'Others','MetaKeywords','MetaDescription'); 
     448        if($what==null) 
     449            $what= $cleanable; 
    444450        foreach ($what as $elem){ 
    445451            if (in_array ($elem, $cleanable)){ 
Download in other formats: Unified Diff Zip Archive