summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php
diff options
context:
space:
mode:
authorctrlaltca <>2012-07-12 11:21:01 +0000
committerctrlaltca <>2012-07-12 11:21:01 +0000
commit903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch)
treee08bf04f0823650a231227ac3499121270172a23 /demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php
parent3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff)
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php156
1 files changed, 78 insertions, 78 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php
index e84580a2..803201e9 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php
+++ b/demos/quickstart/protected/pages/Controls/Samples/TRepeater/Sample2.php
@@ -1,79 +1,79 @@
-<?php
-
-class Sample2 extends TPage
-{
- protected function getMasterData()
- {
- return array('North','West','East','South');
- }
-
- protected function getDetailData($region)
- {
- static $data=array(
- 'North'=>array(
- array('name'=>'John','age'=>30,'position'=>'Program Manager'),
- array('name'=>'Edward','age'=>35,'position'=>'Developer'),
- array('name'=>'Walter','age'=>28,'position'=>'Developer'),
- ),
- 'West'=>array(
- array('name'=>'Cary','age'=>31,'position'=>'Senior Manager'),
- array('name'=>'Ted','age'=>25,'position'=>'Developer'),
- array('name'=>'Kevin','age'=>28,'position'=>'Developer'),
- ),
- 'East'=>array(
- array('name'=>'Shawn','age'=>30,'position'=>'Sales Manager'),
- array('name'=>'Larry','age'=>28,'position'=>'Document Writer'),
- ),
- 'South'=>array(
- array('name'=>'King','age'=>30,'position'=>'Program Manager'),
- array('name'=>'Carter','age'=>22,'position'=>'Developer'),
- ),
- );
- return $data[$region];
- }
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- if(!$this->IsPostBack)
- {
- $this->Repeater->DataSource=$this->getMasterData();
- $this->Repeater->dataBind();
- }
- }
-
- public function dataBindRepeater2($sender,$param)
- {
- $item=$param->Item;
- if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
- {
- $item->Repeater2->DataSource=$this->getDetailData($item->DataItem);
- $item->Repeater2->dataBind();
- }
- }
-
- public function repeaterItemCreated($sender,$param)
- {
- static $itemIndex=0;
- $item=$param->Item;
- if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
- {
- $item->Cell->BackColor=$itemIndex%2 ? "#6078BF" : "#809FFF";
- $item->Cell->ForeColor='white';
- $itemIndex++;
- }
- }
-
- public function repeater2ItemCreated($sender,$param)
- {
- static $itemIndex=0;
- $item=$param->Item;
- if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
- {
- $item->Row->BackColor=$itemIndex%2 ? "#BFCFFF" : "#E6ECFF";
- $itemIndex++;
- }
- }
-}
-
+<?php
+
+class Sample2 extends TPage
+{
+ protected function getMasterData()
+ {
+ return array('North','West','East','South');
+ }
+
+ protected function getDetailData($region)
+ {
+ static $data=array(
+ 'North'=>array(
+ array('name'=>'John','age'=>30,'position'=>'Program Manager'),
+ array('name'=>'Edward','age'=>35,'position'=>'Developer'),
+ array('name'=>'Walter','age'=>28,'position'=>'Developer'),
+ ),
+ 'West'=>array(
+ array('name'=>'Cary','age'=>31,'position'=>'Senior Manager'),
+ array('name'=>'Ted','age'=>25,'position'=>'Developer'),
+ array('name'=>'Kevin','age'=>28,'position'=>'Developer'),
+ ),
+ 'East'=>array(
+ array('name'=>'Shawn','age'=>30,'position'=>'Sales Manager'),
+ array('name'=>'Larry','age'=>28,'position'=>'Document Writer'),
+ ),
+ 'South'=>array(
+ array('name'=>'King','age'=>30,'position'=>'Program Manager'),
+ array('name'=>'Carter','age'=>22,'position'=>'Developer'),
+ ),
+ );
+ return $data[$region];
+ }
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->IsPostBack)
+ {
+ $this->Repeater->DataSource=$this->getMasterData();
+ $this->Repeater->dataBind();
+ }
+ }
+
+ public function dataBindRepeater2($sender,$param)
+ {
+ $item=$param->Item;
+ if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
+ {
+ $item->Repeater2->DataSource=$this->getDetailData($item->DataItem);
+ $item->Repeater2->dataBind();
+ }
+ }
+
+ public function repeaterItemCreated($sender,$param)
+ {
+ static $itemIndex=0;
+ $item=$param->Item;
+ if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
+ {
+ $item->Cell->BackColor=$itemIndex%2 ? "#6078BF" : "#809FFF";
+ $item->Cell->ForeColor='white';
+ $itemIndex++;
+ }
+ }
+
+ public function repeater2ItemCreated($sender,$param)
+ {
+ static $itemIndex=0;
+ $item=$param->Item;
+ if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
+ {
+ $item->Row->BackColor=$itemIndex%2 ? "#BFCFFF" : "#E6ECFF";
+ $itemIndex++;
+ }
+ }
+}
+
?> \ No newline at end of file