Permalink
Browse files

Applying patch from 'hashmich' to fix issues with slideUp and slideDo…

…wn effects in prototype engine.

Tests updated.
Fixes #1213
  • Loading branch information...
markstory committed Oct 21, 2010
1 parent ffc77aa commit 077d1c5ad50dcfb66f3e601663eedd879af079a5
@@ -211,7 +211,7 @@ function effect($name, $options = array()) {
break;
case 'slideIn':
case 'slideOut':
- $name = ($name == 'slideIn') ? 'slideDown' : 'slideUp';
+ $name = ($name == 'slideIn') ? 'SlideDown' : 'SlideUp';
$effect = 'Effect.' . $name . '(' . $this->selection . $optionString . ');';
break;
case 'fadeIn':
@@ -153,19 +153,19 @@ function testEffect() {
$this->assertEqual($result, $expected);
$result = $this->Proto->effect('slideIn');
- $expected = 'Effect.slideDown($("foo"));';
+ $expected = 'Effect.SlideDown($("foo"));';
$this->assertEqual($result, $expected);
$result = $this->Proto->effect('slideOut');
- $expected = 'Effect.slideUp($("foo"));';
+ $expected = 'Effect.SlideUp($("foo"));';
$this->assertEqual($result, $expected);
$result = $this->Proto->effect('slideOut', array('speed' => 'fast'));
- $expected = 'Effect.slideUp($("foo"), {duration:0.50000000000});';
+ $expected = 'Effect.SlideUp($("foo"), {duration:0.50000000000});';
$this->assertEqual($result, $expected);
$result = $this->Proto->effect('slideOut', array('speed' => 'slow'));
- $expected = 'Effect.slideUp($("foo"), {duration:2});';
+ $expected = 'Effect.SlideUp($("foo"), {duration:2});';
$this->assertEqual($result, $expected);
}

0 comments on commit 077d1c5

Please sign in to comment.