From da9075fb882be335d425a4bc94bd59c1a9876056 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 25 Jul 2007 14:55:21 +0000 Subject: Added TTabPanel. --- framework/Exceptions/messages.txt | 5 +++ .../Javascripts/source/prado/controls/controls.js | 50 +++++++++++++++++++++- framework/Web/UI/TClientScriptManager.php | 5 ++- 3 files changed, 57 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt index 955c8fa3..23ec53ea 100644 --- a/framework/Exceptions/messages.txt +++ b/framework/Exceptions/messages.txt @@ -409,3 +409,8 @@ feedservice_id_required = TFeedService requires 'id' attribute in its feed e feedservice_feedtype_invalid = The class feed '{0}' must implement IFeedContentProvider interface. feedservice_class_required = TFeedService requires 'class' attribute in its feed elements. feedservice_feed_unknown = Unknown feed '{0}' requested. + +tabviewcollection_tabview_required = TTabPanel can only accept TTabView as child. +tabpanel_activeviewid_invalid = TTabPanel.ActiveViewID has an invalid ID '{0}'. +tabpanel_activeviewindex_invalid = TTabPanel.ActiveViewIndex has an invalid Index '{0}'. +tabpanel_view_inexistent = TTabPanel cannot find the specified view. diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js index 4ef824c2..e0f9218c 100644 --- a/framework/Web/Javascripts/source/prado/controls/controls.js +++ b/framework/Web/Javascripts/source/prado/controls/controls.js @@ -287,4 +287,52 @@ Prado.WebUI.TRadioButtonList = Base.extend( new Prado.WebUI.TRadioButton(radioButtonOptions); } } -}); \ No newline at end of file +}); + +Prado.WebUI.TTabPanel = Class.create(); +Prado.WebUI.TTabPanel.prototype = +{ + initialize : function(options) + { + this.element = $(options.ID); + this.onInit(options); + }, + + onInit : function(options) + { + this.views = options.Views; + this.hiddenField = $(options.ID+'_1'); + this.activeCssClass = options.ActiveCssClass; + this.normalCssClass = options.NormalCssClass; + var length = options.Views.length; + for(var i = 0; i_hiddenFields as $name=>$value) { + $id=strtr($name,':','_'); if(is_array($value)) { foreach($value as $v) - $str.='\n"; + $str.='\n"; } else { - $str.='\n"; + $str.='\n"; } } if($str!=='') -- cgit v1.2.3