Skip to content

Commit

Permalink
adding JuiceTemplateContainer to replace AccordionPanelTemplateContai…
Browse files Browse the repository at this point in the history
…ner and TabsPageTemplateContainer
  • Loading branch information
shellscape committed Oct 8, 2012
1 parent 228f4d1 commit 344787b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Juice/AccordionPanel.cs
Expand Up @@ -21,13 +21,13 @@ public class AccordionPanel : Control, INamingContainer {
}
}

[TemplateContainer(typeof(AccordionPanelTemplateContainer))]
[TemplateContainer(typeof(JuiceTemplateContainer))]
[PersistenceMode(PersistenceMode.InnerProperty)]
public ITemplate PanelContent { get; set; }

protected override void CreateChildControls() {
if(PanelContent != null) {
_templateContainer = new AccordionPanelTemplateContainer();
_templateContainer = new JuiceTemplateContainer();
PanelContent.InstantiateIn(_templateContainer);
Controls.Add(_templateContainer);
}
Expand Down
10 changes: 10 additions & 0 deletions Juice/JuiceTemplateContainer.cs
@@ -0,0 +1,10 @@
using System.Web.UI;
using System.ComponentModel;

namespace Juice {

[ToolboxItem(false)]
public class JuiceTemplateContainer : Control, INamingContainer {

}
}
5 changes: 3 additions & 2 deletions Juice/JuiceUI.csproj
Expand Up @@ -69,8 +69,10 @@
<ItemGroup>
<Compile Include="Accordion.cs" />
<Compile Include="AccordionPanel.cs" />
<Compile Include="AccordionPanelTemplateContainer.cs" />
<Compile Include="JuiceTemplateContainer.cs" />
<Compile Include="Buttonset.cs" />
<Compile Include="Menu.cs" />
<Compile Include="MenuItem.cs" />
<Compile Include="Tooltip.cs" />
<Compile Include="Spinner.cs" />
<Compile Include="CssPlaceholder.cs" />
Expand Down Expand Up @@ -118,7 +120,6 @@
<Compile Include="Framework\WidgetHash.cs" />
<Compile Include="Sortable.cs" />
<Compile Include="TabPage.cs" />
<Compile Include="TabPageTemplateContainer.cs" />
<Compile Include="Tabs.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Juice/TabPage.cs
Expand Up @@ -23,13 +23,13 @@ public class TabPage : Control, INamingContainer {
}

[PersistenceMode(PersistenceMode.InnerProperty)]
[TemplateContainer(typeof(TabPageTemplateContainer))]
[TemplateContainer(typeof(JuiceTemplateContainer))]
[DefaultValue((string) null)]
public ITemplate TabContent { get; set; }

protected override void CreateChildControls() {
if(TabContent != null) {
_templateContainer = new TabPageTemplateContainer();
_templateContainer = new JuiceTemplateContainer();
TabContent.InstantiateIn(_templateContainer);
Controls.Add(_templateContainer);
}
Expand Down

0 comments on commit 344787b

Please sign in to comment.