diff options
author | Jonatas Miguel <jonatas.df.miguel@gmail.com> | 2012-10-24 19:30:36 +0200 |
---|---|---|
committer | Jonatas Miguel <jonatas.df.miguel@gmail.com> | 2012-10-24 19:30:36 +0200 |
commit | b51823dde5fbae508b8ebf99258d2f514a8bece8 (patch) | |
tree | 4db09a22f85e0ddf151c940cd3e6fbaa799b8513 /system/libraries/Javascript.php | |
parent | a53f402b78ad07fb0f6da19cff0c7bec3a09a4c0 (diff) | |
parent | a7001e968a4791312391eb245ad84888893cda8f (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Conflicts:
user_guide_src/source/changelog.rst
Diffstat (limited to 'system/libraries/Javascript.php')
-rw-r--r-- | system/libraries/Javascript.php | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 5c8b09217..60309cd83 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -38,6 +38,12 @@ class CI_Javascript { protected $_javascript_location = 'js'; + /** + * Constructor + * + * @param array $params = array() + * @return void + */ public function __construct($params = array()) { $defaults = array('js_library_driver' => 'jquery', 'autoload' => TRUE); @@ -312,8 +318,7 @@ class CI_Javascript { * * Outputs a javascript library mouseup event * - * @param string The element to attach the event to - * @param string The code to execute + * @param string $js Code to execute * @return string */ public function ready($js) @@ -394,9 +399,10 @@ class CI_Javascript { * * Outputs a javascript library animate event * - * @param string - element - * @param string - One of 'slow', 'normal', 'fast', or time in milliseconds - * @param string - Javascript callback function + * @param string $element = 'this' + * @param array $params = array() + * @param mixed $speed 'slow', 'normal', 'fast', or time in milliseconds + * @param string $extra * @return string */ public function animate($element = 'this', $params = array(), $speed = '', $extra = '') @@ -546,10 +552,11 @@ class CI_Javascript { * * Outputs a javascript library toggle class event * - * @param string - element + * @param string $element = 'this' + * @param string $class = '' * @return string */ - public function toggleClass($element = 'this', $class='') + public function toggleClass($element = 'this', $class = '') { return $this->js->_toggleClass($element, $class); } @@ -579,7 +586,8 @@ class CI_Javascript { * * gather together all script needing to be output * - * @param string The element to attach the event to + * @param string $view_var = 'script_foot' + * @param bool $script_tags = TRUE * @return string */ public function compile($view_var = 'script_foot', $script_tags = TRUE) @@ -587,6 +595,8 @@ class CI_Javascript { $this->js->_compile($view_var, $script_tags); } + // -------------------------------------------------------------------- + /** * Clear Compile * @@ -606,7 +616,8 @@ class CI_Javascript { * * Outputs a <script> tag with the source as an external js file * - * @param string The element to attach the event to + * @param string $external_file = '' + * @param bool $relative = FALSE * @return string */ public function external($external_file = '', $relative = FALSE) @@ -799,7 +810,8 @@ class CI_Javascript { * * Ensures a standard json value and escapes values * - * @param mixed + * @param mixed $result + * @param bool $is_key = FALSE * @return string */ protected function _prep_args($result, $is_key = FALSE) |