summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket413.page65
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket413.php31
2 files changed, 96 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket413.page b/tests/FunctionalTests/tickets/protected/pages/Ticket413.page
new file mode 100644
index 00000000..90f8226c
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket413.page
@@ -0,0 +1,65 @@
+<com:TContent ID="Content">
+
+<style>
+ .textbox
+ {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 1.0em;
+ display: block;
+ width: 33em;
+ }
+
+ .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>
+
+<span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>
+
+<br /><br />
+
+
+<com:TDataGrid ID="locations_datagrid" AutoGenerateColumns="false">
+ <com:TTemplateColumn ID="PublisherColumn">
+ <prop:HeaderTemplate>
+ To edit an existing location name simply edit one of the fields below:
+ </prop:HeaderTemplate>
+ <prop:ItemTemplate>
+ <com:TInPlaceTextBox id="edit_id"
+ OnTextChanged="Page.bla"
+ CssClass="textbox"
+ Text="<%#$this->Parent->DataItem['name']%>">
+ <prop:ActiveControl.ClientSide
+ OnLoading="Element.show('loader')"
+ OnComplete="Element.hide('loader')" />
+ </com:TInPlaceTextBox>
+ </prop:ItemTemplate>
+ </com:TTemplateColumn>
+</com:TDataGrid>
+
+<br /><br />
+<com:TActiveLabel ID="status" Text="Status:" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket413.php b/tests/FunctionalTests/tickets/protected/pages/Ticket413.php
new file mode 100644
index 00000000..1da32b52
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket413.php
@@ -0,0 +1,31 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Ticket413 extends TPage
+{
+ private $_data = array(
+ array('id'=>'ITN001','name'=>'Motherboard','quantity'=>1,'price'=>100.00,'imported'=>true),
+ array('id'=>'ITN002','name'=>'CPU','quantity'=>1,'price'=>150.00,'imported'=>true),
+ array('id'=>'ITN003','name'=>'Harddrive','quantity'=>2,'price'=>80.00,'imported'=>true),
+ array('id'=>'ITN004','name'=>'Sound card','quantity'=>1,'price'=>40.00,'imported'=>false));
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+
+ if (!$this->IsPostBack)
+ {
+ $this->locations_datagrid->setDataSource($this->_data);
+ $this->locations_datagrid->dataBind();
+ }
+
+ }
+
+ public function bla($sender, $param)
+ {
+ $sender->Text = 'a';
+ }
+
+}
+
+?> \ No newline at end of file