From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- .../tickets/protected/pages/Ticket384.php | 86 +++++++++++----------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'tests/FunctionalTests/tickets/protected/pages/Ticket384.php') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket384.php b/tests/FunctionalTests/tickets/protected/pages/Ticket384.php index e928632d..b485ef2b 100644 --- a/tests/FunctionalTests/tickets/protected/pages/Ticket384.php +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket384.php @@ -1,46 +1,46 @@ AutoCompleteRepeater->setDataSource(array(1, 2)); - $this->AutoCompleteRepeater->dataBind(); - } - - public function submitCallback($sender, $param) - { - $this->AutoCompleteRepeater->setDataSource(array(1,2,3,4)); - $this->AutoCompleteRepeater->dataBind(); - $this->AutoCompletePanel->render($this->getResponse()->createHtmlWriter()); - } - - public function suggestCountries($sender, $param) - { - $sender->setDataSource($this->matchCountries($param->getCallbackParameter())); - $sender->dataBind(); - } - - protected function matchCountries($token) - { - $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); - $list = array(); - $count = 0; - $token = strtolower($token); - foreach($info->getCountries() as $country) - { - if(strpos(strtolower($country), $token) === 0) - { - $list[] = $country; - $count++; - if($count > 10) break; - } - } - return $list; - } -} + +Prado::using('System.Web.UI.ActiveControls.*'); + +class Ticket384 extends TPage +{ + public function initRecursive($namingContainer=null) + { + parent::initRecursive($namingContainer); + $this->AutoCompleteRepeater->setDataSource(array(1, 2)); + $this->AutoCompleteRepeater->dataBind(); + } + + public function submitCallback($sender, $param) + { + $this->AutoCompleteRepeater->setDataSource(array(1,2,3,4)); + $this->AutoCompleteRepeater->dataBind(); + $this->AutoCompletePanel->render($this->getResponse()->createHtmlWriter()); + } + + public function suggestCountries($sender, $param) + { + $sender->setDataSource($this->matchCountries($param->getCallbackParameter())); + $sender->dataBind(); + } + + protected function matchCountries($token) + { + $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); + $list = array(); + $count = 0; + $token = strtolower($token); + foreach($info->getCountries() as $country) + { + if(strpos(strtolower($country), $token) === 0) + { + $list[] = $country; + $count++; + if($count > 10) break; + } + } + return $list; + } +} ?> \ No newline at end of file -- cgit v1.2.3