Show
Ignore:
Timestamp:
09/03/2007 08:49:02 PM (15 months ago)
Author:
Shadowhand
Message:

A few small changes:

  • Added html::script() and html::stylesheet()
  • Updated Kohana::lang() to use foo.bar syntax, like Event and Config
  • Fixed the View class' output callback handling
  • Removed AJAX spinner
  • Updated User Guide effects to use an easing for animations, and call prettyPrint() only when there are elements to be highlighted
  • Updated User Guide layout to remove AJAX-related styles
  • Updated User Guide template to be i18n compatible, the same template can be used for every language
  • Removed User Guide menu template, in favor of building the menu in the template
  • Added i18n directory for the User Guide, for localized strings (title, copyright, menu)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/helpers/html.php

    r475 r486  
    103103        } 
    104104 
     105        public static function stylesheet($style, $index = FALSE, $media = FALSE) 
     106        { 
     107                $compiled = ''; 
     108 
     109                if (is_array($style)) 
     110                { 
     111                        foreach($style as $name) 
     112                        { 
     113                                $compiled .= self::stylesheet($name, $index, $media)."\n"; 
     114                        } 
     115                } 
     116                else 
     117                { 
     118                        $media = ($media == FALSE) ? '' : ' media="'.$media.'"'; 
     119 
     120                        $compiled = '<link rel="stylesheet" href="'.url::base($index).$style.'.css"'.$media.' />'; 
     121                } 
     122 
     123                return $compiled; 
     124        } 
     125 
     126        /** 
     127         * Script generator 
     128         * 
     129         * @access public 
     130         * @param  mixed    String or array of script names 
     131         * @param  boolean  Add index to the URL 
     132         * @return string 
     133         */ 
     134        public static function script($script, $index = FALSE) 
     135        { 
     136                $compiled = ''; 
     137 
     138                if (is_array($script)) 
     139                { 
     140                        foreach($script as $name) 
     141                        { 
     142                                $compiled .= self::script($name, $index)."\n"; 
     143                        } 
     144                } 
     145                else 
     146                { 
     147                        $compiled = '<script type="text/javascript" src="'.url::base($index).$script.'.js"></script>'; 
     148                } 
     149 
     150                return $compiled; 
     151        } 
     152 
    105153        /** 
    106154         * HTML Attribute Parser