Changeset 475
- Timestamp:
- 09/02/2007 09:28:49 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 30 modified
-
modules/user_guide/controllers/user_guide.php (modified) (4 diffs)
-
modules/user_guide/views/user_guide/content/abbr.php (added)
-
modules/user_guide/views/user_guide/content/general/bootstrapping.php (modified) (3 diffs)
-
modules/user_guide/views/user_guide/content/general/configuration.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/content/kohana.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/content/kohana/about.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/content/kohana/downloads.php (modified) (2 diffs)
-
modules/user_guide/views/user_guide/content/kohana/installation.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/content/kohana/links.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/content/kohana/requirements.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/content/libraries/cache.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/css/layout.css (modified) (3 diffs)
-
modules/user_guide/views/user_guide/css/prettify.css (added)
-
modules/user_guide/views/user_guide/js/effects.js (modified) (2 diffs)
-
modules/user_guide/views/user_guide/js/prettify.js (added)
-
modules/user_guide/views/user_guide/menu.php (modified) (1 diff)
-
modules/user_guide/views/user_guide/template.php (modified) (2 diffs)
-
system/core/Bootstrap.php (modified) (1 diff)
-
system/core/Config.php (modified) (2 diffs)
-
system/core/Event.php (modified) (2 diffs)
-
system/core/Kohana.php (modified) (11 diffs)
-
system/core/utf8.php (modified) (1 diff)
-
system/helpers/html.php (modified) (4 diffs)
-
system/libraries/Controller.php (modified) (1 diff)
-
system/libraries/Database.php (modified) (2 diffs)
-
system/libraries/Encrypt.php (modified) (2 diffs)
-
system/libraries/Input.php (modified) (1 diff)
-
system/libraries/Loader.php (modified) (2 diffs)
-
system/libraries/Session.php (modified) (1 diff)
-
system/libraries/View.php (modified) (3 diffs)
-
system/libraries/drivers/Session_Cookie.php (modified) (1 diff)
-
system/libraries/drivers/Session_Database.php (modified) (1 diff)
-
system/libraries/drivers/Session_Driver.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/user_guide/controllers/user_guide.php
r466 r475 73 73 public function _tags() 74 74 { 75 Kohana::$output = preg_replace_callback('!<(benchmark| event|file|definition)>.+?</[^>]+>!', array($this, '_tag_update'), Kohana::$output);75 Kohana::$output = preg_replace_callback('!<(benchmark|config|definition|event|file)>.+?</[^>]+>!', array($this, '_tag_update'), Kohana::$output); 76 76 } 77 77 … … 85 85 switch($tag) 86 86 { 87 case 'benchmark': 88 return isset($this->lang['benchmark'][$type]) ? '<abbr title="Benchmark: '.$this->lang['benchmark'][$type].'">'.$type.'</abbr>' : $type; 89 case 'config': 90 return '<tt class="config">'.$type.'</tt>'; 87 91 case 'definition': 88 92 return html::anchor('user_guide/general/definitions?search='.$type, $type); 93 case 'event': 94 return isset($this->lang['event'][$type]) ? '<abbr title="Event: '.$this->lang['event'][$type].'">'.$type.'</abbr>' : $type; 89 95 case 'file': 90 96 return '<tt class="filename">'.$type.EXT.'</tt>'; 91 case 'benchmark':92 return isset($this->lang['benchmark'][$type]) ? '<abbr title="Benchmark: '.$this->lang['benchmark'][$type].'">'.$type.'</abbr>' : $type;93 case 'event':94 return isset($this->lang['event'][$type]) ? '<abbr title="Event: '.$this->lang['event'][$type].'">'.$type.'</abbr>' : $type;95 97 } 96 98 } … … 100 102 header('Content-type: text/javascript'); 101 103 102 $this->_media('js', preg_replace('/\.js$/D', '', $filename));104 $this->_media('js', $filename); 103 105 } 104 106 … … 107 109 header('Content-type: text/css'); 108 110 109 $this->_media('css', preg_replace('/\.css$/D', '', $filename));111 $this->_media('css', $filename); 110 112 } 111 113 -
trunk/modules/user_guide/views/user_guide/content/general/bootstrapping.php
r447 r475 1 # System Bootstrapping 2 1 3 Article status [Draft] requires [Proof Reading] 2 # System Bootstrapping3 4 4 5 Kohana uses a <definition>Front Controller</definition> as part of its design. This file is the <file>index</file> file that rests in the directory that Kohana is installed in. … … 6 7 The front controller validates the application and system paths, then loads <file>system/core/Bootstrap</file>. The Bootstrap file begins the process of initializing Kohana. 7 8 8 ## Loading {#init}9 ## Loading 9 10 Benchmarking is loaded, and the <benchmark>total_execution_time</benchmark> is started. Next the <benchmark>base_classes_loading</benchmark> benchmark is started. 10 11 … … 22 23 23 24 Routing is performed for the current request. A controller is chosen and located, the segments are prepared for executing the controller. 25 26 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/general/configuration.php
r469 r475 1 # Configuration 2 1 3 Article status [Draft] requires [Editing] Configuring the Framework, add remaining entries 2 # Configuration3 Kohana adopts the philosophy of *convention* over *configuration*. The goal is to minimize user configuration. Where configuration is required or enabled, sensible defaults are utilised.4 4 5 System configuration is specified by entries in files located in folder */application/config/* 5 Kohana adopts the **convention over configuration** philosophy. The goal is to minimize the amount of configuration that the end user has to do. To accomplish this goal, Kohana employs **sensible defaults** whenever possible and **simple to understand options** when necessary. 6 6 7 Configuration files are ordinary text files with a default *php* file extension. 7 ## Configuring Kohana 8 8 9 The primary configuration file is <file>application/config/config</file> System wide configuration is 10 specified here and is required for every new installation. 9 Configuration files are regular PHP files that contain a <code>$config</code> array. Each configuration option is specified with a key value pair. Items which can be blank are marked [optional]. 11 10 12 **Note:** Optional entries are indicated by square brackets. 11 base_url 12 : URL which points to the root of your application, eg: everything before <file>index</file> in the URL. **If this option is not set properly, Kohana will be unable to create any self-linking URL.** 13 13 14 ## Config entries 15 ### Base URL 16 Specifies the url which points to the base or root of your application. 17 <pre> 18 base_url domain name/[subdirectory/] 19 <code> 20 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/kohana/'; 21 </code> 22 </pre> 23 *base_url* is **mandatory** and requires a correct server domain that **must** terminate with a "**/**" 14 index_page 15 : Filename of the <definition>front controller</definition>, usually <file>index</file>. If you <?php echo html::anchor('user_guide/general/routing#removing_index', 'remove the index page') ?> from the URL, this setting becomes optional. 24 16 25 ### Front Controller 26 Specifies the name of the system <definition>Front Controller</definition>, usually <file>index</file>, but may be renamed. 27 <pre> 28 index_page [front controller name] 29 <code> 30 $config['index_page'] = 'index.php'; 31 </code> 32 </pre> 33 *index_page* is **optional**. If your web server supports dynamic URL re-writing. The front controller 34 may be dynamically removed fron the URI path. Set this item to blank if you are using re-writes. 17 url_suffix 18 : [optional] Filename suffix which should be dynamically added to any URL that Kohana generates. This setting is completely optional. 35 19 36 ### URL Suffix 37 Specifies the suffix which should be dynamically added to the URI path. 38 <pre> 39 url_suffix [suffix] 40 <code> 41 $config['url_suffix'] = '.html'; 42 </code> 43 </pre> 44 *url_suffix* is **optional**. You may specify any valid extension as a suffix. Set to blank to remove. 20 permitted_uri_chars 21 : List of characters that are allowed in URI strings. The default settings should work for almost every application. **If you can this option, the security of Kohana may diminish.** 45 22 46 ### Permitted URI Characters 47 Specifies the characters which the system will allow as part of a uniform resource indicator. 48 <pre> 49 permitted_uri_chars character set 50 <code> 51 $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-'; 52 </code> 53 </pre> 54 *permitted_uri_chars* is **mandatory**. A minimal character set must be specified or the system cannot function. 23 locale 24 : Sets the system locale using any standard two-letter language abbreviation. By default, Kohana only ships with English (en) language files. 55 25 56 **Security Note:** It is recommended that the default character set be used, to secure the system against 57 hacking attempts. Additional characters may be configured, but please be aware of the security implication.26 timezone 27 : [optional] If you would like your application to be localized to a timezone that is different than the server's timezone, enter a <?php echo html::anchor('http://php.net/timezones', 'supported timezone') ?> here. 58 28 59 ### Locale 60 Specifies the system locale using the standard two letter abbreviation. 61 <pre> 62 locale international language abbreviation 63 <code> 64 $config['locale'] = 'en'; 65 </code> 66 </pre> 67 *locale* is **mandatory**. Kohana default is English. 29 autoload 30 : [optional] To maintain a small footprint, resources are typically loaded by your controllers. In applications where a resource is used in many controllers, you may specify resources to be loaded automatically. **Make sure that the resources are properly configured before attempting to autoload them.** 68 31 69 ### Include Paths 70 Specifies additional locations the system should search for resources. 71 <pre> 72 include_paths [file path names] 73 <code> 74 $config['include_paths'] = array 75 ( 76 'modules/user_guide' 77 ); 78 </code> 79 </pre> 80 *include_paths* is **optional**. Kohana will always search the application path first, then any defined 81 include paths, and finally the system path. Primary resources are libraries, helpers and views. 32 include_paths 33 : [optional] Array of additional paths, absolute or relative to <file>index</file>, that will be searched when looking for resources. Paths are searched in the order of this array. Please note that your application path will always be searched first, and the system path will always be searched last. 82 34 83 ### Enable Hooks 84 Specifies the enabling of system Hooks 85 <pre> 86 enable_hooks boolean 87 <code> 88 $config['enable_hooks'] = FALSE; 89 </code> 90 </pre> 91 *enable_hooks* is **mandatory**. By default Hooks are disabled. If you plan to add to hooks into your 92 application, you will activate them by setting this entry to *TRUE*. 35 extension_prefix 36 : Filename prefix for class extension files. Please see the <?php echo html::anchor('user_guide/general/extensions', 'Extensions') ?> page for more information. 93 37 94 ### SubClass Prefix 95 Specifies the prefix for user extensions to Core Kohana classes. 96 <pre> 97 subclass_prefix prefix_ 98 <code> 99 $config['subclass_prefix'] = 'MY_'; 100 </code> 101 </pre> 102 *subclass_prefix* is **mandatory**. Core class extensions must be prefixed. 103 By convention the prefix "My_" is used. You may change this prefix, provided it terminates with an *underscore*. If you are not extending Core classes, you may safely leave the default setting. 104 105 ### Timezone 106 Specifies an standard international timezone for the system. 107 <pre> 108 timezone [zone/location] 109 <code> 110 $config['timezone'] = ''; 111 </code> 112 </pre> 113 *timezone* is **optional**. By default, the setting is blank and Kohana will use the timezone supplied by 114 PHP on the server. An example timezone would be "Africa/Johannesburg". 115 116 ## Autoloader Entries 117 To maintain a small footprint, resources are manually loaded in your Controller. In Applications where 118 a resource is utilised across many Controllers, you may specify that Kohana automatically loads the resource and makes it available to all Controllers. 119 120 Such resources would typically be databases, libraries (session), and helpers (url). 121 <pre> 122 resource type [resource name[,resource name…]] 123 <code> 124 $config['libraries'] = 'session, encrypt'; 125 </code> 126 </pre> 127 Note: If you are specifying that a resource is autoloaded, you still need to ensure that the resource is 128 correctly configured, via it's own configuration file. For example, if you autoload the Cookie Helper, 129 then you must check that cookies are correctly configured for your system in <file>application/config/cookie</file> 38 enable_hooks 39 : [optional] Globally enables or disables hooks. Please see the <?php echo html::anchor('user_guide/general/hooks', 'Hooks') ?> page for more information. 130 40 131 41 ## Configuration Files 132 The following files are used for Class configuration.133 42 134 * <file>application/config/cookie</file> configures Cookies, used by the [Cookie helper](<?php echo url::base(TRUE).'user_guide/helpers/cookie' ?>) class. 135 * <file>application/config/database</file> configures Databases, used by the Database class. 136 * <file>application/config/encryption</file> configures Encryption, used by the Encryption class. 137 * <file>application/config/log</file> configures Logging, used by the Log class. 138 * <file>application/config/pagination</file> configures Pagination, used by the Pagination class. 139 * <file>application/config/routes</file> configures Routing, used by the Routing class. 140 * <file>application/config/session</file> configures Sessions, used by the Session class. 43 The following configuration files are reserved for Kohana components.: 141 44 45 <file>config</file> 46 : Global Kohana configuration 142 47 143 <p></p> 144 *[PHP]: PHP Hypertext Processor 145 *[URI]: Uniform Resource Indicator 146 *[URL]: Uniform Resource Locator 48 <file>log</file> 49 : <?php echo html::anchor('user_guide/general/logging', 'Message Logging') ?> 50 51 <file>mimes</file> 52 : <?php echo html::anchor('user_guide/general/mimes', 'Mime Types') ?> 53 54 <file>routes</file> 55 : <?php echo html::anchor('user_guide/general/routes', 'Routing') ?> 56 57 <file>cookie</file> 58 : <?php echo html::anchor('user_guide/helpers/cookie', 'Cookie Helper') ?> 59 60 <file>database</file> 61 : <?php echo html::anchor('user_guide/libraries/database', 'Database Library') ?> 62 63 <file>encryption</file> 64 : <?php echo html::anchor('user_guide/libraries/encryption', 'Encryption Library') ?> 65 66 <file>pagination</file> 67 : <?php echo html::anchor('user_guide/libraries/pagination', 'Pagination Library') ?> 68 69 <file>session</file> 70 : <?php echo html::anchor('user_guide/libraries/session', 'Session Library') ?> 71 72 <?php echo $this->load->view('user_guide/content/abbr') ?> 73 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/kohana.php
r447 r475 1 # Kohana User Guide 2 1 3 Article status [Draft] requires [Writing] Welcome article and synopsis 2 # Kohana User Guide3 4 4 5 Kohana is an open-source development framework for writing dynamic Web Applications using PHP. 5 6 7 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/kohana/about.php
r447 r475 1 Article status [Stub] requires [Writing] Describing the Framework2 1 # About Kohana 3 2 3 Article status [Stub] requires [Writing] Describing the Framework 4 4 5 This is a stub (please write me) 6 7 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/kohana/downloads.php
r447 r475 1 # Download Kohana 2 1 3 Article status [Draft] requires [Editing] Correct download locations 2 # Download Kohana3 4 4 5 ## Current Stable Release version *(recommended)* 5 6 [Kohana v2.0](http://kohanaphp.com/ "Stable Release version") 6 7 7 ## Current Development snapshot 8 ## Current Development snapshot 8 9 [Kohana v2.1](http://kohanaphp.com/trac/trunk/ "Development Snapshot version") 9 10 … … 16 17 1. Trac [web interface](http://kohanaphp.com/trac/) 17 18 2. Subversion [trunk](http://kohanaphp.com/svn/trunk/) 18 19 19 20 20 *[Trac]: Trac is open source project collaboration software 21 21 *[Subversion]: Subversion is a Revision Control System 22 23 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/kohana/installation.php
r469 r475 1 Article status [Draft] requires [Writing] Install for Experienced users2 1 # Install Kohana 3 2 4 ## For New Users 5 If you are new to Kohana, we suggest following the steps below: 3 Article status [Draft] requires [Editing] 6 4 7 1. Unzip the Kohana package you downloaded, into a temporary directory. (Eg. */kohana*) 8 2. Prepare a place on your web server to upload the Kohana files to. 9 * Examples: 10 * */var/www/html* (Using the web server *DOCUMENT ROOT*) 11 * */var/www/html/kohana* (Using a sub-directory of root) 12 3. Using an FTP client, upload the Kohana files to your web server. 13 * Your server directory should now contain the following files and folders<br /> 14 <code> 15 index.php<br /> 16 -- application<br /> 17 -- modules<br /> 18 -- system 19 </code> 20 4. Using a Text Editor, open the file <file>application/config/config</file> 21 * Set the configuration item *base_url* to the name of the directory you uploaded Kohana into 22 * Examples: 23 1. The sub directory *kohana* of the server named *localhost* can be accessed via this URL: http://localhost/kohana 24 <code> 25 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/kohana/'; 26 </code> 27 2. The *DOCUMENT ROOT* of the server named *example.com* can be accessed via this URL: http://example.com 28 <code> 29 $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/'; 30 </code> 31 5. Test your Installation 32 * Open your favourite web browser and point it at the URL defined in *base_url* 33 * You should now be viewing the "Welcome page" of the Kohana User Guide, on your server. 5 Kohana is installed in four easy steps: 34 6 7 1. <?php echo html::anchor('user_guide/kohana/downloads', 'Download') ?> a copy of Kohana. 8 2. Unzip the package you downloaded. This should create a <tt>kohana</tt> directory. 9 3. Upload the Kohana files to your webserver, placing <file>index</file> in the directory that you would like Kohana accessible from. 10 4. Edit the <?php echo html::anchor('user_guide/general/configuration', 'global configuration') ?> file <file>application/config/config</file> 11 5. Test your installation by opening the URL you set as the <config>base_url</config> in your favorite browser 35 12 36 **Congratulations!** <br /> 37 You can explore your new Kohana Framework by reading the User Guide, a good place 38 to start would be [Getting Started](<?php echo url::base(TRUE).'user_guide/kohana/starting'?>) 13 If you see the Welcome page of the user guide, your Kohana installation is complete! If you are new to Kohana, start by reading the <?php echo html::anchor('user_guide/kohana/starting', 'Getting Start') ?> page. 39 14 40 15 ## Experiencing Problems? 41 If you were not able to view the Kohana User Guide on your server after installing, we recommend42 reading the [Toubleshooting](<?php echo url::base(TRUE).'user_guide/troubleshoot'?>) page of the user43 guide for more help.44 16 45 If you were unable to install Kohana successfully, please visit our [wiki]("http://kohanaphp.com/wiki")46 for more information, or ask for assistance in our [forums]("http://kohanaphp.com/forums"), we would 47 be glad to help. 17 If you were not able to view the Kohana User Guide on your server after installing, please read the <?php echo html::anchor('user_guide/general/troubleshooting', 'Troubleshooting') ?> page of the user guide, visit the <?php echo html::anchor('http://kohanaphp.com/trac/wiki', 'Kohana Wiki') ?>, or ask for assistance in the <?php echo html::anchor('http://kohanaphp.com/forums', 'community forums') ?>. 18 19 [moveTo: Troubleshooting] The Kohana Team tries to make sure that Kohana is as free from bugs as possible. If you have found a bug, please <?php echo html::anchor('http://kohanaphp.com/trac/newticket', 'report it') ?>. 48 20 49 21 ## For Experienced Users 50 22 please write me (Installing outside doc root) 51 23 52 *[URL]: Uniform Resource Locator 24 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/kohana/links.php
r447 r475 1 Article status [Stub] requires [Writing] Where to find additional resources, links to wiki etc2 1 # Kohana Links 3 2 3 Article status [Stub] requires [Writing] Where to find additional resources, links to wiki etc 4 4 5 This is a stub (please write me) 6 7 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/kohana/requirements.php
r456 r475 1 Article status [Draft] requires [Editing]2 1 # Basic Requirements 3 2 4 ## Mandatory requirements 5 1. An Operating system capable of supporting [Unicode](http://unicode.org/) character sets. 6 1. Supported OS 7 1. Most Unix or Unix clones (Linux, BSD) 8 2. Windows (XP, Vista, Windows 2000) 9 3. Mac OS X 3 Article status [Draft] requires [Editing] 10 4 11 2. An HTTP Server. 12 1. Supported Servers (Any server capable of supporting CGI should work) 13 1. Apache httpd, version 1.1.37 or higher. (With CGI, FastCGI or Mod_php) 14 2. PHP Hypertext Processor, version 5.2.0 or higher. (Earlier versions are *not* supported) 5 Kohana will run in almost any environment with minimal configuration. There are a few minimum server requirements: 15 6 7 1. [Unicode](http://unicode.org/) support 8 2. PHP version >= 5.1 9 3. An HTTP server. Kohana is known to work with: 10 * Apache 1.x 11 * Apache 2.x 12 * lighttpd 13 * IIS version >= 5 16 14 17 ## Optional requirements 18 1. A Relational Database. 19 1. Any database server currently supported by the PHP PDO database layer. 20 1. MySQL and MySQLi 21 2. SQLite3 22 3. Postgres 15 Optionally, if you wish to use a database with Kohana, you will need a database server. Kohana use <?php echo html::anchor('http://php.net/pdo', 'PDO') ?> to connect to your database. All of the PDO <?php echo html::anchor('http://php.net/manual/en/ref.pdo.php#pdo.drivers', 'supported databases') ?> are supported by Kohana, provided that your server has the driver available. 23 16 24 2. The [mbstring](http://php.net/mbstring) extension. 25 * It will speed up the utf8 class 26 * However it must *not* be overloading the original string functions 17 ## Recommended Extensions 27 18 19 1. [mbstring](http://php.net/mbstring) will dramatically speed up Kohana's UTF-8 functions 20 2. [mcrypt](http://php.net/mcrypt) will dramatically speed up Kohana's encryption and hashing routines 28 21 29 *[HTTP]: Hyper Text Transfer Protocol 30 *[PDO]: PHP Database Object 31 *[PHP]: PHP Hypertext Processor 22 <?php echo $this->load->view('user_guide/content/abbr') ?> 23 24 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/content/libraries/cache.php
r447 r475 1 # Cache Class 2 1 3 Article status [Stub] requires [Writing] Describe cache class and usage 2 # Cache Class 4 3 5 This is a stub (please write me) 6 7 <?php /* $Id$ */ ?> -
trunk/modules/user_guide/views/user_guide/css/layout.css
r471 r475 11 11 body { background: #f7fbf1; color: #111; font-size: 82%; line-height: 140%; font-family: "Lucida Grande", Arial, Verdana, sans-serif; } 12 12 /* Hacks for Firefox and Safari */ 13 body > div { text-shadow: 0 0 0 #000; -moz-opacity: 0.9999 99; }13 body > div { text-shadow: 0 0 0 #000; -moz-opacity: 0.9999; } 14 14 a { color: #449; text-decoration: none; } 15 15 h1 { border-bottom: solid 1px #999; font-size: 2.5em; text-align: center; color: #b43f11; } … … 17 17 p { padding-bottom: 1em; } 18 18 abbr { color: #141; border-bottom: dotted 1px #999; } 19 tt { font-family: monospace; background: #ddd; padding: 1px 2px; border: solid 1px #ccc; } 19 tt, code, pre { font-family: "Monaco", monospace; background: #ddd; padding: 1px 2px; border: solid 1px #ccc; } 20 tt.config { color: #411; } 20 21 dl { padding: 0.5em; } 21 22 dt { float: left; clear: left; width: 12em; font-weight: bold; } … … 37 38 * html body #menu li span { text-shadow: 0 0 0 transparent; } /* Remove the text shadow in IE6 */ 38 39 #body { padding: 0.3em 1em; background: #fff; } 39 #body ol, #body ul { margin : 1em; margin-left: 2.5em; }40 #body ol, #body ul { margin-left: 2.5em; padding-bottom: 1em; } 40 41 #body ol { list-style: decimal; } 41 42 #body ul { list-style: circle; } 42 43 #body li { padding: 0.1em 0; } 43 #body code { background: #eee; font-size: 1.1em; border: dotted 1px; padding: 0.5em; font-family: monospace; display: block; }44 44 #footer { padding: 0 1em; background: #fff; line-height: 2em; } 45 45 #loading { position: absolute; top: 0; right: 0; z-index: 9999; width: 32px; height: 32px; background: transparent url(spinner.gif) center center no-repeat; } -
trunk/modules/user_guide/views/user_guide/js/effects.js
r472 r475 1 1 // $Id$ 2 // Special Kohana functions 3 var Kohana = { 4 loading: false, 5 waiting: false, 6 toggleLoading: function(on) { 7 // If we are waiting for an animation, retry in 5ms 8 if (Kohana.waiting == true) { 9 setTimeout('Kohana.toggleLoading('+on+')', 20); 10 return false; 11 } 12 // Toggle waiting state 13 Kohana.waiting = true; 14 if (on == true) { // Show loading 15 this.loading.slideDown(250, function() { 16 Kohana.waiting = false; 17 }); 18 } else { // Hide loading 19 this.loading.slideUp(250, function() { 20 Kohana.waiting = false; 21 }); 22 } 23 } 24 }; 25 // Behavior attachment 2 26 $(document).ready(function(){ 3 27 // Menu opacity hover effect, much fancy pants! … … 49 73 return false; 50 74 }); 75 // For syntax highlighting 76 prettyPrint(); 51 77 }); 52 // Special Kohana functions53 var Kohana = {54 loading: false,55 waiting: false,56 toggleLoading: function(on) {57 // If we are waiting for an animation, retry in 5ms58 if (Kohana.waiting == true) {59 setTimeout('Kohana.toggleLoading('+on+')', 20);60 return false;61 }62 // Toggle waiting state63 Kohana.waiting = true;64 if (on == true) { // Show loading65 this.loading.slideDown(250, function() {66 Kohana.waiting = false;67 });
