summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-02-02 06:29:24 +0000
committerxue <>2006-02-02 06:29:24 +0000
commitb2fba25e4b146c4896304377643e498a22a3ced0 (patch)
tree929d9cc151f9824132e37f4a8aae77ae5a8d8a99 /framework
parent2037f60c73a77f28cc09fcb64cb424e16c593765 (diff)
Added a demo of using TDataGrid with automatically generated columns.
Diffstat (limited to 'framework')
-rw-r--r--framework/Log/TLogRouter.php14
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php4
2 files changed, 11 insertions, 7 deletions
diff --git a/framework/Log/TLogRouter.php b/framework/Log/TLogRouter.php
index ef16cb67..4b6141e4 100644
--- a/framework/Log/TLogRouter.php
+++ b/framework/Log/TLogRouter.php
@@ -604,14 +604,14 @@ class TBrowserLogRoute extends TLogRoute
$category = is_array($this->getCategories()) ?
implode(', ',$this->getCategories()) : '';
$string = <<<EOD
-<table cellspacing="0" cellpadding="0" border="0" width="100%">
+<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
<th style="background-color: black; color:white;" colspan="11">
- <h3>Trace Information: $category</h3>
+ Application Log
</th>
</tr><tr style="background-color: #ccc;">
<th>&nbsp;</th>
- <th>Category</th><th>Message</th><th>From First(s)</th><th>From Last(s)</th>
+ <th>Category</th><th>Message</th><th>Time Spent (s)</th><th>Cumulated Time Spent (s)</th>
</tr>
EOD;
return $string;
@@ -626,7 +626,11 @@ EOD;
$msg = preg_replace('/\(line[^\)]+\)$/','',$log[0]); //remove line number info
$string = <<<EOD
<tr style="background-color: {$bgcolor};">
- <td style="background-color: $color;">&nbsp;</td><td>{$log[2]}</td><td>{$msg}</td><td>{$total}</td><td>{$delta}</td>
+ <td style="border:1px solid silver;background-color: $color;">&nbsp;</td>
+ <td>{$log[2]}</td>
+ <td>{$msg}</td>
+ <td style="text-align:center">{$delta}</td>
+ <td style="text-align:center">{$total}</td>
</tr>
EOD;
return $string;
@@ -651,7 +655,7 @@ EOD;
$string = "<tr><td colspan=\"11\" style=\"text-align:center; border-top: 1px solid #ccc; padding:0.2em;\">";
foreach(self::$_levelValues as $name => $level)
{
- $string .= "<span style=\"color:".$this->getColorLevel($level);
+ $string .= "<span style=\"color:white;background-color:".$this->getColorLevel($level);
$string .= ";margin: 0.5em;\">".strtoupper($name)."</span>";
}
$string .= "</td></tr></table>";
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index 9d55f37e..8b159905 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -72,7 +72,7 @@ Prado::using('System.Web.UI.WebControls.TTable');
* on top and/or bottom of the table. How the pager will be displayed is determined by <b>PagerDisplay</b>
* and <b>PagerButtonCount</b> properties. The former decides the position of the pager and latter
* specifies how many buttons are to be used for paging purpose. Clicking on a pager button will raise
- * an <b>OnPageCommand</b> event. You can respond to this event, specify the page to be displayed by
+ * an <b>onPageIndexChanged</b> event. You can respond to this event, specify the page to be displayed by
* setting <b>CurrentPageIndex</b> property, and then invoke databind on the datagrid.
*
* TDataGrid supports two kinds of paging. The first one is based on the number of data items in
@@ -94,7 +94,7 @@ Prado::using('System.Web.UI.WebControls.TTable');
* - OnSelectCommand, select
* - OnDeleteCommand, delete
* - OnUpdateCommand, update
- * - OnPageCommand, page
+ * - onPageIndexChanged, page
* - OnSortCommand, sort
* The data list will always raise an <b>OnItemCommand</b>
* upon its receiving a bubbled <b>OnCommand</b> event.