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 --- .../protected/pages/TimeTracker/TimeEntryList.php | 176 ++++++++++----------- 1 file changed, 88 insertions(+), 88 deletions(-) (limited to 'demos/time-tracker/protected/pages/TimeTracker/TimeEntryList.php') diff --git a/demos/time-tracker/protected/pages/TimeTracker/TimeEntryList.php b/demos/time-tracker/protected/pages/TimeTracker/TimeEntryList.php index ee3f4bb2..0730505f 100644 --- a/demos/time-tracker/protected/pages/TimeTracker/TimeEntryList.php +++ b/demos/time-tracker/protected/pages/TimeTracker/TimeEntryList.php @@ -1,89 +1,89 @@ -Application->Modules['daos']->getDao('TimeEntryDao'); - } - - protected function getCategoryDao() - { - return $this->Application->Modules['daos']->getDao('CategoryDao'); - } - - public function setProjectEntry($userID,$projectID) - { - $this->setViewState('ProjectEntry', array($userID,$projectID)); - } - - protected function getCategories() - { - $project = $this->getViewState('ProjectEntry'); - foreach($this->getCategoryDao()->getCategoriesByProjectID($project[1]) as $cat) - { - $categories[$cat->ID] = $cat->Name; - } - return $categories; - } - - protected function showEntryList() - { - $project = $this->getViewState('ProjectEntry'); - $list = $this->getTimeEntryDao()->getTimeEntriesInProject($project[0], $project[1]); - $this->entries->DataSource = $list; - $this->entries->dataBind(); - } - - public function refreshEntryList() - { - $this->entries->EditItemIndex=-1; - $this->showEntryList(); - } - - public function editEntryItem($sender, $param) - { - $this->entries->EditItemIndex=$param->Item->ItemIndex; - $this->showEntryList(); - } - - public function deleteEntryItem($sender, $param) - { - $id = $this->entries->DataKeys[$param->Item->ItemIndex]; - $this->getTimeEntryDao()->deleteTimeEntry($id); - $this->refreshEntryList(); - } - - public function updateEntryItem($sender, $param) - { - if(!$this->Page->IsValid) - return; - - $item = $param->Item; - - $id = $this->entries->DataKeys[$param->Item->ItemIndex]; - - $entry = $this->getTimeEntryDao()->getTimeEntryByID($id); - $category = new CategoryRecord; - $category->ID = $param->Item->category->SelectedValue; - $entry->Category = $category; - $entry->Description = $param->Item->description->Text; - $entry->Duration = floatval($param->Item->hours->Text); - $entry->ReportDate = $param->Item->day->TimeStamp; - - $this->getTimeEntryDao()->updateTimeEntry($entry); - $this->refreshEntryList(); - } - - public function EntryItemCreated($sender, $param) - { - if($param->Item->ItemType == 'EditItem' && $param->Item->DataItem) - { - $param->Item->category->DataSource = $this->getCategories(); - $param->Item->category->dataBind(); - $param->Item->category->SelectedValue = $param->Item->DataItem->Category->ID; - } - } -} - +Application->Modules['daos']->getDao('TimeEntryDao'); + } + + protected function getCategoryDao() + { + return $this->Application->Modules['daos']->getDao('CategoryDao'); + } + + public function setProjectEntry($userID,$projectID) + { + $this->setViewState('ProjectEntry', array($userID,$projectID)); + } + + protected function getCategories() + { + $project = $this->getViewState('ProjectEntry'); + foreach($this->getCategoryDao()->getCategoriesByProjectID($project[1]) as $cat) + { + $categories[$cat->ID] = $cat->Name; + } + return $categories; + } + + protected function showEntryList() + { + $project = $this->getViewState('ProjectEntry'); + $list = $this->getTimeEntryDao()->getTimeEntriesInProject($project[0], $project[1]); + $this->entries->DataSource = $list; + $this->entries->dataBind(); + } + + public function refreshEntryList() + { + $this->entries->EditItemIndex=-1; + $this->showEntryList(); + } + + public function editEntryItem($sender, $param) + { + $this->entries->EditItemIndex=$param->Item->ItemIndex; + $this->showEntryList(); + } + + public function deleteEntryItem($sender, $param) + { + $id = $this->entries->DataKeys[$param->Item->ItemIndex]; + $this->getTimeEntryDao()->deleteTimeEntry($id); + $this->refreshEntryList(); + } + + public function updateEntryItem($sender, $param) + { + if(!$this->Page->IsValid) + return; + + $item = $param->Item; + + $id = $this->entries->DataKeys[$param->Item->ItemIndex]; + + $entry = $this->getTimeEntryDao()->getTimeEntryByID($id); + $category = new CategoryRecord; + $category->ID = $param->Item->category->SelectedValue; + $entry->Category = $category; + $entry->Description = $param->Item->description->Text; + $entry->Duration = floatval($param->Item->hours->Text); + $entry->ReportDate = $param->Item->day->TimeStamp; + + $this->getTimeEntryDao()->updateTimeEntry($entry); + $this->refreshEntryList(); + } + + public function EntryItemCreated($sender, $param) + { + if($param->Item->ItemType == 'EditItem' && $param->Item->DataItem) + { + $param->Item->category->DataSource = $this->getCategories(); + $param->Item->category->dataBind(); + $param->Item->category->SelectedValue = $param->Item->DataItem->Category->ID; + } + } +} + ?> \ No newline at end of file -- cgit v1.2.3