#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Disco.Web.Views.Shared
{
    using System;
    
    #line 2 "..\..\Views\Shared\_ExportFields.cshtml"
    using System.Collections.Generic;
    
    #line default
    #line hidden
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Text;
    using System.Web;
    using System.Web.Helpers;
    using System.Web.Mvc;
    using System.Web.Mvc.Ajax;
    using System.Web.Mvc.Html;
    using System.Web.Routing;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.WebPages;
    using Disco;
    using Disco.Models.Repository;
    
    #line 1 "..\..\Views\Shared\_ExportFields.cshtml"
    using Disco.Models.Services.Exporting;
    
    #line default
    #line hidden
    using Disco.Services;
    using Disco.Services.Authorization;
    using Disco.Services.Web;
    using Disco.Web;
    using Disco.Web.Extensions;
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
    [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_ExportFields.cshtml")]
    public partial class _ExportFields : Disco.Services.Web.WebViewPage<List<ExportOptionGroup>>
    {
        public _ExportFields()
        {
        }
        public override void Execute()
        {
            
            #line 4 "..\..\Views\Shared\_ExportFields.cshtml"
  
    var optionId = 0;

            
            #line default
            #line hidden
WriteLiteral("\r\n<div");

WriteLiteral(" id=\"Export_Fields\"");

WriteLiteral(" class=\"form\"");

WriteLiteral(" style=\"width: 570px; margin-top: 15px;\"");

WriteLiteral(">\r\n    <h2>Export Fields <a");

WriteLiteral(" id=\"Export_Fields_Defaults\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">(Defaults)</a></h2>\r\n    <table>\r\n");

            
            #line 10 "..\..\Views\Shared\_ExportFields.cshtml"
        
            
            #line default
            #line hidden
            
            #line 10 "..\..\Views\Shared\_ExportFields.cshtml"
         foreach (var optionGroup in Model)
        {
            var optionFields = optionGroup.ToList();
            var itemsPerColumn = (int)Math.Ceiling((double)optionFields.Count / 2);

            
            #line default
            #line hidden
WriteLiteral("            <tr>\r\n                <th");

WriteLiteral(" style=\"width: 120px;\"");

WriteLiteral(">\r\n");

WriteLiteral("                    ");

            
            #line 16 "..\..\Views\Shared\_ExportFields.cshtml"
               Write(optionGroup.Name);

            
            #line default
            #line hidden
WriteLiteral("\r\n");

            
            #line 17 "..\..\Views\Shared\_ExportFields.cshtml"
                    
            
            #line default
            #line hidden
            
            #line 17 "..\..\Views\Shared\_ExportFields.cshtml"
                     if (optionFields.Count > 2)
                    {

            
            #line default
            #line hidden
WriteLiteral("                        <span");

WriteLiteral(" style=\"display: block;\"");

WriteLiteral(" class=\"select\"");

WriteLiteral("><a");

WriteLiteral(" class=\"selectAll\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">ALL</a> | <a");

WriteLiteral(" class=\"selectNone\"");

WriteLiteral(" href=\"#\"");

WriteLiteral(">NONE</a></span>\r\n");

            
            #line 20 "..\..\Views\Shared\_ExportFields.cshtml"
                    }

            
            #line default
            #line hidden
WriteLiteral("                </th>\r\n                <td>\r\n                    <div");

WriteLiteral(" class=\"Export_Fields_Group\"");

WriteLiteral(">\r\n                        <table");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n                            <tr>\r\n                                <td");

WriteLiteral(" style=\"width: 50%\"");

WriteLiteral(">\r\n                                    <ul");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n");

            
            #line 28 "..\..\Views\Shared\_ExportFields.cshtml"
                                        
            
            #line default
            #line hidden
            
            #line 28 "..\..\Views\Shared\_ExportFields.cshtml"
                                         foreach (var optionItem in optionFields.Take(itemsPerColumn))
                                        {

            
            #line default
            #line hidden
WriteLiteral("                                            <li");

WriteAttribute("title", Tuple.Create(" title=\"", 1349), Tuple.Create("\"", 1380)
            
            #line 30 "..\..\Views\Shared\_ExportFields.cshtml"
, Tuple.Create(Tuple.Create("", 1357), Tuple.Create<System.Object, System.Int32>(optionItem.Description
            
            #line default
            #line hidden
, 1357), false)
);

WriteLiteral(">\r\n                                                <input");

WriteLiteral(" type=\"checkbox\"");

WriteAttribute("id", Tuple.Create(" id=\"", 1454), Tuple.Create("\"", 1488)
, Tuple.Create(Tuple.Create("", 1459), Tuple.Create("Export_Field_Option_", 1459), true)
            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
               , Tuple.Create(Tuple.Create("", 1479), Tuple.Create<System.Object, System.Int32>(optionId
            
            #line default
            #line hidden
, 1479), false)
);

WriteAttribute("name", Tuple.Create(" name=\"", 1489), Tuple.Create("\"", 1546)
, Tuple.Create(Tuple.Create("", 1496), Tuple.Create("Options.", 1496), true)
            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
                                         , Tuple.Create(Tuple.Create("", 1504), Tuple.Create<System.Object, System.Int32>(optionItem.CustomKey ?? optionItem.Name
            
            #line default
            #line hidden
, 1504), false)
);

WriteAttribute("value", Tuple.Create(" value=\"", 1547), Tuple.Create("\"", 1590)
            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                            , Tuple.Create(Tuple.Create("", 1555), Tuple.Create<System.Object, System.Int32>(optionItem.CustomValue ?? "true"
            
            #line default
            #line hidden
, 1555), false)
);

WriteLiteral(" ");

            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                            Write(optionItem.IsDefault ? " data-default" : null);

            
            #line default
            #line hidden
WriteLiteral(" ");

            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                                                                             Write((optionItem.IsChecked) ? " checked " : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 1696), Tuple.Create("\"", 1731)
, Tuple.Create(Tuple.Create("", 1702), Tuple.Create("Export_Field_Option_", 1702), true)
            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                                                                                  , Tuple.Create(Tuple.Create("", 1722), Tuple.Create<System.Object, System.Int32>(optionId
            
            #line default
            #line hidden
, 1722), false)
);

WriteLiteral(">");

            
            #line 31 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                                                                                                                                                                        Write(optionItem.DisplayName);

            
            #line default
            #line hidden
WriteLiteral("</label>\r\n                                            </li>\r\n");

            
            #line 33 "..\..\Views\Shared\_ExportFields.cshtml"
                                            optionId++;
                                        }

            
            #line default
            #line hidden
WriteLiteral("                                    </ul>\r\n                                </td>\r" +
"\n                                <td");

WriteLiteral(" style=\"width: 50%\"");

WriteLiteral(">\r\n                                    <ul");

WriteLiteral(" class=\"none\"");

WriteLiteral(">\r\n");

            
            #line 39 "..\..\Views\Shared\_ExportFields.cshtml"
                                        
            
            #line default
            #line hidden
            
            #line 39 "..\..\Views\Shared\_ExportFields.cshtml"
                                         foreach (var optionItem in optionFields.Skip(itemsPerColumn))
                                        {

            
            #line default
            #line hidden
WriteLiteral("                                            <li");

WriteAttribute("title", Tuple.Create(" title=\"", 2305), Tuple.Create("\"", 2336)
            
            #line 41 "..\..\Views\Shared\_ExportFields.cshtml"
, Tuple.Create(Tuple.Create("", 2313), Tuple.Create<System.Object, System.Int32>(optionItem.Description
            
            #line default
            #line hidden
, 2313), false)
);

WriteLiteral(">\r\n                                                <input");

WriteLiteral(" type=\"checkbox\"");

WriteAttribute("id", Tuple.Create(" id=\"", 2410), Tuple.Create("\"", 2444)
, Tuple.Create(Tuple.Create("", 2415), Tuple.Create("Export_Field_Option_", 2415), true)
            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
               , Tuple.Create(Tuple.Create("", 2435), Tuple.Create<System.Object, System.Int32>(optionId
            
            #line default
            #line hidden
, 2435), false)
);

WriteAttribute("name", Tuple.Create(" name=\"", 2445), Tuple.Create("\"", 2502)
, Tuple.Create(Tuple.Create("", 2452), Tuple.Create("Options.", 2452), true)
            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
                                         , Tuple.Create(Tuple.Create("", 2460), Tuple.Create<System.Object, System.Int32>(optionItem.CustomKey ?? optionItem.Name
            
            #line default
            #line hidden
, 2460), false)
);

WriteAttribute("value", Tuple.Create(" value=\"", 2503), Tuple.Create("\"", 2546)
            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                            , Tuple.Create(Tuple.Create("", 2511), Tuple.Create<System.Object, System.Int32>(optionItem.CustomValue ?? "true"
            
            #line default
            #line hidden
, 2511), false)
);

WriteLiteral(" ");

            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                            Write(optionItem.IsDefault ? " data-default" : null);

            
            #line default
            #line hidden
WriteLiteral(" ");

            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                                                                             Write((optionItem.IsChecked) ? " checked " : null);

            
            #line default
            #line hidden
WriteLiteral(" /><label");

WriteAttribute("for", Tuple.Create(" for=\"", 2652), Tuple.Create("\"", 2687)
, Tuple.Create(Tuple.Create("", 2658), Tuple.Create("Export_Field_Option_", 2658), true)
            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                                                                                  , Tuple.Create(Tuple.Create("", 2678), Tuple.Create<System.Object, System.Int32>(optionId
            
            #line default
            #line hidden
, 2678), false)
);

WriteLiteral(">");

            
            #line 42 "..\..\Views\Shared\_ExportFields.cshtml"
                                                                                                                                                                                                                                                                                                                                                        Write(optionItem.DisplayName);

            
            #line default
            #line hidden
WriteLiteral("</label>\r\n                                            </li>\r\n");

            
            #line 44 "..\..\Views\Shared\_ExportFields.cshtml"
                                            optionId++;
                                        }

            
            #line default
            #line hidden
WriteLiteral("                                    </ul>\r\n                                </td>\r" +
"\n                            </tr>\r\n                        </table>\r\n          " +
"          </div>\r\n                </td>\r\n            </tr>\r\n");

            
            #line 53 "..\..\Views\Shared\_ExportFields.cshtml"

        }

            
            #line default
            #line hidden
WriteLiteral(@"    </table>
</div>
<script>
    $(function () {
        var $exportFields = $('#Export_Fields');
        var $form = $exportFields.closest('form');
        var $exportingDialog = null;

        $exportFields.on('click', 'a.selectAll,a.selectNone', function (e) {
            e.preventDefault();

            const $this = $(this);
            $this.closest('tr').find('input').prop('checked', $this.is('.selectAll'));

            return false;
        });

        $('#Export_Fields_Defaults').click(function (e) {
            e.preventDefault();
            $exportFields.find('input').prop('checked', false);
            $exportFields.find('input[data-default]').prop('checked', true);
            return false;
        });
    });
</script>
");

        }
    }
}
#pragma warning restore 1591
