From af68030fcf0c266300feb2c100149ecadef7d364 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 16 Jul 2006 01:50:23 +0000 Subject: Merge from 3.0 branch till 1264. --- demos/quickstart/protected/pages/Comments.php | 76 --------------------------- 1 file changed, 76 deletions(-) delete mode 100644 demos/quickstart/protected/pages/Comments.php (limited to 'demos/quickstart/protected/pages/Comments.php') diff --git a/demos/quickstart/protected/pages/Comments.php b/demos/quickstart/protected/pages/Comments.php deleted file mode 100644 index 7af70ece..00000000 --- a/demos/quickstart/protected/pages/Comments.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @version : $ Sat May 27 20:23:00 AZOST 2006 $ - * @package Demo.Quickstart - * @since 3.0 - */ -class Comments extends TPage -{ - private $_quickstart; - - public function onLoad($param) - { - parent::onLoad($param); - $this->_quickstart = new QuickStartComments; - if(!$this->getIsPostBack()) - $this->refreshData(); - } - - protected function refreshData() - { - $this->comments->setDataSource($this->_quickstart->getQuequedComments()); - $this->comments->dataBind(); - } - - public function approveComment($sender, $param) - { - $ID = $this->comments->DataKeys[$this->comments->SelectedItemIndex]; - $this->_quickstart->approveComment($ID); - $this->refreshData(); - $this->comments->SelectedItemIndex=-1; - } - - public function editComment($sender, $param) - { - $this->comments->SelectedItemIndex=-1; - $this->comments->EditItemIndex=$param->Item->ItemIndex; - $this->refreshData(); - } - - public function cancelEdit($sender, $param) - { - $this->comments->SelectedItemIndex=-1; - $this->comments->EditItemIndex=-1; - $this->refreshData(); - } - - public function deleteComment($sender, $param) - { - $ID = $this->comments->DataKeys[$param->Item->ItemIndex]; - $this->_quickstart->deleteComment($ID); - $this->comments->SelectedItemIndex=-1; - $this->comments->EditItemIndex=-1; - $this->refreshData(); - } - - public function updateComment($sender, $param) - { - $item=$param->Item; - $this->_quickstart->updateComment( - $this->comments->DataKeys[$item->ItemIndex], - $item->page->Text, - $item->email->Text, - $item->content->Text); - - $this->comments->EditItemIndex=-1; - $this->refreshData(); - } -} - -?> \ No newline at end of file -- cgit v1.2.3