From 3c24d31c69dffb6f65214b6d383d446ac122ff14 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 13 Dec 2006 10:07:37 +0000 Subject: Fixed #488. --- .../protected/pages/CustomValidatorByPass.page | 37 +++++++++++++++++++ .../protected/pages/CustomValidatorByPass.php | 37 +++++++++++++++++++ .../active-controls/protected/pages/MyControl.php | 8 +++++ .../active-controls/protected/pages/MyControl.tpl | 9 +++++ .../protected/pages/MyTabPanelTest.page | 41 +++++++++++++++++++++ .../protected/pages/MyTabPanelTest.php | 42 ++++++++++++++++++++++ 6 files changed, 174 insertions(+) create mode 100644 tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/MyControl.php create mode 100644 tests/FunctionalTests/active-controls/protected/pages/MyControl.tpl create mode 100644 tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page create mode 100644 tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php (limited to 'tests/FunctionalTests/active-controls') diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page new file mode 100644 index 00000000..5cacf2ef --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page @@ -0,0 +1,37 @@ + + +

Custom Login

+ + + + + + +
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php new file mode 100644 index 00000000..e88f10de --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.php @@ -0,0 +1,37 @@ +validator2->getActiveControl()->getClientSide(); + + $Client->setOnLoading('$(\'loginLoader\').show();'); + $Client->setOnComplete('$(\'loginLoader\').hide();'); + + //$Client->setOnValidationError('alert(\'Authentication Failed\');'); + $Client->setOnValidationSuccess('new Effect.Fade(\'loginBox\')'); + + } + + public function validateUser($sender,$param) + { + $param->IsValid = $this->Password->Text=='test'; + } + + public function doLogin($sender,$param) + { + + /* This isnt even getting called */ + if($this->Page->IsValid) + { + // Re-Render the active panel + } + + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyControl.php b/tests/FunctionalTests/active-controls/protected/pages/MyControl.php new file mode 100644 index 00000000..2c6b7f5b --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/MyControl.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyControl.tpl b/tests/FunctionalTests/active-controls/protected/pages/MyControl.tpl new file mode 100644 index 00000000..5cc17772 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/MyControl.tpl @@ -0,0 +1,9 @@ +
+ +

+
+ + This is just some text.
+ This is just some text.
+
+
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page new file mode 100644 index 00000000..7371086a --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.page @@ -0,0 +1,41 @@ + + +

My Tab Panel Test

+ + + + + + This is the contents of panel A + + + + + This is the contents of panel B + + + + This is the contents of panel C + + + + +
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php new file mode 100644 index 00000000..723af42d --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/MyTabPanelTest.php @@ -0,0 +1,42 @@ +panels as $panel) + { + if($id == $panel) + { + $this->$panel->setAttribute('style', 'display: block;'); + $this->$panel->setVisible(true); + $this->$panel->render($param->NewWriter); + } + else + { + $this->$panel->setVisible(false); + } + } + } + + public function onShowPanelA($sender, $param) + { + $this->showPanel('pnlContentsA', $param); + } + + public function onShowPanelB($sender, $param) + { + $this->showPanel('pnlContentsB', $param); + } + + public function onShowPanelC($sender, $param) + { + $this->showPanel('pnlContentsC', $param); + } +} + + + +?> \ No newline at end of file -- cgit v1.2.3