@*   Xafari Framework version : 17.2.3011.1336   *@

@using Xafari.Mvc
@using Xafari.Mvc.MvcControllers

@model AjaxMvcShowViewStrategy

<script language="javascript" type="text/javascript" id="@Html.DXScriptId()">
	window.xafari.redirect = function redirect(url) {
		xafari.startProgress();
		window.xafari.disableNotifyWindowClose = true;
		window.document.location = url;
	}
	window.xafari.refreshWindowContent = function refreshWindowContent() {
		xafari.startProgress();
		window.xafari.disableNotifyWindowClose = true;
		window.location.reload(true);
	}
	window.xafari.refreshView = function refreshView(hash, newWindowUrl) {
		@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>
        }

		@if (this.ViewData.Window().IsMain)
		{
<text>xafari.UpdateDocumentLocation(hash, newWindowUrl);</text>
		}
	}
</script>

