init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
10
KretaWeb/Models/EditorTemplates/ModelWindowBaseModel.cs
Normal file
10
KretaWeb/Models/EditorTemplates/ModelWindowBaseModel.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Web.Helpers.Modal;
|
||||
|
||||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class ModelWindowBaseModel
|
||||
{
|
||||
public List<ModalButtonModel> Buttons { get; set; }
|
||||
}
|
||||
}
|
20
KretaWeb/Models/EditorTemplates/PanelBarBaseModel.cs
Normal file
20
KretaWeb/Models/EditorTemplates/PanelBarBaseModel.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Kendo.Mvc.UI;
|
||||
|
||||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class PanelBarBaseModel : LayoutModel
|
||||
{
|
||||
public PanelBarBaseModel()
|
||||
{
|
||||
Animation = false;
|
||||
ExpandMode = PanelBarExpandMode.Multiple;
|
||||
}
|
||||
|
||||
public string PanelName { get; set; }
|
||||
public List<PanelBarChildModel> ChildModels { get; set; }
|
||||
|
||||
public bool Animation { get; set; }
|
||||
public PanelBarExpandMode ExpandMode { get; set; }
|
||||
}
|
||||
}
|
15
KretaWeb/Models/EditorTemplates/PanelBarChildDataModel.cs
Normal file
15
KretaWeb/Models/EditorTemplates/PanelBarChildDataModel.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class PanelBarChildDataModel
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public string ControllerAction { get; set; }
|
||||
public string DocumentType { get; set; }
|
||||
|
||||
public int TipusId { get; set; }
|
||||
public int FeladatellatasiHelyId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class PanelBarChildHeaderModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
15
KretaWeb/Models/EditorTemplates/PanelBarChildModel.cs
Normal file
15
KretaWeb/Models/EditorTemplates/PanelBarChildModel.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class PanelBarChildModel
|
||||
{
|
||||
public string PartialViewTitle { get; set; }
|
||||
public string PartialViewName { get; set; }
|
||||
public List<object> Data { get; set; }
|
||||
|
||||
public object GenericPanelBarModel { get; set; }
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
}
|
||||
}
|
73
KretaWeb/Models/EditorTemplates/PopUpModel.cs
Normal file
73
KretaWeb/Models/EditorTemplates/PopUpModel.cs
Normal file
|
@ -0,0 +1,73 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Framework;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Helpers.Modal;
|
||||
|
||||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class PopUpModel
|
||||
{
|
||||
|
||||
public object Instance { get; private set; }
|
||||
|
||||
public string View { get; private set; }
|
||||
|
||||
public List<ModalButtonModel> Buttons { get; }
|
||||
|
||||
public PopUpModel(object model, string view)
|
||||
{
|
||||
Instance = model;
|
||||
View = view;
|
||||
Buttons = new List<ModalButtonModel>();
|
||||
}
|
||||
|
||||
public PopUpModel AddOkBtn(PopUpModel pm, string eventName)
|
||||
{
|
||||
pm.Buttons.Add(new ModalButtonModel { Name = "BtnOk", Text = CommonResource.Mentes, EventName = eventName });
|
||||
return pm;
|
||||
}
|
||||
|
||||
public PopUpModel AddCancelBtn(PopUpModel pm, string eventName)
|
||||
{
|
||||
pm.Buttons.Add(new ModalButtonModel { Name = "BtnCancel", Text = CommonResource.Megse, EventName = eventName });
|
||||
return pm;
|
||||
}
|
||||
|
||||
public PopUpModel AddDeleteBtn(PopUpModel pm, string eventName)
|
||||
{
|
||||
pm.Buttons.Add(new ModalButtonModel { Name = "BtnDelete", Text = CommonResource.Torles, EventName = eventName });
|
||||
return pm;
|
||||
}
|
||||
|
||||
public PopUpModel AddBtn(PopUpModel pm, string name, int content, string eventName, string containerCssClass = null, bool secondLine = false, bool setDisabledAfterClick = false, string text = null)
|
||||
{
|
||||
var clickEventName = SetClickEventName(eventName, name, setDisabledAfterClick);
|
||||
pm.Buttons.Add(new ModalButtonModel { Name = name, Text = content > 0 ? StringResourcesUtil.GetString(content) : text, EventName = clickEventName, ContainerCssClass = containerCssClass, SecondLine = secondLine });
|
||||
return pm;
|
||||
}
|
||||
|
||||
public PopUpModel AddBtn(PopUpModel pm, string name, string text, string eventName, bool secondLine, string containerCssClass = null, bool setDisabledAfterClick = false)
|
||||
{
|
||||
var clickEventName = SetClickEventName(eventName, name, setDisabledAfterClick);
|
||||
pm.Buttons.Add(new ModalButtonModel { Name = name, Text = text, EventName = clickEventName, ContainerCssClass = containerCssClass, SecondLine = secondLine });
|
||||
return pm;
|
||||
}
|
||||
|
||||
public PopUpModel AddBtn(PopUpModel pm, string name, string text, string eventName, string containerCssClass = null, bool setDisabledAfterClick = false)
|
||||
{
|
||||
var clickEventName = SetClickEventName(eventName, name, setDisabledAfterClick);
|
||||
pm.Buttons.Add(new ModalButtonModel { Name = name, Text = text, EventName = clickEventName, ContainerCssClass = containerCssClass });
|
||||
return pm;
|
||||
}
|
||||
|
||||
private string SetClickEventName(string originialEventName, string buttonName, bool setDisabledAfterClick)
|
||||
{
|
||||
var eventName = originialEventName;
|
||||
if (setDisabledAfterClick)
|
||||
{
|
||||
eventName = $"function(e) {{ $('#{buttonName}').attr('disabled', true); {originialEventName}(); }}";
|
||||
}
|
||||
return eventName;
|
||||
}
|
||||
}
|
||||
}
|
10
KretaWeb/Models/EditorTemplates/TabStripModel.cs
Normal file
10
KretaWeb/Models/EditorTemplates/TabStripModel.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Web.Helpers.TabStrip;
|
||||
|
||||
namespace Kreta.Web.Models.EditorTemplates
|
||||
{
|
||||
public class TabStripModel
|
||||
{
|
||||
public List<TabStripItemModel> TabList { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue