Files
Disco/Disco.Web/App_Code/AjaxHelpers.cshtml
T
Gary Sharp a099d68915 Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
2013-10-10 19:13:16 +11:00

32 lines
1.3 KiB
Plaintext

@* Generator: WebPagesHelper *@
@using Disco.BI.Extensions;
@using Disco.Web;
@using Disco.Services.Web;
@helper AjaxLoader(string id = null)
{
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
<span @(id!=null ? new HtmlString(string.Format("id=\"{0}_loading\"", id)) : new HtmlString(string.Empty)) class="ajaxHelperIcon ajaxLoading" title="Loading..."></span><span @(id != null ? new HtmlString(string.Format("id=\"{0}_ok\"", id)) : new HtmlString(string.Empty)) class="ajaxHelperIcon ajaxOk"
title="Ok"></span>
}
@helper AjaxSave()
{
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
<span class="ajaxHelperIcon ajaxSave" title="Save Changes"></span>
}
@helper AjaxRemove()
{
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
<span class="ajaxHelperIcon ajaxRemove" title="Remove"></span>
}
@helper JsonDate(DateTime? date)
{
if (date.HasValue)
{
var d = date.Value;
@(new HtmlString(string.Format("new Date({0}, {1}, {2}, {3}, {4}, {5})", d.Year, d.Month - 1, d.Day, d.Hour, d.Minute, d.Second)))
}
else
{
@(new HtmlString("null"))
}
}