summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorxue <>2006-06-10 11:28:30 +0000
committerxue <>2006-06-10 11:28:30 +0000
commitc6b4190fab88201f4efaa0d00a6aa823b180f482 (patch)
treee3be39a8eaefca800017dd866422b1039e1db77a /demos
parent112d86bb08a1dd4bde14005f757c95b0fc7a5a21 (diff)
Merge from 3.0 branch till 1148.
Diffstat (limited to 'demos')
-rw-r--r--demos/blog/protected/Pages/Admin/UserMan.page2
-rw-r--r--demos/blog/protected/Portlets/CommentPortlet.php3
-rw-r--r--demos/quickstart/protected/comments/CommentList.php1
-rw-r--r--demos/quickstart/protected/pages/Controls/NewControl.page2
4 files changed, 4 insertions, 4 deletions
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" >
<prop:ItemTemplate>
<%# $this->Parent->DataItem->Role===0 ? 'User' : 'Admin' %>
</prop:ItemTemplate>
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:
<li><tt>Attributes</tt> - 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.</li>
<li><tt>getViewState()</tt> and <tt>setViewState()</tt> - these methods are commonly used for defining properties that are stored in viewstate.</li>
<li><tt>saveState()</tt> and <tt>loadState()</tt> - these two methods can be overriden to provide last step state saving and loading.</li>
- <li>Control lifecycles - Life page lifecycles, controls also have lifecycles. Each control undergoes the following lifecycles in order: constructor, <tt>onInit()</tt>, <tt>onLoad()</tt>, <tt>onPreRender()</tt>, <tt>render()</tt>, and <tt>onUnload</tt>. More details can be found in the <a href="?page=Fundamentals.Pages">page</a> section.</li>
+ <li>Control lifecycles - Like pages, controls also have lifecycles. Each control undergoes the following lifecycles in order: constructor, <tt>onInit()</tt>, <tt>onLoad()</tt>, <tt>onPreRender()</tt>, <tt>render()</tt>, and <tt>onUnload</tt>. More details can be found in the <a href="?page=Fundamentals.Pages">page</a> section.</li>
</ul>
<h3 id="5408">Extending <tt>TWebControl</tt></h3>