Permalink
Browse files

Merge pull request #366 from DaSourcerer/issue-237

Fix issue #237
  • Loading branch information...
2 parents 51f6d21 + 4dcf1b1 commit c85b8d771e7ce354e92f7dbf0fdfadb7602ec6e1 @samdark samdark committed Feb 22, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +7 −1 framework/web/widgets/CTabView.php
View
@@ -8,6 +8,7 @@ Version 1.1.11 work in progress
- Enh #171: Added support for PUT and DELETE request tunneled through POST via parameter named _method in POST body (musterknabe)
- Enh #266: Add support for HTML5 url, email, number, range and date fields to CHtml (gregmolnar)
- Enh #369: Added $hashKey and $autoSerialize properties as well as serializeValue() and unserializeValue() methods to CCache (kidol)
+- Enh #237: The tabs of CTabView now support the property 'visible' (DaSourcerer)
- Bug #193: Changed datetime column type for postgresql from 'time' to 'timestamp' (cebe)
- Enh: Added getIsFlashRequest(), proper handling of Flash/Flex request when using CWebLogRoute with FireBug (resurtm)
- Enh: Added CBreadcrumbs::$activeLinkTemplate and CBreadcrumbs::$inactiveLinkTemplate properties which allows to change each item's template (resurtm)
@@ -97,6 +97,8 @@ class CTabView extends CWidget
* <li>url: a URL that the user browser will be redirected to when clicking on this tab.</li>
* <li>data: array (name=>value), this will be passed to the view when 'view' is specified.
* This option is available since version 1.1.1.</li>
+ * <li>visible: whether this tab is visible. Defaults to true.
+ * this option is available since version 1.1.11.</li>
* </ul>
* <pre>
* array(
@@ -118,9 +120,13 @@ class CTabView extends CWidget
*/
public function run()
{
+ foreach($this->tabs as $id=>$tab)
+ if(isset($tab['visible']) && $tab['visible']==false)
+ unset($this->tabs[$id]);
+
if(empty($this->tabs))
return;
-
+
if($this->activeTab===null || !isset($this->tabs[$this->activeTab]))
{
reset($this->tabs);

0 comments on commit c85b8d7

Please sign in to comment.