summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/DMessagesPanel.php
diff options
context:
space:
mode:
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