This commit is contained in:
2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
using System.Web.Mvc;
using Kendo.Mvc.UI;
using Kendo.Mvc.UI.Fluent;
namespace Kreta.Web.Helpers
{
public static class ModalExtensions
{
public static WindowBuilder KretaWindow(this HtmlHelper helper, string name, string title = "", int width = 0, int height = 0, bool isModal = true
, bool isResizable = true, bool isVisible = false)
{
var window = helper.Kendo().Window()
.Name(name)
.Modal(isModal)
.Resizable()
.Draggable()
.Visible(isVisible)
.Draggable(true)
.Title(title)
.Actions(act => act.Maximize().Close());
if (width > 0)
window = window.Width(width);
if (height > 0)
window = window.Height(height);
return window;
}
}
}