summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php
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/protected/pages/DMessagesPanel.php
parent6c2a7b9b5674c5c9f0c8e78e32531af43462638c (diff)
Update docs.
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php63
1 files changed, 63 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