summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
authorwei <>2007-01-06 00:00:57 +0000
committerwei <>2007-01-06 00:00:57 +0000
commitbde6488e19b9852011a657fda8aa39680d9c4a62 (patch)
tree4550e521558ddde1e4c42c9d992501beda48b489 /tests/FunctionalTests/active-controls
parent6c2a7b9b5674c5c9f0c8e78e32531af43462638c (diff)
Update docs.
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php63
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.tpl4
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page7
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php17
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page7
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php16
6 files changed, 114 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php
new file mode 100644
index 00000000..d318660d
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php
@@ -0,0 +1,63 @@
+<?php
+
+class DMessagesPanel extends TTemplateControl
+{
+ private $_panelCssClass = '';
+
+ public function onInit($param)
+ {
+ parent::onInit($param);
+ $this->MessagesPanelEffect->Text = "";
+ }
+
+ public function setMessage($value)
+ {
+ $this->Message->Text = $value;
+ if ($value != '')
+ $this->setVisible(true);
+ else
+ $this->setVisible(false);
+ }
+
+ public function setVisible($value)
+ {
+ $this->ensureChildControls();
+ if ($value === true) {
+ echo "set visible";
+ $this->MessagesPanel->Visible = true;
+ $this->Message->Visible = true;
+ $this->setEffect(null);
+ } else {
+ $this->MessagesPanel->Visible = false;
+ }
+ }
+
+ public function setEffect($effect = null)
+ {
+ if ($effect !== null) {
+ $text = "<script type=\"text/javascript\" language=\"javascript\">\r\n";
+ $text .= "// <![CDATA[\r\n";
+ //$text .= "new Effect.$effect(\"" . $this->Page->DMessagesPanel->MessagesPanel->ClientID . "\");\r\n";
+ $text .= "new Effect.$effect(\"" . $this->ClientID . "\");\r\n";
+ $text .= "// ]]>\r\n";
+ $text .= "</script>";
+ $this->MessagesPanelEffect->Text = $text;
+ } else {
+ $this->MessagesPanelEffect->Text = '';
+ }
+ }
+
+ public function setPanelCssClass($value)
+ {
+ $this->ensureChildControls();
+ $this->MessagesPanel->CssClass = $value;
+ }
+
+ public function setMessageCssClass($value)
+ {
+ $this->ensureChildControls();
+ $this->Message->CssClass = $value;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.tpl b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.tpl
new file mode 100644
index 00000000..b7e73119
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.tpl
@@ -0,0 +1,4 @@
+<com:TActivePanel ID="MessagesPanel" Visible="true">
+ <com:TActiveLabel ID="Message" Visible="true"/>
+</com:TActivePanel>
+<com:TLiteral ID="MessagesPanelEffect"/> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page
new file mode 100644
index 00000000..8b39dc55
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.page
@@ -0,0 +1,7 @@
+<com:TForm>
+<h1>DatePicker in Callback</h1>
+
+<com:TDatePicker ID="datepicker" />
+<com:TActiveLinkButton OnCallback="testDatePicker" Text="testDatePicker" />
+<com:TActiveLabel ID="status" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php
new file mode 100644
index 00000000..94a4ec25
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DatePickerInCallback.php
@@ -0,0 +1,17 @@
+<?php
+
+class DatePickerInCallback extends TPage {
+
+ public function onLoad($param){
+ parent::onLoad($param);
+ if(!$this->IsPostBack)
+ $this->datepicker->setTimeStamp(time());
+ }
+
+ public function testDatePicker($sender, $param){
+ $this->status->Text = $this->datepicker->getTimestamp()." ".$this->datepicker->getText();
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page
new file mode 100644
index 00000000..ab4798a8
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.page
@@ -0,0 +1,7 @@
+<com:TForm>
+
+<com:Application.pages.DMessagesPanel ID="panel1" PanelCssClass="one1" />
+<com:TActiveButton Text="Show" OnClick="show_clicked" />
+<com:TActiveButton Text="Hide" OnClick="hide_clicked" />
+<com:TJavascriptLogger />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php
new file mode 100644
index 00000000..9a59713d
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/MessagesPanelTest.php
@@ -0,0 +1,16 @@
+<?php
+
+class MessagesPanelTest extends TPage
+{
+ function show_clicked($sender, $param)
+ {
+ $this->panel1->setMessage("hello world");
+ }
+
+ function hide_clicked($sender, $param)
+ {
+ $this->panel1->setMessage("");
+ }
+}
+
+?> \ No newline at end of file