summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket598.page17
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket598.php19
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket603.page9
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket603.php30
4 files changed, 75 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket598.page b/tests/FunctionalTests/tickets/protected/pages/Ticket598.page
new file mode 100644
index 00000000..7d618ff1
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket598.page
@@ -0,0 +1,17 @@
+<com:TContent ID="Content">
+
+Time : <com:TActiveLabel id="Lbl"/><br/>
+
+<com:TActiveButton OnCallback="startBigTask" Text="Start Big Task" ClientSide.HasPriority="false">
+ <prop:ClientSide.OnLoading>
+ Prado.WebUI.TTimeTriggeredCallback.start('<%= $this->Timer->ClientID %>')
+ </prop:ClientSide.OnLoading>
+ <prop:ClientSide.OnComplete>
+ Prado.WebUI.TTimeTriggeredCallback.stop('<%= $this->Timer->ClientID %>')
+ </prop:ClientSide.OnComplete>
+</com:TActiveButton>
+
+<com:TTimeTriggeredCallback Id="Timer" Interval="0.5" OnCallback="updateLbl" StartTimerOnLoad="false"/>
+
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket598.php b/tests/FunctionalTests/tickets/protected/pages/Ticket598.php
new file mode 100644
index 00000000..0456725f
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket598.php
@@ -0,0 +1,19 @@
+<?php
+Prado::using('System.Web.UI.ActiveControls.*');
+class Ticket598 extends TPage
+{
+public function onLoad ($param) {
+ parent::onLoad($param);
+ if (!$this->isPostBack and !$this->isCallBack) {
+ $this->Lbl->setText(date("h:m:s"));
+ }
+ }
+ public function startBigTask ($sender, $param) {
+ sleep(10); // Simulate task
+ }
+
+ public function updateLbl($sender, $param) {
+ $this->Lbl->SetText(date("h:m:s"));
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket603.page b/tests/FunctionalTests/tickets/protected/pages/Ticket603.page
new file mode 100644
index 00000000..d5023adc
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket603.page
@@ -0,0 +1,9 @@
+<com:TContent ID="Content">
+
+<com:TActiveButton ID="switchContentTypeButton"
+ Text="change" onClick="switchContentTypeClicked" onCallBack="switchContentTypeCallback" />
+<com:TActivePanel ID="ContentPanel" >
+ <com:THtmlArea ID="EditHtmlTextBox" />
+</com:TActivePanel>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket603.php b/tests/FunctionalTests/tickets/protected/pages/Ticket603.php
new file mode 100644
index 00000000..6af0cf6d
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket603.php
@@ -0,0 +1,30 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Ticket603 extends TPage
+{
+ protected $_isHtml;
+
+ public function onLoad($param) {
+ parent::onLoad($param);
+ $this->_isHtml = true;
+ }
+
+ public function switchContentTypeClicked( $sender, $param ) {
+ $this->_isHtml = !$this->_isHtml;
+ if ( $this->_isHtml ) {
+ $this->EditHtmlTextBox->EnableVisualEdit = true;
+ $this->EditHtmlTextBox->Text = '<b>somehtml</b>';
+ } else {
+ $this->EditHtmlTextBox->EnableVisualEdit = false;
+ $this->EditHtmlTextBox->Text = 'plai bla bla';
+ }
+ }
+
+ public function switchContentTypeCallback( $sender, $param ) {
+ $this->ContentPanel->render( $param->NewWriter );
+ }
+}
+
+?> \ No newline at end of file