From 700205ad5cb6c00596ad82d5ed282f516add5481 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 28 Jan 2011 07:44:28 -0600 Subject: updating copyrights to 2011 --- user_guide/libraries/benchmark.html | 2 +- user_guide/libraries/caching.html | 2 +- user_guide/libraries/calendar.html | 2 +- user_guide/libraries/cart.html | 2 +- user_guide/libraries/config.html | 2 +- user_guide/libraries/email.html | 2 +- user_guide/libraries/encryption.html | 2 +- user_guide/libraries/file_uploading.html | 2 +- user_guide/libraries/form_validation.html | 2 +- user_guide/libraries/ftp.html | 2 +- user_guide/libraries/image_lib.html | 2 +- user_guide/libraries/input.html | 2 +- user_guide/libraries/javascript.html | 2 +- user_guide/libraries/jquery.html | 2 +- user_guide/libraries/language.html | 2 +- user_guide/libraries/loader.html | 2 +- user_guide/libraries/output.html | 2 +- user_guide/libraries/pagination.html | 2 +- user_guide/libraries/parser.html | 2 +- user_guide/libraries/security.html | 2 +- user_guide/libraries/sessions.html | 2 +- user_guide/libraries/table.html | 2 +- user_guide/libraries/trackback.html | 2 +- user_guide/libraries/typography.html | 2 +- user_guide/libraries/unit_testing.html | 2 +- user_guide/libraries/uri.html | 2 +- user_guide/libraries/user_agent.html | 2 +- user_guide/libraries/xmlrpc.html | 2 +- user_guide/libraries/zip.html | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html index 05f7cc0e9..e8182d080 100644 --- a/user_guide/libraries/benchmark.html +++ b/user_guide/libraries/benchmark.html @@ -191,7 +191,7 @@ Previous Topic:  Writing Documentaio User Guide Home   ·   Next Topic:  Calendar Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/caching.html b/user_guide/libraries/caching.html index e4651dc4a..3d3354436 100644 --- a/user_guide/libraries/caching.html +++ b/user_guide/libraries/caching.html @@ -186,7 +186,7 @@ Previous Topic:  Error Handling User Guide Home   ·   Next Topic:  Profiling Your Application

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html index 2c052424d..347b3d92b 100644 --- a/user_guide/libraries/calendar.html +++ b/user_guide/libraries/calendar.html @@ -242,7 +242,7 @@ Previous Topic:  Benchmark Class User Guide Home   ·   Next Topic:  Cart Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html index ba95b24c5..bc0721bb4 100644 --- a/user_guide/libraries/cart.html +++ b/user_guide/libraries/cart.html @@ -339,7 +339,7 @@ Previous Topic:  Calendar Class User Guide Home   ·   Next Topic:  Config Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html index bfb679457..6b48b2515 100644 --- a/user_guide/libraries/config.html +++ b/user_guide/libraries/config.html @@ -174,7 +174,7 @@ Previous Topic:  Calendaring Class User Guide Home   ·   Next Topic:  Database Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html index b863ef4c1..a02d6587f 100644 --- a/user_guide/libraries/email.html +++ b/user_guide/libraries/email.html @@ -300,7 +300,7 @@ Previous Topic:  Database Class User Guide Home   ·   Next Topic:  Encryption Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html index fbffd63c6..f6fb2b81d 100644 --- a/user_guide/libraries/encryption.html +++ b/user_guide/libraries/encryption.html @@ -217,7 +217,7 @@ Previous Topic:  Email Class User Guide Home   ·   Next Topic:  File Uploading Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index 54725d035..c5eab4695 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -444,7 +444,7 @@ Previous Topic:  Encryption Helper User Guide Home   ·   Next Topic:  Form Validation Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  Ellislab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  Ellislab, Inc.

diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html index eae2036c1..935dca61f 100644 --- a/user_guide/libraries/form_validation.html +++ b/user_guide/libraries/form_validation.html @@ -1211,7 +1211,7 @@ Previous Topic:  File Uploading ClassUser Guide Home   ·   Next Topic:  FTP Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index 493177655..e3c06741d 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -309,7 +309,7 @@ Previous Topic:  Form Validation Class< User Guide Home   ·   Next Topic:  HTML Table Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html index 98ed4f6dd..0f023cff1 100644 --- a/user_guide/libraries/image_lib.html +++ b/user_guide/libraries/image_lib.html @@ -660,7 +660,7 @@ Previous Topic:  HTML Table Class User Guide Home   ·   Next Topic:  Input Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index d838cf020..552c49afd 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -262,7 +262,7 @@ Previous Topic:  Image Manipulation Class User Guide Home   ·   Next Topic:  Loader Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index 0f1d0a090..b5041e5b8 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -97,7 +97,7 @@ Previous Topic:  Input Class Top of Page   ·   User Guide Home   ·   Next Topic:  Language Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/jquery.html b/user_guide/libraries/jquery.html index d8307f347..732999c57 100644 --- a/user_guide/libraries/jquery.html +++ b/user_guide/libraries/jquery.html @@ -229,7 +229,7 @@ Previous Topic:  Input Class Top of Page   ·   User Guide Home   ·   Next Topic:  Language Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html index c37f00926..dfdccad04 100644 --- a/user_guide/libraries/language.html +++ b/user_guide/libraries/language.html @@ -130,7 +130,7 @@ Previous Topic:  Loader Class User Guide Home   ·   Next Topic:  Output Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index 34e3929a9..af312f4aa 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -248,7 +248,7 @@ Previous Topic:  Input Class User Guide Home   ·   Next Topic:  Language Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html index a1427de7b..ab8f1d683 100644 --- a/user_guide/libraries/output.html +++ b/user_guide/libraries/output.html @@ -155,7 +155,7 @@ Previous Topic:  Language Class User Guide Home   ·   Next Topic:  Pagination Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html index 42c102c8d..da07c79be 100644 --- a/user_guide/libraries/pagination.html +++ b/user_guide/libraries/pagination.html @@ -222,7 +222,7 @@ Previous Topic:  Output Class User Guide Home   ·   Next Topic:  Session Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html index ece61c1fa..5bb403a7f 100644 --- a/user_guide/libraries/parser.html +++ b/user_guide/libraries/parser.html @@ -205,7 +205,7 @@ Previous Topic:  Trackback Class User Guide Home   ·   Next Topic:  Typography

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index 6d6216d95..5cd274787 100644 --- a/user_guide/libraries/security.html +++ b/user_guide/libraries/security.html @@ -121,7 +121,7 @@ Previous Topic:  Pagination Class User Guide Home   ·   Next Topic:  Session Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html index 2d295d72e..c8757995c 100644 --- a/user_guide/libraries/sessions.html +++ b/user_guide/libraries/sessions.html @@ -315,7 +315,7 @@ Previous Topic:  Security Class User Guide Home   ·   Next Topic:  Trackback Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index 094d7aac6..9de70775a 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -308,7 +308,7 @@ Previous Topic:  FTP Class   &mi User Guide Home   ·   Next Topic:  Image Manipulation Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html index a07b8d1f8..32b1ee258 100644 --- a/user_guide/libraries/trackback.html +++ b/user_guide/libraries/trackback.html @@ -239,7 +239,7 @@ Previous Topic:  Session Class User Guide Home   ·   Next Topic:  Template Parser Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/typography.html b/user_guide/libraries/typography.html index e78af5f9a..9c4272b37 100644 --- a/user_guide/libraries/typography.html +++ b/user_guide/libraries/typography.html @@ -153,7 +153,7 @@ Previous Topic:  Template Parser User Guide Home   ·   Next Topic:  Unit Testing Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html index 84db54431..49c5881e1 100644 --- a/user_guide/libraries/unit_testing.html +++ b/user_guide/libraries/unit_testing.html @@ -219,7 +219,7 @@ Previous Topic:  Typography Class User Guide Home   ·   Next Topic:  URI Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html index b2f5ac3d9..0dbaffa49 100644 --- a/user_guide/libraries/uri.html +++ b/user_guide/libraries/uri.html @@ -245,7 +245,7 @@ Previous Topic:  Unit Testing Class User Guide Home   ·   Next Topic:  User Agent Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html index d2f79d2ec..8989fb2e1 100644 --- a/user_guide/libraries/user_agent.html +++ b/user_guide/libraries/user_agent.html @@ -219,7 +219,7 @@ Previous Topic:  URI Class User Guide Home   ·   Next Topic:  XML-RPC Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html index 87ca09480..7a8934d39 100644 --- a/user_guide/libraries/xmlrpc.html +++ b/user_guide/libraries/xmlrpc.html @@ -512,7 +512,7 @@ Previous Topic:  User Agent Class User Guide Home   ·   Next Topic:  Zip Encoding Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html index d57dd48ac..48e2562be 100644 --- a/user_guide/libraries/zip.html +++ b/user_guide/libraries/zip.html @@ -281,7 +281,7 @@ Previous Topic:   XML-RPC Class User Guide Home   ·   Next Topic:  Array Helper

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

-- cgit v1.2.3-24-g4f1b From 1c97d565c47eb2a3b0802a9b0202deb5b5fe6760 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Fri, 28 Jan 2011 13:34:50 -0500 Subject: Added csrf to security docs --- user_guide/libraries/security.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index 5cd274787..943f72a0f 100644 --- a/user_guide/libraries/security.html +++ b/user_guide/libraries/security.html @@ -104,11 +104,18 @@ Note: This function should only be used to deal with data upon submission. It's

If it is acceptable for the user input to include relative paths, e.g. file/in/some/approved/folder.txt, you can set the second optional parameter, $relative_path to TRUE.

- + $filename = $this->security->sanitize_filename($this->input->post('filename'), TRUE); +

Cross-site request forgery (CSRF)

+ +

You can enable csrf protection by opening your application/config/config.php file and setting this:

+$config['csrf_protection'] = TRUE; + +

If you use the form helper the form_open() function will automatically insert a hidden csrf field in your forms.

+ -- cgit v1.2.3-24-g4f1b From d709c394bbc918283e09f501363559b665fa2a24 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Fri, 28 Jan 2011 14:56:26 -0500 Subject: Wrong branch, and the drivers were not alphabetical. --- user_guide/libraries/javascript.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index b5041e5b8..864efc82d 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -2,7 +2,7 @@ -CodeIgniter User Guide : Input Class +CodeIgniter User Guide : JavaScript Class @@ -55,6 +55,7 @@ Input Class
+

Note: This driver is experimental. Its feature set and implementation may change in future releases.


Javascript Class

Rewrite this paragraph: jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. CodeIgniter provides a library to help you with certain common functions that you may want to use within jQuery. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.

-- cgit v1.2.3-24-g4f1b From 9d3ad267e8e8f2972ceea05c4281b0234ed3efb4 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 28 Jan 2011 14:06:58 -0600 Subject: some cleanup for the javascript class docs --- user_guide/libraries/javascript.html | 153 ++++++++++++++++++++++- user_guide/libraries/jquery.html | 236 ----------------------------------- 2 files changed, 147 insertions(+), 242 deletions(-) delete mode 100644 user_guide/libraries/jquery.html (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index 864efc82d..55ad18907 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -58,9 +58,9 @@ Input Class

Note: This driver is experimental. Its feature set and implementation may change in future releases.


Javascript Class

-

Rewrite this paragraph: jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. CodeIgniter provides a library to help you with certain common functions that you may want to use within jQuery. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.

+

CodeIgniter provides a library to help you with certain common functions that you may want to use with Javascript. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.

Initializing the Class

-

To initialize the jQuery class manually in your controller constructor, use the $this->load->library function. Currently, the only available library is jQuery, which will automatically be loaded like this:

+

To initialize the Javascript class manually in your controller constructor, use the $this->load->library function. Currently, the only available library is jQuery, which will automatically be loaded like this:

$this->load->library('javascript'); @@ -73,20 +73,161 @@ Input Class

Once loaded, the jQuery library object will be available using: $this->javascript

Setup and Configuration

Set these variables in your view

-

As a javascript library, your files must be available to your application. For your convenience, the needed files to run this library are available for download from our site.

-

As javascript is a client side language, the library must be able to write content into your final output. This generally means a view. You'll need to include the following variables in the <head> sections of your output.

+

As a Javascript library, your files must be available to your application.

+

As Javascript is a client side language, the library must be able to write content into your final output. This generally means a view. You'll need to include the following variables in the <head> sections of your output.

<?php echo $library_src;?>
<?php echo $script_head;?>

$library_src, is where the actual library file will be loaded, as well as any subsequent plugin script calls; $script_head is where specific events, functions and other commands will be rendered.

Set the path to the librarys with config items

-

There are some configuration items in javascript library. These can either be set in application/config.php, within its own confg/javascript.php file, or within any controller usings the set_item() function.

+

There are some configuration items in Javascript library. These can either be set in application/config.php, within its own config/javascript.php file, or within any controller usings the set_item() function.

An image to be used as an "ajax loader", or progress indicator. Without one, the simple text message of "loading" will appear when Ajax calls need to be made.

$config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/');
$config['javascript_ajax_img'] = 'images/ajax-loader.gif';

If you keep your files in the same directories they were downloaded from, then you need not set this configuration items.

-

For information on outputting events, effects, etc., refer to the jQuery Class documentation.

+

The jQuery Class

+ +

To initialize the jQuery class manually in your controller constructor, use the $this->load->library function:

+ +$this->load->library('jquery'); + +

You may send an optional parameter to determine whether or not a script tag for the main jQuery file will be automatically included when loading the library. It will be created by default. To prevent this, load the library as follows:

+ +$this->load->library('jquery', FALSE); + +

Once loaded, the jQuery library object will be available using: $this->jquery

+ +

jQuery Events

+ +

Events are set using the following syntax.

+ +

$this->jquery->event('element_path', code_to_run());

+ +

In the above example:

+ +
    +
  • "event" is any of blur, change, click, dblclick, error, focus, hover, keydown, keyup, load, mousedown, mouseup, mouseover, mouseup, resize, scroll, or unload.
  • +
  • "element_path" is any valid jQuery selector. Due to jQuery's unique selector syntax, this is usually an element id, or CSS selector. For example "#notice_area" would effect <div id="notice_area">, and "#content a.notice" would effect all anchors with a class of "notice" in the div with id "content".
  • +
  • "code_to_run()" is script your write yourself, or an action such as an effect from the jQuery library below.
  • +
+ +

Effects

+ +

The query library supports a powerful Effects repertoire. Before an effect can be used, it must be loaded:

+ +

$this->jquery->effect([optional path] plugin name); +// for example +$this->jquery->effect('bounce'); +

+ +

hide() / show()

+ +

Each of this functions will affect the visibility of an item on your page. hide() will set an item invisible, show() will reveal it.

+

$this->jquery->hide(target, optional speed, optional extra information);
+ $this->jquery->show(target, optional speed, optional extra information);

+ +
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • +
  • "extra information" is optional, and could include a callback, or other additional information.
  • +
+ +

toggle()

+ +

toggle() will change the visibility of an item to the opposite of its current state, hiding visible elements, and revealing hidden ones.

+

$this->jquery->toggle(target);

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
+ +

animate()

+ +

$this->jquery->animate(target, parameters, optional speed, optional extra information);

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "paramters" in jQuery would generally include a series of CSS properties that you wish to change.
  • +
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • +
  • "extra information" is optional, and could include a callback, or other additional information.
  • +
+

For a full summary, see http://docs.jquery.com/Effects/animate

+

Here is an example of an animate() called on a div with an id of "note", and triggered by a click using the jQuery library's click() event.

+

$params = array(
+ 'height' => 80,
+ 'width' => '50%',
+ 'marginLeft' => 125
+);
+$this->jquery->click('#trigger', $this->jquery->animate('#note', $params, normal));

+ +

fadeIn() / fadeOut()

+ +

$this->jquery->fadeIn(target, optional speed, optional extra information);
+ $this->jquery->fadeOut(target, optional speed, optional extra information);

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • +
  • "extra information" is optional, and could include a callback, or other additional information.
  • +
+ +

toggleClass()

+ +

This function will add or remove a CSS class to its target.

+

$this->jquery->toggleClass(target, class)

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "class" is any CSS classname. Note that this class must be defined and available in a CSS that is already loaded.
  • +
+ +

fadeIn() / fadeOut()

+ +

These effects cause an element(s) to disappear or reappear over time.

+

$this->jquery->fadeIn(target, optional speed, optional extra information);
+ $this->jquery->fadeOut(target, optional speed, optional extra information);

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • +
  • "extra information" is optional, and could include a callback, or other additional information.
  • +
+ +

slideUp() / slideDown() / slideToggle()

+ +

These effects cause an element(s) to slide.

+

$this->jquery->slideUp(target, optional speed, optional extra information);
+ $this->jquery->slideDown(target, optional speed, optional extra information);
+$this->jquery->slideToggle(target, optional speed, optional extra information);

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • +
  • "extra information" is optional, and could include a callback, or other additional information.
  • +
+ +

Plugins

+ +

+ +

Some select jQuery plugins are made available using this library.

+ +

corner()

+

Used to add distinct corners to page elements. For full details see http://www.malsup.com/jquery/corner/

+

$this->jquery->corner(target, corner_style);

+
    +
  • "target" will be any valid jQuery selector or selectors.
  • +
  • "corner_style" is optional, and can be set to any valid style such as round, sharp, bevel, bite, dog, etc. Individual corners can be set by following the style with a space and using "tl" (top left), "tr" (top right), "bl" (bottom left), or "br" (bottom right).
  • +
+

$this->jquery->corner("#note", "cool tl br");

+ +

tablesorter()

+ +

description to come

+ +

modal()

+ +

description to come

+ +

calendar()

+ +

description to come

+
diff --git a/user_guide/libraries/jquery.html b/user_guide/libraries/jquery.html deleted file mode 100644 index 732999c57..000000000 --- a/user_guide/libraries/jquery.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - -CodeIgniter User Guide : Input Class - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

CodeIgniter User Guide Version 2.0.0

-
- - - - - - - - - -
- - -
- - - -
- - -

jQuery Class

- -

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. CodeIgniter provides a library to help you with certain common functions that you may want to use within jQuery. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.

- -

Initializing the Class

- -

To initialize the jQuery class manually in your controller constructor, use the $this->load->library function:

- -$this->load->library('jquery'); - -

You may send an optional parameter to determine whether or not a script tag for the main jQuery file will be automatically included when loading the library. It will be created by default. To prevent this, load the library as follows:

- -$this->load->library('jquery', FALSE); - -

Once loaded, the jQuery library object will be available using: $this->jquery

- -

Setup and Configuration

- -

As a javascript library, jquery.js must be available to your application. For your convenience, the needed files to run this library are available for download from our site.

- -

As javascript is a client side language, the library must be able to write content into your final output. This generally means a view. You'll need to include the following variables in the <head> sections of your output.

- -

<?php echo $jquery_script;?>
-<?php echo $script_head;?>

- -

There are 2 configuration items in jQuery library. These can either be set in application/config.php, or within any controller. The first is the path from the root of your site to the jquery library ('js' is the default) and the second is an image to be used as an "ajax loader", or progress indicator. Without one, the simple text message of "loading" will appear when Ajax calls need to be made.

- -

$config['javascript_folder'] = 'js';
- $config['javascript_ajax_img'] = 'images/ajax-loader.gif';

- -

If you keep your files in the same directories they were downloaded from, then you needed set this configuration items.

- -

Events

- -

Events are set using the following syntax.

- -

$this->jquery->event('element_path', code_to_run());

- -

In the above example:

- -
    -
  • "event" is any of blur, change, click, dblclick, error, focus, hover, keydown, keyup, load, mousedown, mouseup, mouseover, mouseup, resize, scroll, or unload.
  • -
  • "element_path" is any valid jQuery selector. Due to jQuery's unique selector syntax, this is usually an element id, or CSS selector. For example "#notice_area" would effect <div id="notice_area">, and "#content a.notice" would effect all anchors with a class of "notice" in the div with id "content".
  • -
  • "code_to_run()" is script your write yourself, or an action such as an effect from the jQuery library below.
  • -
- -

Effects

- -

The query library supports a powerful Effects repertoire. Before an effect can be used, it must be loaded:

- -

$this->jquery->effect([optional path] plugin name); -// for example -$this->jquery->effect('bounce'); -

- -

hide() / show()

- -

Each of this functions will affect the visibility of an item on your page. hide() will set an item invisible, show() will reveal it.

-

$this->jquery->hide(target, optional speed, optional extra information);
- $this->jquery->show(target, optional speed, optional extra information);

- -
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • -
  • "extra information" is optional, and could include a callback, or other additional information.
  • -
- -

toggle()

- -

toggle() will change the visibility of an item to the opposite of its current state, hiding visible elements, and revealing hidden ones.

-

$this->jquery->toggle(target);

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
- -

animate()

- -

$this->jquery->animate(target, parameters, optional speed, optional extra information);

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "paramters" in jQuery would generally include a series of CSS properties that you wish to change.
  • -
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • -
  • "extra information" is optional, and could include a callback, or other additional information.
  • -
-

For a full summary, see http://docs.jquery.com/Effects/animate

-

Here is an example of an animate() called on a div with an id of "note", and triggered by a click using the jQuery library's click() event.

-

$params = array(
- 'height' => 80,
- 'width' => '50%',
- 'marginLeft' => 125
-);
-$this->jquery->click('#trigger', $this->jquery->animate('#note', $params, normal));

- -

fadeIn() / fadeOut()

- -

$this->jquery->fadeIn(target, optional speed, optional extra information);
- $this->jquery->fadeOut(target, optional speed, optional extra information);

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • -
  • "extra information" is optional, and could include a callback, or other additional information.
  • -
- -

toggleClass()

- -

This function will add or remove a CSS class to its target.

-

$this->jquery->toggleClass(target, class)

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "class" is any CSS classname. Note that this class must be defined and available in a CSS that is already loaded.
  • -
- -

fadeIn() / fadeOut()

- -

These effects cause an element(s) to disappear or reappear over time.

-

$this->jquery->fadeIn(target, optional speed, optional extra information);
- $this->jquery->fadeOut(target, optional speed, optional extra information);

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • -
  • "extra information" is optional, and could include a callback, or other additional information.
  • -
- -

slideUp() / slideDown() / slideToggle()

- -

These effects cause an element(s) to slide.

-

$this->jquery->slideUp(target, optional speed, optional extra information);
- $this->jquery->slideDown(target, optional speed, optional extra information);
-$this->jquery->slideToggle(target, optional speed, optional extra information);

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "speed" is optional, and is set to either slow, normal, fast, or alternatively a number of milliseconds.
  • -
  • "extra information" is optional, and could include a callback, or other additional information.
  • -
- -

Plugins

- -

- -

Some select jQuery plugins are made available using this library.

- -

corner()

-

Used to add distinct corners to page elements. For full details see http://www.malsup.com/jquery/corner/

-

$this->jquery->corner(target, corner_style);

-
    -
  • "target" will be any valid jQuery selector or selectors.
  • -
  • "corner_style" is optional, and can be set to any valid style such as round, sharp, bevel, bite, dog, etc. Individual corners can be set by following the style with a space and using "tl" (top left), "tr" (top right), "bl" (bottom left), or "br" (bottom right).
  • -
-

$this->jquery->corner("#note", "cool tl br");

- -

tablesorter()

- -

description to come

- -

modal()

- -

description to come

- -

calendar()

- -

description to come

- -
- - - - - - - \ No newline at end of file -- cgit v1.2.3-24-g4f1b From d91d0f7544967869248743c7ca663159d93628f5 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Sun, 30 Jan 2011 20:47:42 -0500 Subject: Fixed breadcrumb and removed errand parentheses. --- user_guide/libraries/javascript.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index 55ad18907..18b7181b0 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -2,7 +2,7 @@ -CodeIgniter User Guide : JavaScript Class +JavaScript Driver : CodeIgniter User Guide @@ -42,7 +42,8 @@ CodeIgniter Home  ›  User Guide Home  ›  -Input Class +Drivers  ›  +JavaScript Driver
Search User Guide   
@@ -57,7 +58,7 @@ Input Class

Note: This driver is experimental. Its feature set and implementation may change in future releases.


-

Javascript Class

+

Javascript Driver

CodeIgniter provides a library to help you with certain common functions that you may want to use with Javascript. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.

Initializing the Class

To initialize the Javascript class manually in your controller constructor, use the $this->load->library function. Currently, the only available library is jQuery, which will automatically be loaded like this:

@@ -82,7 +83,7 @@ Input Class

Set the path to the librarys with config items

There are some configuration items in Javascript library. These can either be set in application/config.php, within its own config/javascript.php file, or within any controller usings the set_item() function.

An image to be used as an "ajax loader", or progress indicator. Without one, the simple text message of "loading" will appear when Ajax calls need to be made.

-

$config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/');
+

$config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/';
$config['javascript_ajax_img'] = 'images/ajax-loader.gif';

If you keep your files in the same directories they were downloaded from, then you need not set this configuration items.

-- cgit v1.2.3-24-g4f1b