@*   Xafari Framework version : 17.2.3011.1336   *@

@using DevExpress.ExpressApp
@using DevExpress.ExpressApp.Model
@using Xafari.Mvc
@using Xafari.Mvc.MvcControllers
@using Xafari.Mvc.Templates

@model Xafari.Mvc.Templates.ActionContainers.ViewSite

@{
	var listViewModel = this.Model.View.Model as IModelListView;
	if (listViewModel != null && listViewModel.MasterDetailMode == MasterDetailMode.ListViewAndDetailView)
	{
		var newDependentContainers = new List<string>();
		newDependentContainers.AddRange(this.Model.DependentContainers);
		newDependentContainers.Add(this.ViewData.Frame().ControlId("UP" + DevExpress.ExpressApp.ListView.DetailViewControlID));

		this.Model.DependentContainers = newDependentContainers.ToArray();
	}
}

@if (this.Model.DependentContainers != null)
{
	<script language="javascript" type="text/javascript" id="@Html.DXScriptId(this.Model)">
		if (!window.xafari.frame_@(this.ViewData.Frame().FrameId()))
			window.xafari.frame_@(this.ViewData.Frame().FrameId()) = {};

		window.xafari.frame_@(this.ViewData.Frame().FrameId()).refreshDependentContainers = function() {
			@if (this.Model != null && this.Model.DependentContainers != null)
        {
            for (var i = this.Model.DependentContainers.Length - 1; i > -1; i--)
            {
                var callbackPanelName = this.Model.DependentContainers[i];
        <text>if(window.@(callbackPanelName)){ xafari.CallbackPanel.Perform(window.@(callbackPanelName)); };</text>
            }
        <text>xafari.CallbackPanel.RaiseFuncAfterAllPerformCallback(window.xafari.GetClientServerInfo);</text>
        }
		}
	</script>
}

@Html.Xafari().MvcControl(this.Model.View.Control).GetHtml()


