@*   Xafari Framework version : 17.2.3011.1336   *@

@using System.Web.UI.WebControls
@using Xafari.BC.Settings
@using Xafari.BC.Settings.Runtime

@model Xafari.BC.Settings.Mvc.MvcSettingsPropertyEditor
		   
@{
	this.Model.ReadValue();
	var settingsKeyCallbackPanel = this.Model.Frame.ControlId(this.Model.FormName() + "SettingsKeyCallbackPanel");
	var showSlicesPane = ((SettingsObject) this.Model.CurrentObject).IsAdministrator || ((SettingsObject) this.Model.CurrentObject).CurrentSlice.ChildrenSlices.Count > 0;
}

@Html.DevExpress().Splitter(settings =>
{
	settings.Name = this.ViewData.Frame().ControlId(this.Model.FormName() + "SettingsSplitter") + "_" + showSlicesPane.ToString();
	settings.SaveStateToCookies = true;
	settings.SaveStateToCookiesID = this.Model.Id + "SettingsSplitter" + "_" + showSlicesPane.ToString();
	settings.Height = 500;

	settings.Panes.Add(settingsGroupsPane =>
	{
		settingsGroupsPane.MinSize = 300;
		settingsGroupsPane.ScrollBars = ScrollBars.Auto;
		settingsGroupsPane.PaneStyle.Paddings.Padding = new Unit(0);
		settingsGroupsPane.SetContentRelativePartialView(this.Html, "_SettingsGroupsPanePartial");
	});
	
	settings.Panes.Add(settingsSlicesAndKeys =>
	{
		settingsSlicesAndKeys.MinSize = 300;
		settingsSlicesAndKeys.ScrollBars = ScrollBars.Auto;

		if (showSlicesPane)
		{
			settingsSlicesAndKeys.Panes.Add(settingsSlices =>
			{
				settingsSlices.MinSize = 150;
				settingsSlices.ScrollBars = ScrollBars.Auto;
				settingsSlices.PaneStyle.Paddings.Padding = new Unit(0);
				settingsSlices.SetContentRelativePartialView(this.Html, "_SettingsSlicesPanePartial");
			});
		}
		
		settingsSlicesAndKeys.Panes.Add(settingsKeys =>
		{
			settingsKeys.MinSize = 150;
			settingsKeys.ScrollBars = ScrollBars.Auto;
			settingsKeys.PaneStyle.Paddings.Padding = new Unit(0);
			settingsKeys.SetContentRelativePartialView(this.Html, "SettingsKeys/_Partial");
		});
	});
	
}).GetHtml()

<script type="text/javascript" id="@Html.DXScriptId()">
	if (window.xafari && !window.xafari.settings)
		window.xafari.settings = {};

	if (window.xafari.settings.groupSelectTimeoutId)
		window.clearTimeout(window.xafari.settings.groupSelectTimeoutId);
	window.xafari.settings.groupSelectTimeoutId = null;

	if (window.xafari.settings.sliceSelectTimeoutId)
		window.clearTimeout(window.xafari.settings.sliceSelectTimeoutId);
	window.xafari.settings.sliceSelectTimeoutId = null;
</script>