<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_WorkFlow_ApprovingSetup, App_Web_td0s0o5j" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style type="text/css">
        table tbody tr th input[type=checkbox] {
            margin-left: 0 !important;
        }

        .alink {
            display: inline-block;
            padding: 4px 12px;
            margin-bottom: 0;
            font-size: 12px;
            font-weight: normal;
            line-height: 1.42857143;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            -ms-touch-action: manipulation;
            touch-action: manipulation;
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            border: 1px solid transparent;
            border-radius: 4px;
        }

        .loadingbg {
            background-image: url("/Images/loading_bg.png");
            position: fixed;
            top: 50%;
            left: 50%;
            background-repeat: no-repeat;
            height: 107px;
            text-align: center;
            vertical-align: middle;
            width: 100px;
            z-index: 99;
            background-position: center;
        }

        .loadingtext {
            color: #FFF;
        }

        .ui-datepicker-trigger {
            margin-top: -5px;
            margin-left: -9px;
        }
    </style>
    <script>
        function SearchUser(txtSearch1, cblEmployees) {
            if ($(txtSearch1).val() != "") {
                var count = 0;
                $(cblEmployees).children('tbody').children('tr').each(function () {
                    var match = false;
                    $(this).children('td').children('label').each(function () {
                        if ($(this).text().toUpperCase().indexOf($(txtSearch1).val().toUpperCase()) > -1)
                            match = true;
                    });
                    if (match) {
                        $(this).show();
                        count++;
                    }
                    else { $(this).hide(); }
                });
                $('#spnCount1').html((count) + ' match');
            }
            else {
                $(cblEmployees).children('tbody').children('tr').each(function () {
                    $(this).show();
                });
                $('#spnCount1').html('');
            }
        }

        function SearchRole(txtSearch2, cblEmployees) {
            if ($(txtSearch2).val() != "") {
                var count = 0;
                $(cblEmployees).children('tbody').children('tr').each(function () {
                    var match = false;
                    $(this).children('td').children('label').each(function () {
                        if ($(this).text().toUpperCase().indexOf($(txtSearch2).val().toUpperCase()) > -1)
                            match = true;
                    });
                    if (match) {
                        $(this).show();
                        count++;
                    }
                    else { $(this).hide(); }
                });
                $('#spnCount2').html((count) + ' match');
            }
            else {
                $(cblEmployees).children('tbody').children('tr').each(function () {
                    $(this).show();
                });
                $('#spnCount2').html('');
            }
        }

    </script>
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="247"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fal fa-search"></i>
                                        <asp:Label ID="Label3" runat="server" Text="TRANSACTION"></asp:Label>
                                    </header>
                                </div>
                            </div>
                        </div>
                        <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                            <ContentTemplate>
                                <div class="himsBoxContent card-body">
                                    <div class="contentHolder">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="lblFunctionality" runat="server" Text="Functionality" SkinID="MandatoryLabel"></asp:Label>
                                            </div>
                                            <div class="fLeft">
                                                <asp:DropDownList ID="ddlFunctionality" runat="server" SkinID="CustomWidthDropDownList"
                                                    AutoPostBack="true" OnSelectedIndexChanged="ddlFunctionality_SelectedIndexChanged"
                                                    CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="contentHolder col-md-12">
                                            <div id="Div5" runat="server" class="table-responsive">
                                                <asp:GridView ID="ApprovingSetupGdv" runat="server" AutoGenerateColumns="False"
                                                    OnRowDataBound="ApprovingSetupGdv_RowDataBound" OnPageIndexChanging="ApprovingSetupGdv_PageIndexChanging" CssClass="table table-striped table-bordered table-hover"
                                                    SkinID="" ShowHeader="true" PagerSettings-Visible="false" DataKeyNames="WorkFunctionalityDeptId,ApprovingDepartmentId">
                                                    <Columns>
                                                        <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                            HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <label class="rt-chkbox rt-chkbox-outline">
                                                                    <asp:CheckBox ID="chk" runat="server" />
                                                                    <span></span>
                                                                </label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="DeptName" HeaderText="Department" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left" />
                                                        <asp:TemplateField HeaderText="User" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <div id="DepartmentDiv" runat="server" class="fLeft pRight5"
                                                                    style="overflow-y: auto; overflow-x: hidden; height: 180px; width: 200px; border-color: Silver; border-width: thin; border-style: ridge">
                                                                    <asp:TextBox ID="txtSearch1" runat="server" placeholder="Search Type" Width="150px"></asp:TextBox>
                                                                    <span id="spnCount1"></span>
                                                                    <asp:CheckBoxList ID="chkuser" runat="server"></asp:CheckBoxList>
                                                                </div>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Role" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left"
                                                            ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                            <ItemTemplate>
                                                                <div id="DepartmentDiv1" runat="server" class="fLeft pRight5"
                                                                    style="overflow-y: auto; overflow-x: hidden; height: 180px; width: 200px; border-color: Silver; border-width: thin; border-style: ridge">
                                                                    <asp:TextBox ID="txtSearch2" runat="server" placeholder="Search Type" Width="150px"></asp:TextBox>
                                                                    <span id="spnCount2"></span>
                                                                    <asp:CheckBoxList ID="chkRole" runat="server"></asp:CheckBoxList>
                                                                </div>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/building-master-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/building-master")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
