Adding fix for AjaxHelper::drag() (Ticket #1906), and adding AjaxHelper test case

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4369 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-31 23:48:51 +00:00
parent 0698b9cdf6
commit 8ed5dc6694

View file

@ -522,9 +522,8 @@ class AjaxHelper extends AppHelper {
$var = 'var ' . $options['var'] . ' = ';
unset($options['var']);
}
$options = $this->_optionsToString($options, array('handle', 'constraint'));
$options = $this->_buildOptions($options, $this->dragOptions);
return $this->Javascript->codeBlock("{$var}new Draggable('$id', " . $this->_optionsForDraggable($options) . ");");
$options = $this->_buildOptions($this->_optionsToString($options, array('handle', 'constraint')), $this->dragOptions);
return $this->Javascript->codeBlock("{$var}new Draggable('$id', " .$options . ");");
}
/**
* For a reference on the options for this function, check out