init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
22
KretaWeb/Helpers/GroupControlExtensions.cs
Normal file
22
KretaWeb/Helpers/GroupControlExtensions.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Kreta.Web.Helpers
|
||||
{
|
||||
public static class GroupControlExtensions
|
||||
{
|
||||
public static MvcHtmlString RenderGroupStart(this HtmlHelper helper, string name, int size = 12, string paramGroupId = "")
|
||||
{
|
||||
var groupId = string.IsNullOrWhiteSpace(paramGroupId) ? name : paramGroupId;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendFormat("<div id='{0}' style='border-top: 1px solid gainsboro; padding: 0px; margin-top: 20px;' class='{1}'>", groupId, BootsrapHelper.GetSizeClasses(size)).AppendLine();
|
||||
sb.AppendFormat("<span style='position: absolute; top: -24px; left: 5px; padding: 0px 5px 0px 5px;' class='k-content windowInputLabel'>{0}</span><br />", name);
|
||||
return new MvcHtmlString(sb.ToString());
|
||||
}
|
||||
|
||||
public static MvcHtmlString RenderGroupEnd(this HtmlHelper helper)
|
||||
{
|
||||
return new MvcHtmlString("</div>");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue