init
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user