<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Communication_BehaviourList, App_Web_qzg5raal" title="My Behaviour" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ 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" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
     <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            height: 100%;
        }

        .modal {
            display: none;
            position: absolute;
            top: 0px;
            left: 0px;
            background-color: black;
            z-index: 100;
            opacity: 0.8;
            filter: alpha(opacity=60);
            -moz-opacity: 0.8;
            min-height: 100%;
        }

        #divImage {
            display: none;
            z-index: 9999999;
            position: fixed;
            top: 0 !important;
            left: 0 !important;
            background-color: White;
            height: 100%;
            width: 600px;
            padding: 3px;
            border: solid 1px black;
            background: #33333375;
            width: 100%;
        }
    </style>
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <hims:EmployeeSearchControl ID="EmployeeSearch" Visible="false" runat="server" />
            <div id="divContentPage" class="divcontentpagemargin">
                
                            <div class="dashBoardLeftCont" runat="server" id="ScreenGroupTableId">
                                <div class="himssuHeader3WireBox">
                                    <table>
                                        <tr>
                                            <td>
                                                <div class="himsBoxContent">
                                                    <div class="leftUlMenu">
                                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl1" ScreenGroupId="172"
                                                            Visible="true" runat="server" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="whiteboxpaddingleft row">
                                <div class="himssuHeader5WireBox card card-box">
                                    <div class="himsBoxHeader card-head">
                                        <asp:Panel ID="Panel1" runat="server">
                                            <div class="leftdiv">
                                            </div>
                                            <div class="himsBoxTitle">
                                                <div class="headerText">
                                                    <header>
                                                        <i class="fas fa-search"></i>
                                                    <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                                        </header>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="himsBoxContent card-body">
                                        <asp:Panel ID="DetailPanel" runat="Server">
                                            <div class="contentHolder">
                                                <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="BehaviorTypeMasterLabel" runat="server" Text="Behaviour"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" ID="BehaviourIndicatorDropDownList" SkinID="CustomWidthDropDownList"
                                                                onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()"
                                                                OnSelectedIndexChanged="BehaviourIndicatorDropDownList_OnSelectedIndexChanged"
                                                                AutoPostBack="true">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="Label1" runat="server" Text="Behaviour Type"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList runat="server" ID="BehaviourTypeDropDownList" SkinID="CustomWidthDropDownList"
                                                                onmouseleave="showHideTooltip()" CssClass="form-control" onmouseenter="showHideTooltip()"
                                                                AutoPostBack="false">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                  
                                                    <div class="alignCenter pTop5 col-md-12 middle center">
                                                        <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" OnClick="SearchButton_Click"
                                                            SkinID="0" class="btn-search btn fas" />
                                                        <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click" SkinID="0" class="btn-reset btn fas"/>
                                                    </div>
                                                   
                                                </asp:Panel>
                                                <div id="Div1" class="himssuHeader7WireBox col-md-12" runat="server">
                                                    <div id="ReasonMasterDetailDiv" visible="false" runat="server">
                                                        
                                                        <div class="himsBoxHeader card-head inner" id="PatientRelationDiv" visible="false" runat="server">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle" style="width: 99%">
                                                                <div align="right" class="fRight" style="margin-top: -3px;">
                                                                    <uc1:GridViewPager ID="BehaviorListGridView_GridViewPager" runat="server" OnFirstRecordClick="BehaviorListGridView_GridViewPager_FirstRecordClick"
                                                                        OnLastRecordClick="BehaviorListGridView_GridViewPager_LastRecordClick" OnNextRecordClick="BehaviorListGridView_GridViewPager_NextRecordClick"
                                                                        OnPrevRecordClick="BehaviorListGridView_GridViewPager_PrevRecordClick" OnTextBoxValueChange="BehaviorListGridView_GridViewPager_TextBoxValueChange"
                                                                        ParentGridView="BehaviorListGridView" />
                                                                </div>
                                                            </div>
                                                            <div class="gridHeaderText">
                                                            <header>
                                                                <asp:Label ID="Label2" Text="Behaviour List" runat="server" />
                                                            </header>
                                                            </div>
                                                        </div>


                                                        <div class="himsBoxContent card-body">
                                                            <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                                <ContentTemplate>
                                                                    <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                                        <asp:GridView ID="BehaviorListGridView" runat="server" AutoGenerateColumns="False"
                                                                            OnRowDataBound="BehaviorListGridView_RowDataBound" OnPageIndexChanging="BehaviorListGridView_PageIndexChanging"
                                                                            AllowPaging="true" PageSize="5" SkinID="" ShowHeader="true" PagerSettings-Visible="false"
                                                                            EmptyDataText="No Records Found!!!" DataKeyNames="BehaviourId,BehaviourIndicatorId" CssClass="table table-striped table-bordered">
                                                                            <Columns>
                                                                                <asp:TemplateField HeaderText="Behaviour Date" ItemStyle-Width="15%" SortExpression="Title"
                                                                                    HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="BehaviorDateLabel" runat="server" Text='<%#Eval("BehaviourDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Behavior Type" ItemStyle-Width="15%" SortExpression="Title"
                                                                                    HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="BehaviorLabel" runat="server" Text='<%# Bind("BehaviourType") %>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Behavior" ItemStyle-Width="15%" SortExpression="Title"
                                                                                    HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Remark" ItemStyle-Width="15%" SortExpression="Remark"
                                                                                    HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="Remark" runat="server" Text='<%# Bind("Remark") %>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                                  <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Photo" ItemStyle-HorizontalAlign="Center"
                                                                        ItemStyle-Width="20%" ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:ImageButton ID="StudentPhoto"  Height="60px" Width="60px" runat="server"  OnClientClick="return LoadDiv(this.src);" />
                                                                            <%--<asp:Label ID="lblFilePath" runat="server" Text='<%# (Eval("StudentPhoto"))%>' Visible="false" />--%>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                            </Columns>
                                                                        </asp:GridView>
                                                                         <input type="hidden" id="myField" value="" />
                                                            <div id="divBackground" class="modal">
                                                            </div>
                                                            <div id="divImage">
                                                                <table style="height: 100%; width: 100%">
                                                                    <tr>
                                                                        <td valign="middle" align="center">
                                                                            <img id="imgFull" alt="" src="" style="display: none; height: 55%; margin-top: 46px;" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center" valign="bottom">
                                                                            <input id="btnClose" type="button" class="btn btn-delete fas" value="&#xf00d; Close" onclick="HideDiv()" style="position: absolute; top: 9%; right: 29%;" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                                    </div>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                               
                            </div>
                        </tr>
                    </table>
                   
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">
        function LoadDiv(url) {
            var img = new Image();
            var bcgDiv = document.getElementById("divBackground");
            var imgDiv = document.getElementById("divImage");
            var imgFull = document.getElementById("imgFull");

            img.onload = function () {
                imgFull.src = img.src;
                imgFull.style.display = "block";

            };
            img.src = url;
            var width = document.body.clientWidth;
            if (document.body.clientHeight > document.body.scrollHeight) {
                bcgDiv.style.height = document.body.clientHeight + "px";
            }
            else {
                bcgDiv.style.height = document.body.scrollHeight + "px";
            }
            imgDiv.style.left = (width - 650) / 2 + "px";
            imgDiv.style.top = "150px";
            bcgDiv.style.width = "0px";

            bcgDiv.style.display = "block";
            imgDiv.style.display = "block";
            return false;
        }
        function HideDiv() {
            var bcgDiv = document.getElementById("divBackground");
            var imgDiv = document.getElementById("divImage");
            var imgFull = document.getElementById("imgFull");
            if (bcgDiv != null) {
                bcgDiv.style.display = "none";
                imgDiv.style.display = "none";
                imgFull.style.display = "none";
            }
        }
    </script>
  <%--  <script data-main="../../JavaScript/rjs/encrypt/behavior-list-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/behavior-list")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>
