Skip to content
Permalink
Browse files

Removing unsupported options from PrototypeEngine. Fixes #1516

  • Loading branch information...
markstory committed Feb 8, 2011
1 parent 5841165 commit 9a940709abc24f0c97bd32973ffdc5639e91fc01
@@ -45,10 +45,8 @@ class PrototypeEngineHelper extends JsBaseEngineHelper {
'error' => 'onFailure'
),
'sortable' => array(
'start' => 'onStart',
'sort' => 'onChange',
'complete' => 'onUpdate',
'distance' => 'snap',
),
'drag' => array(
'snapGrid' => 'snap',
@@ -262,6 +260,9 @@ function request($url, $options = array()) {
*
* #### Note: Requires scriptaculous to be loaded.
*
* The scriptaculous implementation of sortables does not suppot the 'start'
* and 'distance' options.
*
* @param array $options Array of options for the sortable.
* @return string Completed sortable script.
* @access public
@@ -268,13 +268,11 @@ function testRequest() {
function testSortable() {
$this->Proto->get('#myList');
$result = $this->Proto->sortable(array(
'distance' => 5,
'start' => 'onStart',
'complete' => 'onComplete',
'sort' => 'onSort',
'wrapCallbacks' => false
));
$expected = 'var jsSortable = Sortable.create($("myList"), {onChange:onSort, onStart:onStart, onUpdate:onComplete, snap:5});';
$expected = 'var jsSortable = Sortable.create($("myList"), {onChange:onSort, onUpdate:onComplete});';
$this->assertEqual($result, $expected);
}

0 comments on commit 9a94070

Please sign in to comment.
You can’t perform that action at this time.