<%@ control language="VB" autoeventwireup="false" inherits="RCC_OCS_CC_PersistentChat, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>

<div class="row">
    <div class="col-xs-12">
        <div class="products-step">
            <span id="div_s5" runat="server" nowrap="true" class="label label-success">
                <asp:LinkButton ID="Lb_ChatCategories" runat="server" Text='<%$ Resources:Content, Lync017 %>' />
            </span>
            <span id="div_s6" runat="server" nowrap="true" class="label label-default">
                <asp:LinkButton ID="Lb_ChatRoom" runat="server" Text='<%$ Resources:Content, Lync018 %>' />
            </span>

        </div>
    </div>
</div>

<div id="Pnl_ChatCategories" runat="server">
    <div id="Pnl_ChatCategoriesListing" runat="server">
        <div class="card Div_OpsRow" id="Div_OpsRow" runat="server">
            <div class="header">
                <h3>
                    <%= Resources.Content.GN00001320%>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_AddChatCategory" runat="server" CssClass="btn btn-primary waves-effect btnAction" OnClick="Btn_AddChatCategory_Click"
                            Text='<%$ Resources:Content,DEV1171%>' />
                        <asp:Button ID="Btn_SyncCategories" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content, Lync051 %>' />
                        <EM:ConfirmButtonExtender ID="CBE_ChatCategory" ConfirmText="<%$ Resources:Content,Lync278%>"
                            TargetControlID="Btn_SyncCategories" runat="server">
                        </EM:ConfirmButtonExtender>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">&nbsp;</div>
        <div class="row">
            <div class="col-xs-12">
                <EM:MPGridView CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                    ID="GV_ChatCategories" runat="server" AutoGenerateColumns="false" DataKeyNames='CategoryName' CurrentSortExpression="CategoryName" CurrentSortDirection="Asc">
                    <Columns>
                        <asp:TemplateField SortExpression="CategoryName" HeaderStyle-CssClass="col-xs-5" ItemStyle-CssClass="col-xs-5" HeaderText="<%$ Resources:Content, DEV1172 %>">
                            <ItemTemplate>
                                <asp:Label ID="Lbl_CategoryName" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:Content,DEV1172%>"
                    DataField="CategoryName" SortExpression="CategoryName" HeaderStyle-ForeColor="White" />--%>
                        <asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" HeaderText="<%$ Resources:Content,Lync021%>"
                            DataField="InvitesAllowed" />
                        <asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" HeaderText="<%$ Resources:Content,Lync022%>"
                            DataField="FileUploadAllowed" />
                        <asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" HeaderText="<%$ Resources:Content,Lync023%>"
                            DataField="ChatHistoryAllowed" />
                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000360%>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                            <ItemTemplate>
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <i class="material-icons">menu</i>
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <li>
                                                <asp:LinkButton ID="LB_Edit" runat="server" Text="<%$ Resources:Content,GN0000276%>"
                                                    SkinID="linkButtonEdit" CommandName="EditCategory" />
                                            </li>
                                            <li>
                                                <asp:LinkButton ID="LB_Delete" CssClass="btnAction" runat="server" Text="<%$ Resources:Content,GN0000278%>"
                                                    SkinID="linkButtonDelete" CommandName="DeleteCategory" />
                                                <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,DGN1119974%>"
                                                    TargetControlID="LB_Delete">
                                                </EM:ConfirmButtonExtender>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <%--PagerTemplate Start--%>
                    <PagerTemplate>
                        <EM:Pager ID="Pager" runat="server" />
                    </PagerTemplate>
                    <%--PagerTemplate End--%>
                </EM:MPGridView>
            </div>
        </div>

    </div>
    <div id="Pnl_AddEditChatCategory" runat="server" defaultbutton="Btn_AddEditChatCategory">

        <div class="card">
            <div class="header">
                <h3>
                    <asp:Label
                        ID="Lbl_PanelType" runat="server" Text='<%$ Resources:Content,Dev1171%>' EnableViewState="false"></asp:Label>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        *<asp:Literal ID="Literal16" runat="server" EnableViewState="false" Text='<%$ Resources:Content,DEV1172%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:HiddenField ID="HF_OldCategoryName" runat="server" />
                                <%--<asp:Literal ID="Lt_OrganizationName" runat="server"></asp:Literal>&nbsp;&nbsp;-&nbsp;&nbsp;--%>
                                <asp:TextBox ID="TxBx_CategoryName" runat="server" Width="300">
                                </asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_CategoryName"
                                    ValidationGroup="Chat" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,Lync019%>">
                                </asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationGroup="Chat"
                                    ControlToValidate="TxBx_CategoryName" ErrorMessage="Please enter a valid category name."
                                    Display="None" ValidationExpression="[a-zA-Z0-9._ ]+">
                                </asp:RegularExpressionValidator>
                                <asp:ValidationSummary ID="ValidationSummary6" runat="server" ValidationGroup="Chat" ShowMessageBox="true"
                                    ShowSummary="false" />
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal18" runat="server" EnableViewState="false" Text='<%$ Resources:Content,SM400028%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-9 col-xs-12">
                        <div class="form-group">
                            <asp:CheckBox ID="CB_EnableInvitations" Text='<%$ Resources:Content,Lync021%>' runat="server" />
                            &nbsp;&nbsp;&nbsp;<asp:CheckBox ID="CB_EnableFileUpload" Text='<%$ Resources:Content,Lync022%>' runat="server" />
                            &nbsp;&nbsp;&nbsp;<asp:CheckBox ID="CB_EnableChatHistory" Checked="true" Text='<%$ Resources:Content,Lync023%>' runat="server" />
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal21" runat="server" EnableViewState="false" Text='<%$ Resources:Content,Lync024%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_AllowedMembers" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCAllowedMembers" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal33" runat="server" EnableViewState="false" Text='<%$ Resources:Content,Lync027%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_DeniedMembers" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCDeniedMembers" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>

                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal1" runat="server" EnableViewState="false" Text='<%$ Resources:Content,FAM00153%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_Creators" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCCreaters" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_AddEditChatCategory" ValidationGroup="Chat" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                            CssClass="btn btn-primary waves-effect btnAction" />&nbsp;&nbsp;
                                                    <asp:Button ID="Btn_CancelChatCategory" CssClass="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000572%>'
                                                        CausesValidation="false" />
                    </div>
                </div>

            </div>
        </div>


    </div>
</div>
<div id="Pnl_ChatRoom" runat="server">
    <div id="Pnl_ChatRoomListing" runat="server">
        <div class="card Div_OpsRow" id="Div_OpsRow2" runat="server">
            <div class="header">
                <h3>
                    <%= Resources.Content.GN00001320%>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_AddChatRoom" runat="server" CssClass="btn btn-primary waves-effect btnAction" OnClick="Btn_AddChatRoom_Click"
                            Text='<%$ Resources:Content,Lync029%>' />
                        <asp:Button ID="Btn_SyncRooms" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content, Lync053 %>' />
                        <EM:ConfirmButtonExtender ID="CBE_ChatRooms" ConfirmText="<%$ Resources:Content,Lync279%>"
                            TargetControlID="Btn_SyncRooms" runat="server">
                        </EM:ConfirmButtonExtender>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">&nbsp;</div>

        <asp:Panel ID="Pnl_Btn_RoomFilter" runat="server" CssClass="row" DefaultButton="Btn_RoomFilter">
            <div class="panel-group search-panel" id="AS_ChatRooms" role="tablist" aria-multiselectable="true">
                <div class="col-xs-12" role="tab" id="SH_ChatRooms">
                    <div class="card">
                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_ChatRooms" href="#<%= CSB_ChatRooms.ClientID%>" aria-expanded="true" aria-controls="SH_ChatRooms">
                            <h3>
                                <%= Resources.Content.GN0000395%>
                            </h3>
                        </div>
                        <div id="CSB_ChatRooms" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_ChatRooms" aria-expanded="false">
                            <div class="row">
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="DDL_ChatCategories" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <asp:Button ID="Btn_RoomFilter" CssClass="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000395 %>' />
                                        <asp:Button ID="Btn_RoomFilterClear" Visible="false" CssClass="btn btn-primary waves-effect" runat="server"
                                            Text="<%$ Resources:Content,String289 %>" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </asp:Panel>


        <div class="row">
            <div class="col-xs-12">
                <EM:MPGridView CssClass="table table-bordered table-striped table-hover" EmptyDataText='<%$ Resources:Content, GN00001375 %>' CurrentSortExpression="Name" CurrentSortDirection="Asc"
                    ID="GV_ChatRooms" runat="server" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="true" DataKeyNames='Name, RoomId'>
                    <Columns>
                        <asp:TemplateField SortExpression="Name" HeaderStyle-CssClass="col-xs-5" ItemStyle-CssClass="col-xs-5" HeaderText="<%$ Resources:Content, Lync030 %>">
                            <ItemTemplate>
                                <asp:Label ID="Lbl_RoomName" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="Category" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" HeaderText="<%$ Resources:Content, DEV1172 %>">
                            <ItemTemplate>
                                <asp:Label ID="Lbl_CategoryName" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content,String385%>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                            <ItemTemplate>
                                <asp:Label ID="Lbl_RoomStatus" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000360%>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                            <ItemTemplate>
                                <ul class="option-menu">
                                    <li class="dropdown">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                            <i class="material-icons">menu</i>
                                        </a>
                                        <ul class="dropdown-menu pull-right">
                                            <li>
                                                <asp:LinkButton ID="LB_Edit" runat="server" Text="<%$ Resources:Content,GN0000276%>"
                                                    SkinID="linkButtonEdit" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.RoomId")%>' CommandName="EditRoom" />
                                            </li>
                                            <li>
                                                <asp:LinkButton SkinID="linkButtonStarted" CssClass="btnAction" ID="LBtn_EnableDisable" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.RoomId")%>'
                                                    CommandName="Disable" runat="server" Text="<%$ Resources:Content,GN00001025%>" />
                                            </li>
                                            <li>
                                                <asp:LinkButton ID="LB_Delete" CssClass="btnAction" runat="server" Text="<%$ Resources:Content,GN0000278%>"
                                                    SkinID="linkButtonDelete" CommandName="DeleteRoom" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.RoomId")%>' />
                                                <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,DGN1119974%>"
                                                    TargetControlID="LB_Delete">
                                                </EM:ConfirmButtonExtender>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <%--PagerTemplate Start--%>
                    <PagerTemplate>
                        <EM:Pager ID="Pager" runat="server" />
                    </PagerTemplate>
                    <%--PagerTemplate End--%>
                </EM:MPGridView>
            </div>
        </div>
    </div>
    <div id="Pnl_AddEditChatRoom" runat="server" defaultbutton="Btn_AddEditChatRoom">
        <div class="card">
            <div class="header">
                <h3>
                    <asp:Label ID="Lbl_ChatPanelType" runat="server" Text='<%$ Resources:Content,Lync029%>' EnableViewState="false"></asp:Label>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal5" runat="server" EnableViewState="false" Text='<%$ Resources:Content,SM400028%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-9 col-xs-12">
                        <div class="form-group">
                            <asp:CheckBox ID="CheckBox1" Text='<%$ Resources:Content,Lync021%>' runat="server" />
                            &nbsp;&nbsp;&nbsp;<asp:CheckBox ID="CheckBox2" Text='<%$ Resources:Content,Lync022%>' runat="server" />
                            &nbsp;&nbsp;&nbsp;<asp:CheckBox ID="CheckBox3" Checked="true" Text='<%$ Resources:Content,Lync023%>' runat="server" />
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        *<asp:Literal ID="Literal45" runat="server" EnableViewState="false" Text='<%$ Resources:Content,Lync030%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_RoomName" runat="server" Width="300">
                                </asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxBx_RoomName"
                                    ValidationGroup="Room" SetFocusOnError="true" ErrorMessage="<%$ Resources:Content,Lync044%>" Display="None">
                                </asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ValidationGroup="Room"
                                    ControlToValidate="TxBx_RoomName" ErrorMessage="Please enter a valid room name."
                                    Display="None" ValidationExpression="[a-zA-Z0-9._ ]+">
                                </asp:RegularExpressionValidator>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        *<asp:Literal ID="Literal6" runat="server" EnableViewState="false" Text='<%$ Resources:Content,SelectCategory%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="Ddl_AddRoomCategories" AutoPostBack="true" runat="server">
                            </asp:DropDownList>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal52" runat="server" EnableViewState="false" Text='<%$ Resources:Content,GN0000673%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:RadioButtonList ID="Rbl_RoomType" runat="server" RepeatDirection="Horizontal" AutoPostBack="true">
                                <asp:ListItem Text="<%$ Resources:Content,SPT002849%>" Selected="True" Value="Normal">
                                </asp:ListItem>
                                <asp:ListItem Text="<%$ Resources:Content,Lync043%>" Value="Auditorium">
                                </asp:ListItem>
                            </asp:RadioButtonList>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal46" runat="server" EnableViewState="false" Text='<%$ Resources:Content,GN0000860%>'>
                        </asp:Literal>:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:CheckBox ID="Cb_Disabled" Text="&nbsp;" runat="server" />
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Lync041%>">
                        </asp:Literal>:
                    </div>
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_Managers" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCManagers" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>
                        <b>Note</b>: A Manager must be the member of the room. So, a manager would also be added as a member if not already selected/added.
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Lync040%>">
                        </asp:Literal>:
                    </div>
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_Members" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCMembers" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>
                    </div>
                </div>

                <div class="row" id="TR_Presenters" runat="server" style="display: none;">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Lync042%>">
                        </asp:Literal>:
                    </div>
                    <div class="col-xs-12">
                        <ajax:UpdatePanel ID="UP_Presenters" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <EM:AddSelectableSelected ID="UCPresenters" runat="server" />
                            </ContentTemplate>
                        </ajax:UpdatePanel>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_AddEditChatRoom" ValidationGroup="Room" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                            CssClass="btn btn-primary waves-effect btnAction" />&nbsp;&nbsp;
                            <asp:Button ID="Btn_CancelChatRoom" CssClass="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000572%>'
                                CausesValidation="false" />
                        <asp:ValidationSummary ID="ValidationSummary8" runat="server" ValidationGroup="Room" ShowMessageBox="true"
                            ShowSummary="false" />
                    </div>
                </div>

            </div>
        </div>

    </div>

</div>
