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

namespace Disco.Web.Areas.Config.Views.AuthorizationRole
{
    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.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.BI.Extensions;
    using Disco.Models.Repository;
    
    #line 2 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
    using Disco.Models.Services.Authorization;
    
    #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("~/Areas/Config/Views/AuthorizationRole/Show.cshtml")]
    public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.AuthorizationRole.ShowModel>
    {
        public Show()
        {
        }
        public override void Execute()
        {
            
            #line 3 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
  
    Authorization.Require(Claims.DiscoAdminAccount);
    ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Authorization Roles", MVC.Config.AuthorizationRole.Index(null), Model.Token.Role.Name);
    Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
    Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
    Html.BundleDeferred("~/Style/Fancytree");
    Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");

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

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

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

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

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

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

WriteLiteral(">Id:\r\n            </th>\r\n            <td>\r\n");

WriteLiteral("                ");

            
            #line 17 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
           Write(Html.DisplayFor(model => model.Token.Role.Id));

            
            #line default
            #line hidden
WriteLiteral("\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <th>Name:\r\n        " +
"    </th>\r\n            <td>");

            
            #line 23 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
           Write(Html.EditorFor(model => model.Token.Role.Name));

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

WriteLiteral("                ");

            
            #line 24 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
           Write(AjaxHelpers.AjaxSave());

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

WriteLiteral("                ");

            
            #line 25 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
           Write(AjaxHelpers.AjaxLoader());

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

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(">\r\n                    $(function () {\r\n                        document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n                            $(\'#Token_Role_Name\')," +
"\r\n                            \'Invalid Name\',\r\n                            \'");

            
            #line 31 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                         Write(Url.Action(MVC.API.AuthorizationRole.UpdateName(Model.Token.Role.Id)));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                            \'RoleName\'\r\n                        );\r\n         " +
"           });\r\n                </script>\r\n            </td>\r\n        </tr>\r\n   " +
"     <tr>\r\n            <th>Linked Groups/Users:</th>\r\n            <td>\r\n");

            
            #line 41 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                
            
            #line default
            #line hidden
            
            #line 41 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                 if (Model.Token.SubjectIds.Count == 0)
                {

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

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

WriteLiteral(">None Associated</span>\r\n");

            
            #line 44 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                }
                else
                {

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

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

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

WriteLiteral(">\r\n");

            
            #line 48 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                        
            
            #line default
            #line hidden
            
            #line 48 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                         foreach (var sg in Model.Subjects)
                        {
                            var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);

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

WriteAttribute("class", Tuple.Create(" class=\"", 2196), Tuple.Create("\"", 2236)
            
            #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2204), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
            
            #line default
            #line hidden
, 2204), false)
);

WriteLiteral(">");

            
            #line 51 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                          if (sg.IsGroup)
                                                                         {

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

WriteLiteral(" class=\"fa fa-users fa-lg\"");

WriteLiteral("></i>");

            
            #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                 
            
            #line default
            #line hidden
            
            #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                            Write(displayName);

            
            #line default
            #line hidden
            
            #line 53 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                             
                                                                         }
                                                                         else
                                                                         {

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

WriteAttribute("href", Tuple.Create(" href=\"", 2676), Tuple.Create("\"", 2746)
            
            #line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
, Tuple.Create(Tuple.Create("", 2683), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
            
            #line default
            #line hidden
, 2683), false)
, Tuple.Create(Tuple.Create("", 2718), Tuple.Create("#UserDetailTab-Authorization", 2718), true)
);

WriteLiteral("><i");

WriteLiteral(" class=\"fa fa-user fa-lg\"");

WriteLiteral("></i>");

            
            #line 57 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                                                                                     Write(displayName);

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

            
            #line 58 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                         }
            
            #line default
            #line hidden
WriteLiteral("</li>\r\n");

            
            #line 59 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                        }

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

            
            #line 61 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                }

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

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

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

WriteLiteral(" class=\"button small\"");

WriteLiteral(">Update</a>\r\n                    <div");

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

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

WriteLiteral(" title=\"Authorization Role Linked Groups/Users\"");

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

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

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

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

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

WriteLiteral(">None Associated</span>\r\n                            <ul");

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

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

WriteLiteral(">\r\n");

            
            #line 68 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                
            
            #line default
            #line hidden
            
            #line 68 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                 foreach (var sg in Model.Subjects)
                                {
                                    var displayName = sg.Id == sg.Name ? sg.Id : string.Format("{0} [{1}]", sg.Name, sg.Id);

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

WriteAttribute("class", Tuple.Create(" class=\"", 3797), Tuple.Create("\"", 3837)
            
            #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
, Tuple.Create(Tuple.Create("", 3805), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
            
            #line default
            #line hidden
, 3805), false)
);

WriteLiteral(" data-subjectid=\"");

            
            #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                                            Write(sg.Id);

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

WriteLiteral(">");

            
            #line 71 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                                                          if (sg.IsGroup)
                                                                                                         {

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

WriteLiteral(" class=\"fa fa-users fa-lg\"");

WriteLiteral("></i>");

            
            #line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                         
            
            #line default
            #line hidden
            
            #line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                    Write(displayName);

            
            #line default
            #line hidden
            
            #line 73 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                                     
                                                                                                         }
                                                                                                         else
                                                                                                         {

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

WriteLiteral(" class=\"fa fa-user fa-lg\"");

WriteLiteral("></i>");

            
            #line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                        
            
            #line default
            #line hidden
            
            #line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                   Write(displayName);

            
            #line default
            #line hidden
            
            #line 77 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                                    
                                                                                                         }
            
            #line default
            #line hidden
WriteLiteral("<i");

WriteLiteral(" class=\"fa fa-times-circle remove\"");

WriteLiteral("></i></li>\r\n");

            
            #line 79 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                }

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

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

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

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

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

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

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

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

WriteLiteral(" class=\"button small\"");

WriteLiteral(">Add</a>\r\n                        </div>\r\n                        <form");

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

WriteAttribute("action", Tuple.Create(" action=\"", 5168), Tuple.Create("\"", 5265)
            
            #line 86 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
         , Tuple.Create(Tuple.Create("", 5177), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.AuthorizationRole.UpdateSubjects(Model.Token.Role.Id, null, true))
            
            #line default
            #line hidden
, 5177), false)
);

WriteLiteral(" method=\"post\"");

WriteLiteral("></form>\r\n                    </div>\r\n                    <script>\r\n             " +
"           (function(){\r\n                            var dialog, textAdd, list, " +
"noSubjects, form;\r\n                            \r\n                            fun" +
"ction showDialog(){\r\n                                if (!dialog){\r\n            " +
"                        dialog = $(\'#Config_AuthRoles_Subjects_Update_Dialog\').d" +
"ialog({\r\n                                        resizable: false,\r\n            " +
"                            modal: true,\r\n                                      " +
"  autoOpen: false,\r\n                                        width: 350,\r\n       " +
"                                 height: 420,\r\n                                 " +
"       buttons: {\r\n                                            \"Save Changes\": s" +
"aveChanges,\r\n                                            Cancel: cancel\r\n       " +
"                                 }\r\n                                    });\r\n\r\n " +
"                                   dialog.on(\'click\', \'.remove\', remove);\r\n\r\n   " +
"                                 list = $(\'#Config_AuthRoles_Subjects_Update_Dia" +
"log_List\');\r\n                                    noSubjects = $(\'#Config_AuthRol" +
"es_Subjects_Update_Dialog_None\');\r\n\r\n                                    textAdd" +
" = $(\'#Config_AuthRoles_Subjects_Update_Dialog_TextAdd\');\r\n\r\n                   " +
"                 textAdd.watermark(\'Search Subjects\')\r\n                         " +
"               .autocomplete({\r\n                                            sour" +
"ce: \'");

            
            #line 115 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                 Write(Url.Action(MVC.API.System.SearchSubjects()));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                                            minLength: 2,\r\n                  " +
"                          focus: function (e, ui) {\r\n                           " +
"                     textAdd.val(ui.item.Id);\r\n                                 " +
"               return false;\r\n                                            },\r\n  " +
"                                          select: function (e, ui) {\r\n          " +
"                                      textAdd.val(ui.item.Id).blur();\r\n         " +
"                                       return false;\r\n                          " +
"                  }\r\n                                        }).data(\'ui-autocom" +
"plete\')._renderItem = function (ul, item) {\r\n                                   " +
"         return $(\"<li></li>\")\r\n                                                " +
".data(\"item.autocomplete\", item)\r\n                                              " +
"  .append(\"<a><strong>\" + item.Name + \"</strong><br>\" + item.Id + \" (\" + item.Ty" +
"pe + \")</a>\")\r\n                                                .appendTo(ul);\r\n " +
"                                       };\r\n\r\n                                   " +
" $(\'#Config_AuthRoles_Subjects_Update_Dialog_Add\').click(add);\r\n                " +
"                }\r\n\r\n                                dialog.dialog(\'open\');\r\n\r\n " +
"                               updateNoSubjects();\r\n                            " +
"    return false;\r\n                            }\r\n\r\n                            " +
"function cancel(){\r\n                                $(this).dialog(\"close\");\r\n\r\n" +
"                                list.find(\'li\').each(function(){\r\n              " +
"                      $this = $(this);\r\n                                    if (" +
"$this.is(\'[data-subjectstatus=\"new\"]\')){\r\n                                      " +
"  $this.remove();\r\n                                    }else{\r\n                 " +
"                       if ($this.is(\'[data-subjectstatus=\"removed\"]\')){\r\n       " +
"                                     $this.show();\r\n                            " +
"            }\r\n                                    }\r\n                          " +
"      });\r\n                            }\r\n\r\n                            function" +
" remove(){\r\n                                $this = $(this).closest(\'li\');\r\n\r\n  " +
"                              if ($this.is(\'[data-subjectstatus=\"new\"]\')){\r\n    " +
"                                $this.remove();\r\n                               " +
" }else{\r\n                                    $this.attr(\'data-subjectstatus\', \'r" +
"emoved\').hide();\r\n                                }\r\n\r\n                         " +
"       updateNoSubjects();\r\n                            }\r\n\r\n                   " +
"         function add(){\r\n                                var id = textAdd.val()" +
";\r\n\r\n                                $.ajax({\r\n                                 " +
"   url: \'");

            
            #line 172 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                     Write(Url.Action(MVC.API.System.Subject()));

            
            #line default
            #line hidden
WriteLiteral("\',\r\n                                    method: \'post\',\r\n                        " +
"            data: { Id: id }\r\n                                }).done(function(r" +
"esponse){\r\n                                    if (response){\r\n                 " +
"                       if (response.IsGroup || response.IsUserAccount) {\r\n      " +
"                                      if (list.find(\'li[data-subjectid=\"\'+respon" +
"se.Id.replace(\'\\\\\', \'\\\\\\\\\')+\'\"]\').length == 0){\r\n                               " +
"             \r\n                                                var liIcon = $(\'<" +
"i>\').addClass(\'fa fa-lg\');\r\n                                                if (" +
"response.Type === \'user\')\r\n                                                    l" +
"iIcon.addClass(\'fa-user\');\r\n                                                else" +
"\r\n                                                    liIcon.addClass(\'fa-users\'" +
");\r\n\r\n                                                var li = $(\'<li>\')\r\n      " +
"                                              .append(liIcon)\r\n                 " +
"                                   .append($(\'<span>\').text(response.Id == respo" +
"nse.Name ?  response.Id : response.Name + \' [\' + response.Id + \']\'))\r\n          " +
"                                          .append($(\'<i>\').addClass(\'fa fa-times" +
"-circle remove\'))\r\n                                                    .addClass" +
"(response.Type)\r\n                                                    .attr(\'data" +
"-subjectid\', response.Id)\r\n                                                    ." +
"attr(\'data-subjectstatus\', \'new\');\r\n\r\n                                          " +
"      list.append(li);\r\n\r\n                                                update" +
"NoSubjects();                                        \r\n                         " +
"                   }else{\r\n                                                alert" +
"(\'That subject has already been added\');\r\n                                      " +
"      }\r\n                                        }else{\r\n                       " +
"                     alert(response.Name + \' [\'+response.Id+\'] is a \' + response" +
".Type + \'. Only users and groups can be added.\');\r\n                             " +
"           }\r\n                                    }else{\r\n                      " +
"                  alert(\'Unknown Id\');\r\n                                    }\r\n " +
"                               }).fail(function(jqXHR, textStatus, errorThrown){" +
"\r\n                                    alert(\'Error: \' + errorThrown);\r\n         " +
"                       });\r\n                                }\r\n\r\n               " +
"             function updateNoSubjects(){\r\n                                if (l" +
"ist.find(\'li:visible\').length > 0)\r\n                                    noSubjec" +
"ts.hide();\r\n                                else\r\n                              " +
"      noSubjects.show();\r\n                            }\r\n\r\n                     " +
"       function saveChanges(){\r\n                                var form = $(\'#C" +
"onfig_AuthRoles_Subjects_Update_Dialog_Form\').empty();\r\n\r\n                      " +
"          list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function(){\r\n     " +
"                               var subjectId = $(this).attr(\'data-subjectid\');\r\n" +
"                                    \r\n                                    form.a" +
"ppend($(\'<input>\').attr({\r\n                                        \'name\': \'Subj" +
"ects\',\r\n                                        \'type\': \'hidden\'\r\n              " +
"                      }).val(subjectId));\r\n\r\n                                })." +
"get();\r\n\r\n                                form.submit();\r\n\r\n                    " +
"            dialog.dialog(\"disable\");\r\n                                dialog.di" +
"alog(\"option\", \"buttons\", null);\r\n                            }\r\n\r\n             " +
"               $(function(){\r\n                                $(\'#Config_AuthRol" +
"es_Subjects_Update\').click(showDialog);\r\n                            });\r\n\r\n    " +
"                    })();\r\n                    </script>\r\n                </div>" +
"\r\n            </td>\r\n        </tr>\r\n        <tr>\r\n            <td");

WriteLiteral(" colspan=\"2\"");

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

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

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

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

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

WriteLiteral(" class=\"button small disabled\"");

WriteLiteral(">Save Changes</a>");

            
            #line 251 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                                                                                                  Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n                </div>\r\n                <script>\r\n                    (function" +
"(){\r\n                        var claimNodes = ");

            
            #line 255 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                     Write(new HtmlString(Newtonsoft.Json.JsonConvert.SerializeObject(Model.ClaimNavigatorFancyTreeNodes)));

            
            #line default
            #line hidden
WriteLiteral(@";

                        $(function(){
                            var saveButton = $('#Config_AuthRoles_Claims_SaveChanges');
                            var ajaxLoading = saveButton.next('.ajaxLoading');

                            var tree = $('#Config_AuthRoles_Claims_Tree').fancytree({
                                source: claimNodes,
                                checkbox: true,
                                selectMode: 3,
                                select: function(){
                                    saveButton.removeClass('disabled');
                                },
                                keyboard: false
                            });

                            saveButton.click(function(){
                                if (!saveButton.is('.disabled')){
                                    var selectedNodes = tree.fancytree('getTree').getSelectedNodes();

                                    var selectedKeys = [];
                                    for (var i = 0; i < selectedNodes.length; i++) {
                                        var node = selectedNodes[i];
                                        if (!node.folder)
                                            selectedKeys.push(node.key);
                                    }

                                    ajaxLoading.show()

                                    $.ajax({
                                        url: '");

            
            #line 285 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
                                         Write(Url.Action(MVC.API.AuthorizationRole.UpdateClaims(Model.Token.Role.Id)));

            
            #line default
            #line hidden
WriteLiteral(@"',
                                        method: 'post',
                                        data: { ClaimKeys: selectedKeys },
                                        traditional: true
                                    }).done(function(response, result){
                                        if (result != 'success' || response != 'OK') {
                                            alert('Unable to save changes:\n' + response);
                                            ajaxLoading.hide();
                                        } else {
                                            saveButton.addClass('disabled');
                                            ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
                                        }
                                    }).fail(function(jqXHR, textStatus, errorThrown){
                                        alert('Error: ' + errorThrown);
                                    });
                                }
                                return false;
                            });
                        });
                    })();
                </script>
            </td>
        </tr>
    </table>
</div>
<div");

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

WriteLiteral(">\r\n");

WriteLiteral("    ");

            
            #line 311 "..\..\Areas\Config\Views\AuthorizationRole\Show.cshtml"
Write(Html.ActionLinkButton("Delete", MVC.API.AuthorizationRole.Delete(Model.Token.Role.Id, true), "Config_AuthRoles_Actions_Delete_Button"));

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

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

WriteLiteral(" title=\"Delete this Authorization Role?\"");

WriteLiteral(">\r\n        <p>\r\n            <i");

WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg warning\"");

WriteLiteral("></i>\r\n            This item will be permanently deleted and cannot be recovered." +
"<br />\r\n            <br />\r\n            Are you sure?\r\n        </p>\r\n    </div>\r" +
"\n    <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
        $(function () {
            var button = $('#Config_AuthRoles_Actions_Delete_Button');
            var buttonDialog = $('#Config_AuthRoles_Actions_Delete_Dialog');
            var buttonLink = button.attr('href');
            button.attr('href', '#');
            button.click(function () {
                buttonDialog.dialog('open');
                return false;
            });
            buttonDialog.dialog({
                resizable: false,
                modal: true,
                autoOpen: false,
                buttons: {
                    ""Delete"": function () {
                        var $this = $(this);
                        $this.dialog(""disable"");
                        $this.dialog(""option"", ""buttons"", null);
                        window.location.href = buttonLink;
                    },
                    Cancel: function () {
                        $(this).dialog(""close"");
                    }
                }
            });
        });
    </script>
</div>
");

        }
    }
}
#pragma warning restore 1591
