mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Applying patch from 'hashmich' to fix issues with slideUp and slideDown effects in prototype engine.
Tests updated. Fixes #1213
This commit is contained in:
parent
ffc77aa588
commit
077d1c5ad5
2 changed files with 5 additions and 5 deletions
|
@ -211,7 +211,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper {
|
|||
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 @@ class PrototypeEngineHelperTestCase extends CakeTestCase {
|
|||
$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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue