summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls
diff options
context:
space:
mode:
authorwei <>2006-12-05 23:37:07 +0000
committerwei <>2006-12-05 23:37:07 +0000
commit33b2284955a8f0015922d4c69c5082141b584f27 (patch)
treee23b3805a8c1e3dd70076ae36d2e4733f11d56bc /tests/FunctionalTests/active-controls
parent176ee7e9b6c69cf42e7afeeb03db602237a49bc3 (diff)
load the inlineeditor textbox in client side onload.
Diffstat (limited to 'tests/FunctionalTests/active-controls')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page16
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php53
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Home.php11
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page78
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php13
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Master1.php7
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Master1.tpl14
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page14
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page10
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php11
10 files changed, 227 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
new file mode 100644
index 00000000..f4bf644c
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.page
@@ -0,0 +1,16 @@
+<com:TForm>
+
+<com:TLabel ForControl="DDropTurno" Text="Turno:"/>
+<com:TActiveDropDownList ID="DDropTurno"
+ onSelectedIndexChanged="trocaTurno" AutoPostBack="true"/>
+
+<com:TLabel Text="Código:" ForControl="Codigo"/>
+<com:TActiveTextBox ID="Codigo" MaxLength="10" Columns="2"/>
+
+<com:TLabel Text="Descrição:" ForControl="Descricao"/>
+<com:TActiveTextBox ID="Descricao" MaxLength="25" Columns="25"/>
+
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php
new file mode 100644
index 00000000..d31c10f6
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/GerTurno2.php
@@ -0,0 +1,53 @@
+<?php
+
+class GerTurno2 extends TPage {
+
+ private $_turnos = null;
+
+
+ public function onLoad($param) {
+ parent::onLoad($param);
+
+ $this->loadTurnoOptions();
+
+ if (!$this->IsPostBack) {
+ $this->ativaModoEdicao();
+ }
+ }
+
+
+ protected function loadTurnoOptions()
+ {
+ $this->DDropTurno->DataTextField="descricao";
+ $this->DDropTurno->DataValueField="id";
+ $this->_turnos = array(
+ array('id' => 1, 'codigo'=>'test 1', 'descricao' => 'hello 1'),
+ array('id' => 2, 'codigo'=>'test 2', 'descricao' => 'hello 2')
+ );
+ $this->DDropTurno->setDataSource($this->_turnos);
+ $this->DDropTurno->dataBind();
+ }
+
+
+ protected function ativaModoEdicao() {
+ $this->loadDadosTurno($this->DDropTurno->getSelectedValue());
+ }
+
+
+ protected function loadDadosTurno($id) {
+ foreach ($this->_turnos as $key => $tur) {
+ if ($tur['id'] == $id) {
+ $this->Codigo->setText($tur['codigo']);
+ $this->Descricao->setText($tur['descricao']);
+ }
+ }
+ }
+
+
+ public function trocaTurno($sender,$param) {
+ $this->loadDadosTurno($sender->getSelectedValue());
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Home.php b/tests/FunctionalTests/active-controls/protected/pages/Home.php
new file mode 100644
index 00000000..22b6528a
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends TPage
+{
+ public function btnTest_OnCallback($sender,$param)
+ {
+ $this->lblTest->Text = "Testing";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
new file mode 100644
index 00000000..ba3a35db
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.page
@@ -0,0 +1,78 @@
+
+<style>
+ .textbox
+ {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 1.2em;
+ display: block;
+ width: 20em;
+ }
+
+ .textbox
+ {
+ padding: 2px 0px 4px 2px;
+ border:1px solid #eee;
+ }
+
+
+ input.textbox
+ {
+ background-color: #ffc;
+ }
+ .loader
+ {
+ position:absolute;
+ right:0px;
+ top:0px;
+ color:white;
+ background-color:#900;
+ padding: 0.5em 1em;
+ }
+ input.required
+ {
+ border: 1px solid red;
+ background-color: pink;
+ }
+</style>
+
+<com:TForm>
+ <com:TInPlaceTextBox
+ ID="Firstname"
+ Text="firstname"
+ CssClass="textbox"
+ ValidationGroup="Group"
+ />
+ <com:TRequiredFieldValidator
+ ControlToValidate="Firstname"
+ ErrorMessage="Firstname required"
+ InitialValue="firstname"
+ ValidationGroup="Group"
+ />
+ <br />
+ <com:TTextBox
+ ID="Lastname"
+ Text="lastname"
+ />
+ <com:TRequiredFieldValidator
+ ControlToValidate="Lastname"
+ ErrorMessage="Lastname required"
+ InitialValue="lastname"
+ ValidationGroup="Group"
+ />
+ <br />
+ <com:TActiveButton ID="active_button"
+ Text="Active Submit"
+ ValidationGroup="Group"
+ CausesValidation="true"
+ OnCallback="button_valid"
+ />
+ <com:TButton ID="passive_button"
+ Text="Passive Submit"
+ ValidationGroup="Group"
+ CausesValidation="true"
+ OnClick="button_valid"
+ />
+ <br />
+ <com:TActiveLabel ID="status" Text="Status:" />
+ <com:TJavascriptLogger />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php
new file mode 100644
index 00000000..e69ffdf2
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/InPlaceWithValidator.php
@@ -0,0 +1,13 @@
+<?php
+
+class InPlaceWithValidator extends TPage
+{
+ function button_valid($sender, $param){
+
+ $this->status->Text = "Status: ". $this->Firstname->Text.".".$this->Lastname->Text;
+
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.php b/tests/FunctionalTests/active-controls/protected/pages/Master1.php
new file mode 100644
index 00000000..173a59f0
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.php
@@ -0,0 +1,7 @@
+<?php
+
+class Master1 extends TTemplateControl
+{
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl b/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl
new file mode 100644
index 00000000..5e63d57d
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Master1.tpl
@@ -0,0 +1,14 @@
+...
+<com:TPanel ID="blockMenu">
+ <com:TContentPlaceHolder ID="cphPnlMenu" />
+</com:TPanel>
+
+<com:TPanel ID="blockContent">
+ <com:TContentPlaceHolder ID="cphPnlMain" />
+</com:TPanel>
+
+<com:TPanel ID="blockLogin">
+ <com:TContentPlaceHolder ID="cphPnlLogin" />
+</com:TPanel>
+
+... \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page b/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page
new file mode 100644
index 00000000..7f6863cf
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/MasterTest1.page
@@ -0,0 +1,14 @@
+<%@ MasterClass="Application.pages.Master1" %>
+<com:TContent ID="cphPnlMenu">
+men
+</com:TContent>
+
+<com:TContent ID="cphPnlLogin">
+<fieldset>
+ [color=red]<problem>[/color]
+</fieldset>
+</com:TContent>
+
+<com:TContent ID="cphPnlMain">
+ad
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
new file mode 100644
index 00000000..2ce98f5b
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.page
@@ -0,0 +1,10 @@
+<com:TForm>
+
+<h1>Null State Test</h1>
+
+<com:TActiveLabel ID="lblTest"/>
+<com:TActiveButton OnCallback="btnTest_OnCallback" Text="Clickme"/>
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php
new file mode 100644
index 00000000..0abd8eb5
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/NullStateTest.php
@@ -0,0 +1,11 @@
+<?php
+
+class NullStateTest extends TPage
+{
+ public function btnTest_OnCallback($sender,$param)
+ {
+ $this->lblTest->Text = "Testing";
+ }
+}
+
+?> \ No newline at end of file