PDA

View Full Version : [CLOSED] Panel with CollapseDirection left not expands on title area click



PriceRightHTML5team
Jun 04, 2014, 7:24 AM
Hi,

Following is my markup


@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>


@Html.X().ResourceManager().CleanResourceUrl(false )

@(
Html.X().Panel()
.Collapsible(true)
.TitleCollapse(true)
.Height(400)
.Width(300)
.Title("Main")
.CollapseDirection(Direction.Left)
.Collapsed(false)
.Items(
Html.X().Panel()
.Items(
Html.X().MenuPanel()
.Collapsible(true)
.TitleCollapse(true)
.Title("Words")
.CollapseDirection(Direction.Top)
.Collapsed(true)
.Menu(menu =>
{
menu.Items.Add(Html.X().MenuItem().Text("one"));
menu.Items.Add(Html.X().MenuItem().Text("two"));
}
)
)//end 1st panel
,
Html.X().Panel()
.Items(
Html.X().Menu()
.Floating(false)
.Collapsible(true)
.TitleCollapse(true)
.Title("Numbers")
.CollapseDirection(Direction.Top)
.Collapsed(true)
//.Menu(menu =>
// {
.Items(
//menu.Items.Add(
Html.X().MenuPanel()
.Collapsible(true)
.TitleCollapse(true)
.Title("Numeric")
.CollapseDirection(Direction.Top)
.Collapsed(true)
.Menu(m =>
{
m.Items.Add(Html.X().MenuItem().Text("1"));
m.Items.Add(Html.X().MenuItem().Text("2"));
}
)
//);
,
//menu.Items.Add(
Html.X().MenuPanel()
.Collapsible(true)
.TitleCollapse(true)
.Title("Roman")
.CollapseDirection(Direction.Top)
.Collapsed(true)
.Menu(r =>
{
r.Items.Add(Html.X().MenuItem().Text("I"));
r.Items.Add(Html.X().MenuItem().Text("II"));
}
)
//);
//}
)
)//end 2nd panel
)
)


The issue i am facing is the outer most panel "Main" has CollapseDirection(Direction.Left). It does not expand on title area click. Though, it expands on click of the expand ">>" icon.

Daniil
Jun 04, 2014, 12:40 PM
Hi @PriceRightHTML5team,

As a solution I can suggest to add this for the Panel.

.Listeners(events =>
{
events.Collapse.Handler = "this.mon(this.getReExpander(), 'click', this.toggleCollapse, this);";
events.Collapse.Single = true;
})