From c6b4190fab88201f4efaa0d00a6aa823b180f482 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 10 Jun 2006 11:28:30 +0000 Subject: Merge from 3.0 branch till 1148. --- demos/blog/protected/Pages/Admin/UserMan.page | 2 +- demos/blog/protected/Portlets/CommentPortlet.php | 3 ++- demos/quickstart/protected/comments/CommentList.php | 1 - demos/quickstart/protected/pages/Controls/NewControl.page | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'demos') diff --git a/demos/blog/protected/Pages/Admin/UserMan.page b/demos/blog/protected/Pages/Admin/UserMan.page index 02b1a069..98c1b6ff 100644 --- a/demos/blog/protected/Pages/Admin/UserMan.page +++ b/demos/blog/protected/Pages/Admin/UserMan.page @@ -35,7 +35,7 @@ HeaderText="Role" ItemStyle.HorizontalAlign="Center" ItemStyle.Wrap="false" - ItemStyle.Width="7px" > + ItemStyle.Width="50px" > <%# $this->Parent->DataItem->Role===0 ? 'User' : 'Admin' %> diff --git a/demos/blog/protected/Portlets/CommentPortlet.php b/demos/blog/protected/Portlets/CommentPortlet.php index 4147d6d3..711059ff 100644 --- a/demos/blog/protected/Portlets/CommentPortlet.php +++ b/demos/blog/protected/Portlets/CommentPortlet.php @@ -24,7 +24,8 @@ class CommentPortlet extends Portlet public function onLoad($param) { parent::onLoad($param); - $comments=$this->Application->getModule('data')->queryComments('','ORDER BY create_time DESC','LIMIT 10'); + $commentLimit=TPropertyValue::ensureInteger($this->Application->Parameters['RecentComments']); + $comments=$this->Application->getModule('data')->queryComments('','ORDER BY create_time DESC',"LIMIT $commentLimit"); foreach($comments as $comment) { $comment->ID=$this->Service->constructUrl('Posts.ViewPost',array('id'=>$comment->PostID)).'#c'.$comment->ID; diff --git a/demos/quickstart/protected/comments/CommentList.php b/demos/quickstart/protected/comments/CommentList.php index 4328991f..3bfb7239 100644 --- a/demos/quickstart/protected/comments/CommentList.php +++ b/demos/quickstart/protected/comments/CommentList.php @@ -43,7 +43,6 @@ class CommentList extends TTemplateControl $this->_quickstart->addNewComment($page, $this->email->getText(), $this->content->getText()); $this->multiView1->setActiveViewIndex(1); - $this->listComments($page); } public function setVisible($value) diff --git a/demos/quickstart/protected/pages/Controls/NewControl.page b/demos/quickstart/protected/pages/Controls/NewControl.page index c2640a33..54465ff7 100644 --- a/demos/quickstart/protected/pages/Controls/NewControl.page +++ b/demos/quickstart/protected/pages/Controls/NewControl.page @@ -122,7 +122,7 @@ Other important properties and methods include:
  • Attributes - collection of custom attributes. This is useful for allowing users to specify attributes of the output HTML elements that are not covered by control properties.
  • getViewState() and setViewState() - these methods are commonly used for defining properties that are stored in viewstate.
  • saveState() and loadState() - these two methods can be overriden to provide last step state saving and loading.
  • -
  • Control lifecycles - Life page lifecycles, controls also have lifecycles. Each control undergoes the following lifecycles in order: constructor, onInit(), onLoad(), onPreRender(), render(), and onUnload. More details can be found in the page section.
  • +
  • Control lifecycles - Like pages, controls also have lifecycles. Each control undergoes the following lifecycles in order: constructor, onInit(), onLoad(), onPreRender(), render(), and onUnload. More details can be found in the page section.
  • Extending TWebControl

    -- cgit v1.2.3