summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages/ActiveControls
diff options
context:
space:
mode:
authorctrlaltca <>2012-07-12 11:21:01 +0000
committerctrlaltca <>2012-07-12 11:21:01 +0000
commit903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch)
treee08bf04f0823650a231227ac3499121270172a23 /tests/FunctionalTests/features/protected/pages/ActiveControls
parent3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff)
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages/ActiveControls')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php86
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php66
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php28
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php38
-rw-r--r--tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php70
5 files changed, 144 insertions, 144 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
index b2dd2233..322f4db7 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php
@@ -1,43 +1,43 @@
-<?php
-/*
- * Created on 2/05/2006
- */
-
-class ActiveControl extends TPage
-{
- static private $_colors = array('red', 'green', 'blue', 'purple','black','orange');
-
- public function slowResponse($sender, $param)
- {
- //sleep(1);
- $this->label1->setText("The time is ".time()." from ".$sender->ID);
- $this->label1->setForeColor($this->getColor());
- $this->label1->renderControl($param->getOutput());
-
- $this->button2->setEnabled(true);
-
- $this->panel2->setVisible(true);
- $this->panel1->setBackColor($this->getColor());
- $this->panel1->renderControl($param->getOutput());
- $this->getCallbackClient()->shake($this->panel1);
- }
-
- public function onButtonClicked($sender, $param)
- {
- $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID);
- }
-
- public function fastResponse($sender, $param)
- {
- $this->button2->setEnabled(false);
- $style['color'] = $this->getColor();
- $this->getCallbackClient()->setStyle($this->label2, $style);
- $this->getCallbackClient()->shake($this->label2);
- }
-
- private function getColor()
- {
- return self::$_colors[rand(0,count(self::$_colors)-1)];
- }
-}
-?>
+<?php
+/*
+ * Created on 2/05/2006
+ */
+
+class ActiveControl extends TPage
+{
+ static private $_colors = array('red', 'green', 'blue', 'purple','black','orange');
+
+ public function slowResponse($sender, $param)
+ {
+ //sleep(1);
+ $this->label1->setText("The time is ".time()." from ".$sender->ID);
+ $this->label1->setForeColor($this->getColor());
+ $this->label1->renderControl($param->getOutput());
+
+ $this->button2->setEnabled(true);
+
+ $this->panel2->setVisible(true);
+ $this->panel1->setBackColor($this->getColor());
+ $this->panel1->renderControl($param->getOutput());
+ $this->getCallbackClient()->shake($this->panel1);
+ }
+
+ public function onButtonClicked($sender, $param)
+ {
+ $this->label2->setText("Muahaha !!! the time is ".time()." from ".$sender->ID);
+ }
+
+ public function fastResponse($sender, $param)
+ {
+ $this->button2->setEnabled(false);
+ $style['color'] = $this->getColor();
+ $this->getCallbackClient()->setStyle($this->label2, $style);
+ $this->getCallbackClient()->shake($this->label2);
+ }
+
+ private function getColor()
+ {
+ return self::$_colors[rand(0,count(self::$_colors)-1)];
+ }
+}
+?>
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php
index 3474234e..ac08e4ed 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/AutoComplete.php
@@ -1,34 +1,34 @@
-<?php
-/*
- * Created on 7/05/2006
- */
-
-class AutoComplete extends TPage
-{
- public function suggestCountries($sender, $param)
- {
- $sender->setDataSource($this->matchCountries($param->getParameter()));
- $sender->dataBind();
- $sender->render($param->getOutput());
- }
-
- protected function matchCountries($token)
- {
- $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en');
- $list = array();
- $count = 0;
- $token = strtolower($token);
- foreach($info->getCountries() as $country)
- {
- if(strpos(strtolower($country), $token) === 0)
- {
- $list[] = $country;
- $count++;
- if($count > 10) break;
- }
- }
- return $list;
- }
-}
-
+<?php
+/*
+ * Created on 7/05/2006
+ */
+
+class AutoComplete extends TPage
+{
+ public function suggestCountries($sender, $param)
+ {
+ $sender->setDataSource($this->matchCountries($param->getParameter()));
+ $sender->dataBind();
+ $sender->render($param->getOutput());
+ }
+
+ protected function matchCountries($token)
+ {
+ $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en');
+ $list = array();
+ $count = 0;
+ $token = strtolower($token);
+ foreach($info->getCountries() as $country)
+ {
+ if(strpos(strtolower($country), $token) === 0)
+ {
+ $list[] = $country;
+ $count++;
+ if($count > 10) break;
+ }
+ }
+ return $list;
+ }
+}
+
?> \ 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
index 9821d8c9..7afd1d59 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator.php
@@ -1,15 +1,15 @@
-<?php
-/*
- * Created on 6/05/2006
- */
-Prado::using('System.Web.UI.ActiveControls.*');
-
-class Calculator extends TPage
-{
- public function do_sum($sender, $param)
- {
- $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text);
- }
-}
-
+<?php
+/*
+ * Created on 6/05/2006
+ */
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Calculator extends TPage
+{
+ public function do_sum($sender, $param)
+ {
+ $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text);
+ }
+}
+
?> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php
index df07440f..3789a3f9 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.php
@@ -1,20 +1,20 @@
-<?php
-/*
- * Created on 13/05/2006
- */
-
-class Calculator2 extends TPage
-{
- public function do_sum($sender, $param)
- {
- $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text);
- }
-
- public function update_callback($sender, $param)
- {
- $this->do_sum($this->sum, null);
- $this->panel1->renderControl($param->Output);
- }
-}
-
+<?php
+/*
+ * Created on 13/05/2006
+ */
+
+class Calculator2 extends TPage
+{
+ public function do_sum($sender, $param)
+ {
+ $this->c->Text = floatval($this->a->Text) + floatval($this->b->Text);
+ }
+
+ public function update_callback($sender, $param)
+ {
+ $this->do_sum($this->sum, null);
+ $this->panel1->renderControl($param->Output);
+ }
+}
+
?> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
index 0c9b16d5..1b1d0cbc 100644
--- a/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
+++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/VisibleUpdate.php
@@ -1,36 +1,36 @@
-<?php
-/*
- * Created on 13/05/2006
- */
-
-class VisibleUpdate extends TPage
-{
- function click1($sender)
- {
- $this->label1->setText($this->getButtonState($sender));
-
- //$this->button1->setEnabled(false);
- $this->button1->setVisible(false);
- // $this->button2->setEnabled(true);
- $this->button2->setVisible(true);
- }
-
- function click2($sender)
- {
- $this->label1->setText($this->getButtonState($sender));
-
- // $this->button1->setEnabled(true);
- $this->button1->setVisible(true);
- /// $this->button2->setEnabled(false);
- $this->button2->setVisible(false);
- }
-
- protected function getButtonState($button)
- {
- return "Before you clicked on ".$button->Text.
- ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled').
- " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled');
- }
-}
-
+<?php
+/*
+ * Created on 13/05/2006
+ */
+
+class VisibleUpdate extends TPage
+{
+ function click1($sender)
+ {
+ $this->label1->setText($this->getButtonState($sender));
+
+ //$this->button1->setEnabled(false);
+ $this->button1->setVisible(false);
+ // $this->button2->setEnabled(true);
+ $this->button2->setVisible(true);
+ }
+
+ function click2($sender)
+ {
+ $this->label1->setText($this->getButtonState($sender));
+
+ // $this->button1->setEnabled(true);
+ $this->button1->setVisible(true);
+ /// $this->button2->setEnabled(false);
+ $this->button2->setVisible(false);
+ }
+
+ protected function getButtonState($button)
+ {
+ return "Before you clicked on ".$button->Text.
+ ", Button 1 was ".($this->button1->Enabled ? 'enabled' : 'disabled').
+ " and Button 2 was ".($this->button2->Enabled ? 'enabled' : 'disabled');
+ }
+}
+
?> \ No newline at end of file