Permalink
Browse files

Updating doc blocks. Removing old methods from JsHelper.

  • Loading branch information...
1 parent 4b2504d commit 518dd41ca83f92222338c5ebae53ec3e31967fcb @markstory markstory committed Apr 16, 2009
Showing with 6 additions and 73 deletions.
  1. +2 −69 cake/libs/view/helpers/js.php
  2. +4 −4 cake/libs/view/helpers/mootools_engine.php
@@ -98,12 +98,12 @@ function __construct($settings = array()) {
* You can control buffering with the buffer param as well. By setting the last parameter to
* any engine method to a boolean you can force or disable buffering.
*
- * e.g. ```$js->get('#foo')->effect('fadeIn', array('speed' => 'slow'), true);```
+ * e.g. `$js->get('#foo')->effect('fadeIn', array('speed' => 'slow'), true);`
*
* Will force buffering for the effect method. If the method takes an options array you may also add
* a 'buffer' param to the options array and control buffering there as well.
*
- * e.g. ```$js->get('#foo')->event('click', $functionContents, array('buffer' => true));
+ * e.g. `$js->get('#foo')->event('click', $functionContents, array('buffer' => true));`
*
* The buffer parameter will not be passed onto the EngineHelper.
*
@@ -203,73 +203,6 @@ function getBuffer($clear = true) {
}
return $scripts;
}
-/**
- * Loads a remote URL
- *
- * @param string $url
- * @param array $options
- * @return string
- **/
-/* function load_($url = null, $options = array()) {
- if (isset($options['update'])) {
- if (!is_array($options['update'])) {
- $func = "new Ajax.Updater('{$options['update']}',";
- } else {
- $func = "new Ajax.Updater(document.createElement('div'),";
- }
- if (!isset($options['requestHeaders'])) {
- $options['requestHeaders'] = array();
- }
- if (is_array($options['update'])) {
- $options['update'] = join(' ', $options['update']);
- }
- $options['requestHeaders']['X-Update'] = $options['update'];
- } else {
- $func = "new Ajax.Request(";
- }
-
- $func .= "'" . Router::url($url) . "'";
- $ajax =& new AjaxHelper();
- $func .= ", " . $ajax->__optionsForAjax($options) . ")";
-
- if (isset($options['before'])) {
- $func = "{$options['before']}; $func";
- }
- if (isset($options['after'])) {
- $func = "$func; {$options['after']};";
- }
- if (isset($options['condition'])) {
- $func = "if ({$options['condition']}) { $func; }";
- }
- if (isset($options['confirm'])) {
- $func = "if (confirm('" . $this->Javascript->escapeString($options['confirm'])
- . "')) { $func; } else { return false; }";
- }
- return $func;
- }
-
-
-/*
- function get__($name) {
- return $this->__object($name, 'id');
- }
-
- function select($pattern) {
- return $this->__object($pattern, 'pattern');
- }
-
- function real($var) {
- return $this->__object($var, 'real');
- }
-
- function __object($name, $var) {
- if (!isset($this->__objects[$name])) {
- $this->__objects[$name] = new JsHelperObject($this);
- $this->__objects[$name]->{$var} = $name;
- }
- return $this->__objects[$name];
- }
-*/
}
/**
@@ -168,7 +168,7 @@ function effect($name, $options = array()) {
/**
* Create an new Request.
*
- * Requires ```Request```. If you wish to use 'update' key you must have ```Request.HTML```
+ * Requires `Request`. If you wish to use 'update' key you must have ```Request.HTML```
* if you wish to do Json requests you will need ```JSON``` and ```Request.JSON```.
*
* @param mixed $url
@@ -204,7 +204,7 @@ function request($url, $options = array()) {
/**
* Create a sortable element.
*
- * Requires the ```Sortables``` plugin from MootoolsMore
+ * Requires the `Sortables` plugin from MootoolsMore
*
* @param array $options Array of options for the sortable.
* @return string Completed sortable script.
@@ -219,7 +219,7 @@ function sortable($options = array()) {
/**
* Create a Draggable element.
*
- * Requires the ```Drag``` plugin from MootoolsMore
+ * Requires the `Drag` plugin from MootoolsMore
*
* @param array $options Array of options for the draggable.
* @return string Completed draggable script.
@@ -234,7 +234,7 @@ function drag($options = array()) {
/**
* Create a Droppable element.
*
- * Requires the ```Drag``` and ```Drag.Move``` plugins from MootoolsMore
+ * Requires the `Drag` and `Drag.Move` plugins from MootoolsMore
*
* Droppables in Mootools function differently from other libraries. Droppables
* are implemented as an extension of Drag. So in addtion to making a get() selection for

0 comments on commit 518dd41

Please sign in to comment.