GIT: perform LF normalization
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
@* Generator: WebPagesHelper *@
|
||||
@using Disco.BI.Extensions;
|
||||
@using Disco.Web;
|
||||
@using Disco.Web.Extensions;
|
||||
@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"))
|
||||
}
|
||||
@* Generator: WebPagesHelper *@
|
||||
@using Disco.BI.Extensions;
|
||||
@using Disco.Web;
|
||||
@using Disco.Web.Extensions;
|
||||
@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"))
|
||||
}
|
||||
}
|
||||
@@ -1,211 +1,211 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using System.Web.WebPages.Html;
|
||||
|
||||
#line 2 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
using Disco.BI.Extensions;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
using Disco.Web;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 4 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
public class AjaxHelpers : System.Web.WebPages.HelperPage
|
||||
{
|
||||
|
||||
public static System.Web.WebPages.HelperResult AjaxLoader(string id = null)
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 6 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " <span ");
|
||||
|
||||
|
||||
|
||||
#line 8 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, id!=null ? new HtmlString(string.Format("id=\"{0}_loading\"", id)) : new HtmlString(string.Empty));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " class=\"ajaxHelperIcon ajaxLoading\" title=\"Loading...\"></span>");
|
||||
|
||||
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, "<span ");
|
||||
|
||||
|
||||
|
||||
#line 8 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, id != null ? new HtmlString(string.Format("id=\"{0}_ok\"", id)) : new HtmlString(string.Empty));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " class=\"ajaxHelperIcon ajaxOk\"\r\n title=\"Ok\"></span>\r\n");
|
||||
|
||||
|
||||
|
||||
#line 10 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static System.Web.WebPages.HelperResult AjaxSave()
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 12 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " <span class=\"ajaxHelperIcon ajaxSave\" title=\"Save Changes\"></span>\r\n");
|
||||
|
||||
|
||||
|
||||
#line 15 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static System.Web.WebPages.HelperResult AjaxRemove()
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 17 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " <span class=\"ajaxHelperIcon ajaxRemove\" title=\"Remove\"></span>\r\n");
|
||||
|
||||
|
||||
|
||||
#line 20 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static System.Web.WebPages.HelperResult JsonDate(DateTime? date)
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 22 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
if (date.HasValue)
|
||||
{
|
||||
var d = date.Value;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 26 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, 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)));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 26 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 30 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, new HtmlString("null"));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 30 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public AjaxHelpers()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using System.Web.WebPages.Html;
|
||||
|
||||
#line 2 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
using Disco.BI.Extensions;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
using Disco.Web;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 4 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.0.0")]
|
||||
public class AjaxHelpers : System.Web.WebPages.HelperPage
|
||||
{
|
||||
|
||||
public static System.Web.WebPages.HelperResult AjaxLoader(string id = null)
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 6 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " <span ");
|
||||
|
||||
|
||||
|
||||
#line 8 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, id!=null ? new HtmlString(string.Format("id=\"{0}_loading\"", id)) : new HtmlString(string.Empty));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " class=\"ajaxHelperIcon ajaxLoading\" title=\"Loading...\"></span>");
|
||||
|
||||
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, "<span ");
|
||||
|
||||
|
||||
|
||||
#line 8 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, id != null ? new HtmlString(string.Format("id=\"{0}_ok\"", id)) : new HtmlString(string.Empty));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " class=\"ajaxHelperIcon ajaxOk\"\r\n title=\"Ok\"></span>\r\n");
|
||||
|
||||
|
||||
|
||||
#line 10 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static System.Web.WebPages.HelperResult AjaxSave()
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 12 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " <span class=\"ajaxHelperIcon ajaxSave\" title=\"Save Changes\"></span>\r\n");
|
||||
|
||||
|
||||
|
||||
#line 15 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static System.Web.WebPages.HelperResult AjaxRemove()
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 17 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
WriteLiteralTo(@__razor_helper_writer, " <span class=\"ajaxHelperIcon ajaxRemove\" title=\"Remove\"></span>\r\n");
|
||||
|
||||
|
||||
|
||||
#line 20 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static System.Web.WebPages.HelperResult JsonDate(DateTime? date)
|
||||
{
|
||||
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {
|
||||
|
||||
|
||||
|
||||
#line 22 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
if (date.HasValue)
|
||||
{
|
||||
var d = date.Value;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 26 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, 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)));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 26 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 30 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
WriteTo(@__razor_helper_writer, new HtmlString("null"));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 30 "..\..\App_Code\AjaxHelpers.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public AjaxHelpers()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
|
||||
@@ -1,132 +1,132 @@
|
||||
@* Generator: WebPagesHelper *@
|
||||
@using Disco.BI.Extensions;
|
||||
@using Disco.Models.Repository;
|
||||
@using Disco.Web;
|
||||
@using System.Web.Mvc
|
||||
@using System.Web.Mvc.Html;
|
||||
@using Disco.Web.Extensions;
|
||||
@helper FriendlyDate(DateTime d)
|
||||
{
|
||||
<span title="@d.ToFullDateTime()" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy()</span>
|
||||
}
|
||||
@helper FriendlyDate(DateTime? d, string NullValue = "N/A")
|
||||
{
|
||||
<span title="@d.ToFullDateTime(NullValue)" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy(NullValue)</span>
|
||||
}
|
||||
@helper RadioButtonList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1)
|
||||
{
|
||||
@ItemList("radio", id, items, columns)
|
||||
}
|
||||
@helper CheckBoxList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null)
|
||||
{
|
||||
@ItemList("checkbox", id, items, columns, alignEven, forceUniqueIds)
|
||||
}
|
||||
@helper ItemList(string inputType, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null)
|
||||
{
|
||||
int itemsPerColumn = items.Count / columns;
|
||||
int columnWidth = (100 / columns);
|
||||
var itemNextId = 0;
|
||||
<table class="none">
|
||||
<tr>
|
||||
@for (int i = 0; i < columns; i++)
|
||||
{
|
||||
<td@(alignEven ? new HtmlString(string.Format(" style=\"width: {0}%\"", columnWidth)) : new HtmlString(string.Empty))>
|
||||
<ul class="none">
|
||||
@{
|
||||
int itemsForThisColumn = itemsPerColumn + (items.Count % columns > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < items.Count; i2++)
|
||||
{
|
||||
var item = items[itemNextId];
|
||||
itemNextId++;
|
||||
var itemId = forceUniqueIds.HasValue ? string.Format("{0}_{1}_{2}", id, item.Value, forceUniqueIds++) : string.Format("{0}_{1}", id, item.Value);
|
||||
<li>
|
||||
<input id="@itemId" name="@id" value="@item.Value" type="@inputType" @(item.Selected ? "checked=\"checked\" " : " ")/><label for="@itemId">@item.Text</label></li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
}
|
||||
@helper FriendlyDateAndUser(DateTime? d, User u, string DateNullValue = "N/A")
|
||||
{
|
||||
@FriendlyDate(d, DateNullValue);
|
||||
@FriendlyUser(u, null, "by");
|
||||
}
|
||||
@helper FriendlyDateAndUser(DateTime d, User u)
|
||||
{
|
||||
@FriendlyDate(d);
|
||||
@FriendlyUser(u, null, "by");
|
||||
}
|
||||
@helper FriendlyDateAndTitleUser(DateTime? d, User u, string DateNullValue = "N/A")
|
||||
{
|
||||
<span title="@d.ToFullDateTime(DateNullValue) by @u" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy(DateNullValue)</span>
|
||||
}
|
||||
@helper FriendlyDateAndTitleUser(DateTime d, User u)
|
||||
{
|
||||
<span title="@d.ToFullDateTime() by @u" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy()</span>
|
||||
}
|
||||
@helper FriendlyUser(User u, string nullValue = null, string prepend = null)
|
||||
{
|
||||
if (u != null)
|
||||
{
|
||||
@prepend <span title="@u">@u.Id</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@nullValue</span>
|
||||
}
|
||||
}
|
||||
@helper Breadcrumbs(List<Tuple<string, ActionResult>> BreadCrumbs)
|
||||
{
|
||||
for (int index = 0; index < BreadCrumbs.Count; index++)
|
||||
{
|
||||
var breadCrumb = BreadCrumbs[index];
|
||||
if (index != 0)
|
||||
{
|
||||
<span>></span>
|
||||
}
|
||||
if (breadCrumb.Item2 == null)
|
||||
{
|
||||
@breadCrumb.Item1
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.GetPageHelper().ActionLink(breadCrumb.Item1, breadCrumb.Item2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@helper Breadcrumbs(string Title)
|
||||
{
|
||||
@Title
|
||||
}
|
||||
@helper BreadcrumbsTitle(List<Tuple<string, ActionResult>> BreadCrumbs)
|
||||
{
|
||||
for (int index = 0; index < BreadCrumbs.Count; index++)
|
||||
{
|
||||
var breadCrumb = BreadCrumbs[index];
|
||||
if (index != 0)
|
||||
{
|
||||
@(new HtmlString(" > "))
|
||||
}
|
||||
@breadCrumb.Item1
|
||||
}
|
||||
}
|
||||
@helper BreadcrumbsTitle(string Title)
|
||||
{
|
||||
@Title
|
||||
}
|
||||
@helper CheckboxBulkSelect(string BulkSelectContainerId, string ParentJQuerySelector = null)
|
||||
{Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
|
||||
<span id="@BulkSelectContainerId" class="checkboxBulkSelectContainer">
|
||||
@if (string.IsNullOrWhiteSpace(ParentJQuerySelector))
|
||||
{
|
||||
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect(); });</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect({ parentSelector: '@(ParentJQuerySelector)' }); });</script>
|
||||
}
|
||||
</span>
|
||||
@* Generator: WebPagesHelper *@
|
||||
@using Disco.BI.Extensions;
|
||||
@using Disco.Models.Repository;
|
||||
@using Disco.Web;
|
||||
@using System.Web.Mvc
|
||||
@using System.Web.Mvc.Html;
|
||||
@using Disco.Web.Extensions;
|
||||
@helper FriendlyDate(DateTime d)
|
||||
{
|
||||
<span title="@d.ToFullDateTime()" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy()</span>
|
||||
}
|
||||
@helper FriendlyDate(DateTime? d, string NullValue = "N/A")
|
||||
{
|
||||
<span title="@d.ToFullDateTime(NullValue)" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy(NullValue)</span>
|
||||
}
|
||||
@helper RadioButtonList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1)
|
||||
{
|
||||
@ItemList("radio", id, items, columns)
|
||||
}
|
||||
@helper CheckBoxList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null)
|
||||
{
|
||||
@ItemList("checkbox", id, items, columns, alignEven, forceUniqueIds)
|
||||
}
|
||||
@helper ItemList(string inputType, string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1, bool alignEven = true, int? forceUniqueIds = null)
|
||||
{
|
||||
int itemsPerColumn = items.Count / columns;
|
||||
int columnWidth = (100 / columns);
|
||||
var itemNextId = 0;
|
||||
<table class="none">
|
||||
<tr>
|
||||
@for (int i = 0; i < columns; i++)
|
||||
{
|
||||
<td@(alignEven ? new HtmlString(string.Format(" style=\"width: {0}%\"", columnWidth)) : new HtmlString(string.Empty))>
|
||||
<ul class="none">
|
||||
@{
|
||||
int itemsForThisColumn = itemsPerColumn + (items.Count % columns > i ? 1 : 0);
|
||||
for (int i2 = 0; i2 < itemsForThisColumn && itemNextId < items.Count; i2++)
|
||||
{
|
||||
var item = items[itemNextId];
|
||||
itemNextId++;
|
||||
var itemId = forceUniqueIds.HasValue ? string.Format("{0}_{1}_{2}", id, item.Value, forceUniqueIds++) : string.Format("{0}_{1}", id, item.Value);
|
||||
<li>
|
||||
<input id="@itemId" name="@id" value="@item.Value" type="@inputType" @(item.Selected ? "checked=\"checked\" " : " ")/><label for="@itemId">@item.Text</label></li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
}
|
||||
@helper FriendlyDateAndUser(DateTime? d, User u, string DateNullValue = "N/A")
|
||||
{
|
||||
@FriendlyDate(d, DateNullValue);
|
||||
@FriendlyUser(u, null, "by");
|
||||
}
|
||||
@helper FriendlyDateAndUser(DateTime d, User u)
|
||||
{
|
||||
@FriendlyDate(d);
|
||||
@FriendlyUser(u, null, "by");
|
||||
}
|
||||
@helper FriendlyDateAndTitleUser(DateTime? d, User u, string DateNullValue = "N/A")
|
||||
{
|
||||
<span title="@d.ToFullDateTime(DateNullValue) by @u" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy(DateNullValue)</span>
|
||||
}
|
||||
@helper FriendlyDateAndTitleUser(DateTime d, User u)
|
||||
{
|
||||
<span title="@d.ToFullDateTime() by @u" data-discodatetime="@d.ToSortableDateTime()" class="date nowrap">@d.ToFuzzy()</span>
|
||||
}
|
||||
@helper FriendlyUser(User u, string nullValue = null, string prepend = null)
|
||||
{
|
||||
if (u != null)
|
||||
{
|
||||
@prepend <span title="@u">@u.Id</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@nullValue</span>
|
||||
}
|
||||
}
|
||||
@helper Breadcrumbs(List<Tuple<string, ActionResult>> BreadCrumbs)
|
||||
{
|
||||
for (int index = 0; index < BreadCrumbs.Count; index++)
|
||||
{
|
||||
var breadCrumb = BreadCrumbs[index];
|
||||
if (index != 0)
|
||||
{
|
||||
<span>></span>
|
||||
}
|
||||
if (breadCrumb.Item2 == null)
|
||||
{
|
||||
@breadCrumb.Item1
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.GetPageHelper().ActionLink(breadCrumb.Item1, breadCrumb.Item2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@helper Breadcrumbs(string Title)
|
||||
{
|
||||
@Title
|
||||
}
|
||||
@helper BreadcrumbsTitle(List<Tuple<string, ActionResult>> BreadCrumbs)
|
||||
{
|
||||
for (int index = 0; index < BreadCrumbs.Count; index++)
|
||||
{
|
||||
var breadCrumb = BreadCrumbs[index];
|
||||
if (index != 0)
|
||||
{
|
||||
@(new HtmlString(" > "))
|
||||
}
|
||||
@breadCrumb.Item1
|
||||
}
|
||||
}
|
||||
@helper BreadcrumbsTitle(string Title)
|
||||
{
|
||||
@Title
|
||||
}
|
||||
@helper CheckboxBulkSelect(string BulkSelectContainerId, string ParentJQuerySelector = null)
|
||||
{Html.GetPageHelper().BundleDeferred("~/ClientScripts/Modules/Disco-jQueryExtensions");
|
||||
<span id="@BulkSelectContainerId" class="checkboxBulkSelectContainer">
|
||||
@if (string.IsNullOrWhiteSpace(ParentJQuerySelector))
|
||||
{
|
||||
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect(); });</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<script type="text/javascript">$(function () { $('#@(BulkSelectContainerId)').checkboxBulkSelect({ parentSelector: '@(ParentJQuerySelector)' }); });</script>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user