<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MessageContacts.aspx.cs" Inherits="Axium.Web.Messages.MessageContacts" Culture="en-US" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Contacts</title>
    
    <!-- css styles -->
    <link href="../Includes/Css/spinner.css" rel="stylesheet" type="text/css" />

    <!-- plug in -->
    <script src="../Includes/JQueryUI/js/jquery-3.5.1.min.js" type="text/javascript"></script>
    <script src="../Includes/JQueryUI/js/jquery-migrate-3.3.2.min.js" type="text/javascript"></script>
    <script src="../Includes/JQueryUI/js/jquery-ui-1.13.2.custom.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/spin.min.js" type="text/javascript"></script>
    
    <!-- custom -->
    <script src="../Includes/Scripts/general.240530.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/iframe.231520.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/message.contact.231520.js" type="text/javascript"></script>
    
    <link rel='stylesheet' type='text/css' href='../Includes/Css/popup.231520.css' />
    
    <style type="text/css" runat="server" ID="logicCss"></style>        <%-- Area to load load logic CSS from CMS (using LogicPage Extension class)--%>

    <script type="text/javascript">
        function initPage() {
            resizeParentIframe('messageContactPage', window);
            //scrollParentToTop();
        }

    </script>
</head>
<body id="messageContactPage" onload="initPage(); UpdateRecipientList(); setRecipientsNavigBtns();" >
    <form id="aspFormContact" runat="server">
        <div id="MessageContact" >
            <div id="ContentHdnRecep" runat="server"></div>
            <div class="ContactTitle">
                <asp:Literal ID="TitleLiteral" runat="server" EnableViewState="False" Text="Recipients"></asp:Literal>
            </div>
            <div class="Separator"></div>

                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div class="ContactArea">
                             <div class="TitleDiv">
                                <div class="TitleLbl">Search Type</div>
                                <div>
                                    <asp:DropDownList ID="SearchLevelDp" runat="server"/>
                                </div>
                            </div>
                             <div class="TitleDiv">
                                <div class="DivSearchCriteria">
                                    <div class="TitleLbl">Criteria</div>
                                    <asp:TextBox ID="CriteriaTxt" runat="server"></asp:TextBox>
                                    <asp:DropDownList ID="CriteriaDp" runat="server">
                                        <asp:ListItem Text="First Name" Value="0" Selected="True"></asp:ListItem>
                                        <asp:ListItem Text="Last Name" Value="1"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Button ID="SearchBtn" runat="server" Text="Search" OnClientClick="enableDisableDoneBtn()" OnClick="SearchBtnOnClick" />
                                </div>
                            </div>
                        </div>                        
                    </ContentTemplate>
                </asp:UpdatePanel>
                <div>
                    <div class="DivTitleBtns">
                        <asp:Button ID="CancelBtn" runat="server" Text="Cancel" OnClientClick="closeContactDetailPage();" />
                        <asp:Button ID="AddBtn" runat="server" Text="Done" OnClientClick="addRecipientsToContactPage();" />
                    </div>
                    <div class="InfoDiv"></div>
                </div>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                            <div id="ContactListArea">
                                <div class="ListFrameArea">
                                    <div class="TitleBold">Search:</div>
                                    <asp:Panel ID="PageHeader2" runat="server" CssClass="HeaderRow">
                                        <div class="CheckHeader">&nbsp;</div>
                                        <div class="FirstNameHeader">First Name</div>
                                        <div class="LastNameHeader">Last Name</div>
                                        <div class="LevelHeader">Type</div>
                                    </asp:Panel>    
		                            <asp:Repeater ID="ContactRepeater" runat="server" onitemdatabound="DataBound">
		                                <HeaderTemplate>
		                                </HeaderTemplate>
                                        <ItemTemplate> 
                                            <asp:Panel ID="MessageRow" runat="server">
                                                <div class="ItemRow">
                                                    <input type="checkbox" id="checkBoxCtl" class="CheckBox ContactListCheckBox" runat="server" onclick="clickCheckBoxContact()" />
                                                    <asp:HiddenField ID="UserId" runat="server" />
                                                    <asp:Label runat="server" ID="FirstOutput" CssClass="ContactListFirstName"></asp:Label>
                                                    <asp:Label runat="server" ID="LastOutput" CssClass="ContactListLastName"></asp:Label>
                                                    <asp:Label runat="server" ID="LevelOutput" CssClass="ContactListLevel"></asp:Label>
                                                    <asp:Label runat="server" ID="FirstFullHdn" CssClass="ContactListFirstHdn"></asp:Label>
                                                    <asp:Label runat="server" ID="LastFullHdn" CssClass="ContactListLastHdn"></asp:Label>
                                                    <asp:Label runat="server" ID="IdEncryptHdn" CssClass="ContactListIdEncHdn"></asp:Label>
                                                </div>
                                            </asp:Panel>
                                        </ItemTemplate>
                                        <FooterTemplate>        
                                            <asp:Literal ID="lblEmptyData"
                                                Text="" runat="server" Visible="false">
                                            </asp:Literal>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </div>
        
                                <asp:HiddenField runat="server" ID="OptionsValue" />
                                <asp:HiddenField runat="server" ID="CurrentPageValue" Value="1" />
                                <asp:HiddenField runat="server" ID="TotalPagesValue" Value = "0" />
                                <span id="hdPageTypeId" class="HdnAction" ><%= PageTypeId %></span>
                                <span id="hdSepId" class="HdnAction" ><%= SepId %></span>
                                <div class="ContactBtnsDiv">
                                    <asp:Button ID="FirstPage" runat="server" onclick="FirstPageClick" Text="&lt;&lt; First" />
                                    <asp:Button ID="PrevPage" runat="server" onclick="PrevPageClick" Text="&lt; Prev" />
                                    <asp:Button ID="NextPage" runat="server" onclick="NextPageClick" Text="Next &gt;" />
                                    <asp:Button ID="LastPage" runat="server" onclick="LastPageClick" Text="Last &gt;&gt;" />                    
                                    <asp:Label ID="CurrentPageNumber" runat="server"></asp:Label>
                                </div>
                            </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                                
                <div id="MovingButtonsArea">
                    <asp:Button ID="ToBtn" runat="server" Text="To >>" OnClientClick="addToRecipientList('to'); return false;" />
                    <asp:Button ID="CcBtn" runat="server" Text="Cc >>" OnClientClick="addToRecipientList('cc'); return false;" />
                    <asp:Button ID="RemoveBtn" runat="server" Text="<< Remove" OnClientClick="removeFromRecipientList(); return false;" />
                    <asp:HiddenField runat="server" ID="hdnChkContacts" />
                    <asp:HiddenField runat="server" ID="hdnChkRecipientsToIds" />
                    <asp:HiddenField runat="server" ID="hdnChkRecipientsCcIds" />
                    <asp:HiddenField runat="server" ID="hdnChkContactsOnlyAvail"/>
                </div>

                <div id="RecipientListArea">
                    <div class="ListFrameArea">
                        <div class="TitleBold">Recipients:</div>
                        <asp:Panel ID="Panel1" runat="server" CssClass="HeaderRow">
                            <div class="SendHeader">Send</div>
                            <div class="FirstNameHeader">First Name</div>
                            <div class="LastNameHeader">Last Name</div>
                            <div class="LevelHeader">Type</div>
                        </asp:Panel>   
                        <div id="RecipientMainDiv"></div> 
                    </div>                    
                    <div class="RecipientBtnsDiv">
                        <asp:Button ID="RecipFirstPageBtn" runat="server" OnClientClick="RecipFirstPageClick(); return false;" Text="&lt;&lt; First" />
                        <asp:Button ID="RecipPrevPageBtn" runat="server"  OnClientClick="RecipPrevPageClick(); return false;" Text="&lt; Prev" />
                        <asp:Button ID="RecipNextPageBtn" runat="server" OnClientClick="RecipNextPageClick(); return false;" Text="Next &gt;" />
                        <asp:Button ID="RecipLastPageBtn" runat="server" OnClientClick="RecipLastPageClick(); return false;" Text="Last &gt;&gt;" />                    
                        <asp:Label ID="RecipPageNumber" runat="server" ></asp:Label>
                    </div>
                </div>
        </div>        
    </form>
</body>
</html>
