From a7f6c6640ac9295eec3ae2edbb2250179eb85e33 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Sat, 6 May 2006 02:26:20 +0000
Subject: Adding TActiveButton and TActiveTextBox
---
.../pages/ActiveControls/ActiveControl.page | 24 ++++++++----------
.../pages/ActiveControls/ActiveControl.php | 8 ++++--
.../protected/pages/ActiveControls/Calculator.page | 29 ++++++++++++++++++++++
.../protected/pages/ActiveControls/Calculator.php | 14 +++++++++++
4 files changed, 59 insertions(+), 16 deletions(-)
create mode 100644 tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.page
create mode 100644 tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php
(limited to 'tests/FunctionalTests')
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
index c98bae4d..fab91c40 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page
@@ -1,16 +1,16 @@
TCallback Demo
-
-
-
-
+
+
+
+
@@ -24,7 +24,9 @@
-
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
index ace6291b..47bab3cc 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
@@ -9,7 +9,7 @@ class ActiveControl extends TPage
public function slowResponse($sender, $param)
{
- sleep(3);
+ sleep(1);
$this->label1->setText("The time is ".time()." from ".$sender->ID);
$this->label1->setForeColor($this->getColor());
$this->label1->renderControl($param->getOutput());
@@ -20,9 +20,13 @@ class ActiveControl extends TPage
$this->getCallbackClient()->shake($this->panel1);
}
- public function fastResponse($sender, $param)
+ public function onButtonClicked($sender, $param)
{
$this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID);
+ }
+
+ public function fastResponse($sender, $param)
+ {
$style['color'] = $this->getColor();
$this->getCallbackClient()->setStyle($this->label2, $style);
$this->getCallbackClient()->shake($this->label2);
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.page b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.page
new file mode 100644
index 00000000..e3dcb707
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.page
@@ -0,0 +1,29 @@
+
+ Callback Enabled Calculator
+
+
+ +
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php
new file mode 100644
index 00000000..bcf0f9cd
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php
@@ -0,0 +1,14 @@
+c->Text = floatval($this->a->Text) + floatval($this->b->Text);
+ }
+}
+
+?>
\ No newline at end of file
--
cgit v1.2.3