From 077d1c5ad50dcfb66f3e601663eedd879af079a5 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 20 Oct 2010 22:07:53 -0400 Subject: [PATCH] Applying patch from 'hashmich' to fix issues with slideUp and slideDown effects in prototype engine. Tests updated. Fixes #1213 --- cake/libs/view/helpers/prototype_engine.php | 2 +- .../cases/libs/view/helpers/prototype_engine.test.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cake/libs/view/helpers/prototype_engine.php b/cake/libs/view/helpers/prototype_engine.php index 8840f52a0..eefd4b4bf 100644 --- a/cake/libs/view/helpers/prototype_engine.php +++ b/cake/libs/view/helpers/prototype_engine.php @@ -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': diff --git a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php b/cake/tests/cases/libs/view/helpers/prototype_engine.test.php index 24fc5ff18..479b55f83 100644 --- a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/prototype_engine.test.php @@ -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); }