@model GreenTree.Nachtragsmanagement.Web.Models.Global.YesNoDialogModel

@Html.DevExpress().PopupControl(s =>
{
	s.Name = Model.PopupName;
	s.HeaderText = Model.HeaderText;
	s.Modal = false;
	s.Width = new Unit(350, UnitType.Pixel);
	s.CloseAction = CloseAction.CloseButton;
	s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
	s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
	s.AllowDragging = false;
	s.AllowResize = false;
	s.ShowFooter = false;
	s.SetContent(() =>
	{
		ViewContext.Writer.Write(Model.Content);

		if (String.IsNullOrEmpty(Model.NoFunction))
			Model.NoFunction = "function (s, e) { " + Model.PopupName + ".Hide(); }";

		if (String.IsNullOrEmpty(Model.YesFunction))
			Model.YesFunction = "function (s, e) { " + Model.PopupName + ".Hide(); }";

		Html.RenderPartial(
			"~/Views/Shared/_PopupButtonPanelYesNo.cshtml",
			Model
		);
	});
	s.Styles.Content.Paddings.Padding = new Unit(0, UnitType.Pixel);
}).GetHtml()