Skip to content

Commit

Permalink
Updating doc blocks. Removing old methods from JsHelper.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 16, 2009
1 parent 4b2504d commit 518dd41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 73 deletions.
71 changes: 2 additions & 69 deletions cake/libs/view/helpers/js.php
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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];
}
*/
}

/**
Expand Down
8 changes: 4 additions & 4 deletions cake/libs/view/helpers/mootools_engine.php
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 518dd41

Please sign in to comment.