<%@ page language="C#" autoeventwireup="true" inherits="Forms_FeedbackMobile, App_Web_niziglsf" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <title>tSense-IoT Feedback Mobile</title>
    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <link id="datepicker" runat="server" type="text/css" href="../css/ui.datepicker.css" rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <link id="tedge" runat="server" type="text/css" href="~/css/blog-style.css" rel="stylesheet" />

    <style type="text/css">
        </style>
    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />

    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>

    <%--********* For Bootstrap Implementation *************--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--********* End of Bootstrap Implementation *************--%>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div id="container">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <!-- Header Starts Here -->
            <uc1:Header ID="ucHeader" runat="server" />
            <!-- Nav Ends Here -->
            <!-- Content Starts Here -->
            <div id="outer">
                <div id="inner">
                    <div id="float-wrap">
                        <!-- Main Content Starts Here -->
                        <div id="content">
                            <div class="content-wrap">
                                <div id="top-content">
                                    <div id="heading">
                                        <img class="icon" src="../images/feedback-icon.jpg" alt="" />
                                        <h1>
                                            <asp:Literal ID="lblFeedbackCaption" Text="User Feedbacks" runat="server"></asp:Literal>
                                        </h1>
                                        <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                        <span>&gt;</span>
                                        <span><a href="FeedbackMobile.aspx">
                                            <asp:Label ID="lblFeedbackMobile" Text="User Feedbacks" runat="server" /></a></span>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                            </div>
                            <asp:Panel ID="pnlAdminView" runat="server">
                                <div id="grid-dsply">
                                    <div id="top">
                                        <div class="left-col">
                                            <h1>
                                                <span class="icon txt" style="padding-top: 0px">
                                                    <img src="../Images/icn-schedule-reports.gif" alt="" style="display: none;" />
                                                    <asp:Label ID="lblUserFeedbacks" runat="server" Text="User Feedbacks"></asp:Label></span>
                                            </h1>
                                        </div>
                                        <%--<dxw:ASPxButton ID="btnFieldChooser" runat="server" BackgroundImage-ImageUrl="~/images/icn-addRemoveColumns.png"
                                            Image-AlternateText="Toggle Field Chooser" RenderMode="Link" Height="20px" Width="20px" ToolTip="Toggle Field Chooser"
                                            UseSubmitBehavior="false" AutoPostBack="false" Visible="true">
                                            <ClientSideEvents Click="function(s,e) {
                                                                if (gvFeedbacks.IsCustomizationWindowVisible())
                                                                    gvFeedbacks.HideCustomizationWindow();
                                                                else
                                                                    gvFeedbacks.ShowCustomizationWindow();
                                                                }" />
                                        </dxw:ASPxButton>--%>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <dxw:ASPxGridView ID="gvFeedbacks" ClientInstanceName="gvFeedbacks" runat="server"
                                                Width="100%" KeyFieldName="UserFeedbackId" AutoGenerateColumns="false" Settings-ShowFilterRow="true"
                                                CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                EnableTheming="true" Theme="Office2003Blue">
                                                <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                    CssPostfix="Office2003_Blue">
                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                    </Header>
                                                    <LoadingPanel ImageSpacing="10px">
                                                    </LoadingPanel>
                                                    <PagerBottomPanel CssClass="PageFooter">
                                                    </PagerBottomPanel>
                                                    <PagerTopPanel CssClass="PageFooter">
                                                    </PagerTopPanel>
                                                </Styles>
                                                <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="250" ShowFilterRow="true" ShowFilterRowMenu="True" GridLines="Horizontal" ShowGroupPanel="false" />
                                                <SettingsBehavior ProcessSelectionChangedOnServer="false" />
                                                <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                    PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                    NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                    NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                </SettingsPager>
                                                <SettingsText EmptyDataRow="No Feedbacks found" />
                                                <SettingsPopup CustomizationWindow-HorizontalAlign="RightSides" CustomizationWindow-VerticalAlign="TopSides" />
                                                <SettingsBehavior EnableCustomizationWindow="false" />
                                                <Columns>
                                                    <dxw:GridViewDataColumn Caption="Organization" FieldName="OrganizationName" Width="10%" VisibleIndex="2">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/icn-organization-name.gif" alt="" align="top" />&nbsp;
                                                            <asp:Label ID="lbl" runat="server" Text="Organization"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Feedback by" FieldName="UserName" Width="10%" VisibleIndex="1">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/icn-user-name.gif" alt="" align="top" />&nbsp;
                                                            <asp:Label ID="lbl" runat="server" Text="Feedback by"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Date" FieldName="FeedbackDate" Width="10%" VisibleIndex="2" CellStyle-HorizontalAlign="Center">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/date.png" alt="" align="top" />&nbsp;
                                                            <asp:Label ID="lblFeedbackDate" runat="server" Font-Bold="false" Text="Date Time"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Feedback" FieldName="FeedbackText" Width="25%" Settings-AllowAutoFilter="False" VisibleIndex="0">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/icn-schedule-reports.gif" alt="" align="top" />&nbsp;
                                                            <asp:Label ID="lblFeedbackText" runat="server" Font-Bold="false" Text="Feedback"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Status" FieldName="Status" Width="5%" CellStyle-HorizontalAlign="Center" VisibleIndex="4">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/icn-status.gif" alt="" align="top" />&nbsp;
                                                                    <asp:Label ID="lblStatus" runat="server" Font-Bold="false" Text="Status"></asp:Label>
                                                            </span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="lblStatus" runat="server" Font-Bold="false" Text='<%# Eval("Status") %>'
                                                                CssClass='<%# Eval("Status").ToString() == "Replied" ? "approved" : "unapproved" %>'></asp:Label>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Reply" Width="3%" Name="Reply" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center" VisibleIndex="5">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="lbtnReply" runat="server" ToolTip="Click to Reply" AlternateText="Reply" ImageAlign="Middle"
                                                                CommandArgument='<%#Eval("UserFeedbackId") %>' Visible='<%# Eval("Status").ToString() == "Replied" ? false : true %>' OnClick="lbtnReply_Click" OnClientClick="ShowPopUp();">
                                                                <img src="../images/icn-edit.gif" alt="" /></asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                </Columns>
                                            </dxw:ASPxGridView>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                    <ContentTemplate>
                                        <dxw:ASPxPopupControl ID="popup" ClientInstanceName="popup" runat="server" Width="525px" Height="80px" AllowDragging="True"
                                            Border-BorderColor="#99BBE8" BackColor="#DFE9F5" EnableDefaultAppearance="False" ShowCloseButton="true" CloseAction="CloseButton"
                                            PopupHorizontalAlign="OutsideLeft" Top="150" HeaderText="Feedback Reply" HeaderStyle-Font-Bold="true" HeaderStyle-BackColor="#DFE9F5"
                                            LoadContentViaCallback="OnFirstShow" PopupAlignCorrection="Auto">
                                            <ClientSideEvents Init="function(s,e) { popup.BringToFront(); }" />
                                            <ContentStyle CssClass="content">
                                            </ContentStyle>
                                            <ContentCollection>
                                                <dxw:PopupControlContentControl runat="server">
                                                    <div class="popup-content">
                                                        <table class="form-tbl" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="lblFeedback" runat="server" Text="Feedback"></asp:Label>
                                                                </td>
                                                                <td>
                                                                    <asp:Label ID="lblFeedbackText" runat="server" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="lblFeedbackReply" runat="server" Text="Reply"></asp:Label>
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="txtFeedbackReply" MaxLength="350" TextMode="MultiLine"
                                                                        onpaste="return true;" ondrop="return true;" runat="server" Width="350px" Height="70px"></asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td></td>
                                                                <td colspan="2">
                                                                    <asp:LinkButton ID="btnSave" runat="server" CssClass="MultilingualBtn" OnClick="btnSave_Click" OnClientClick="return ValidateReply();">
                                                                        <span id="Span9" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Save">
                                                                                <div id="SaveButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Save
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                    &nbsp;&nbsp;
                                                                <asp:LinkButton ID="btnClear" runat="server" CssClass="MultilingualBtn" OnClick="btnClear_Click" OnClientClick="ShowPopUp();">
                                                                    <span id="Span10" runat="server" class="MultilingualBtnspan">
                                                                        <div class="Clear">
                                                                            <div id="ClearButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Clear
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </dxw:PopupControlContentControl>
                                            </ContentCollection>
                                            <Border BorderColor="#99BBE8" />
                                        </dxw:ASPxPopupControl>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </asp:Panel>
                            <asp:Panel ID="pnlUserView" runat="server" CssClass="divFeedback">
                                <div style="padding: 10px 0 10px 0; text-align: center;">
                                    <%--<asp:Table ID="BlogTable" runat="server" Width="100%" HorizontalAlign="Right" CellPadding="3" CellSpacing="5" Visible="false"></asp:Table>--%>

                                    <asp:Repeater ID="rptrUserFeedbacks" runat="server" OnItemDataBound="rptrUserFeedbacks_ItemDataBound">
                                        <HeaderTemplate>
                                            <center>
                                            <table style="width: 75%; text-align: center; border:solid 3px #41B7D8; padding:10px 0 10px 0">
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr>
                                                <td style="text-align: left">
                                                    <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("Status") %>' CssClass='<%# Eval("Status").ToString() == "Replied" ? "approved" : "unapproved" %>'></asp:Label>
                                                </td>
                                                <td style="text-align: right; color: navy">
                                                    <asp:Label ID="lblFeedbackDate" runat="server" Text='<%# Eval("FeedbackDate") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="text-align: justify; color: darkslategray; padding: 0 12%; font-size: 12px" colspan="2">
                                                    <asp:Label ID="lblFeedbackText" runat="server" Text='<%# Eval("FeedbackText") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td></td>
                                                <td style="text-align: right; color: navy">
                                                    <asp:Label ID="lblReplyDate" runat="server" Text='<%# Eval("ReplyDate") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="text-align: justify; color: gray; padding: 0 12%;" colspan="2">
                                                    <asp:Label ID="lblReplyText" runat="server" Text='<%# Eval("ReplyText") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr class="footBorder" style="width: 100%">
                                                <td>&nbsp;</td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </table>
                                            <asp:Label ID="lblEmptyData" runat="server" Text="You have posted no feedbacks yet." Visible="false" />
                                            </center>
                                        </FooterTemplate>
                                        <%--<ItemTemplate>
                                                <dxw:ASPxHeadline TailText="Details" EncodeHtml="False" ID="ASPxHeadline1" EnableViewState="False"
                                                    runat="server" ContentText='<%# Eval("ReplyText") %>' HeaderText='<%# Eval("FeedbackText") %>' 
                                                    NavigateUrl='<%# Eval("ReplyDate") %>' >
                                                </dxw:ASPxHeadline>
                                                <br />
                                            </ItemTemplate>--%>
                                    </asp:Repeater>
                                </div>
                            </asp:Panel>
                        </div>
                        <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="pnlProgress1"
                            TargetControlID="btnTesting">
                        </cc1:ModalPopupExtender>
                        <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
                        <asp:Panel ID="pnlProgress1" runat="server" CssClass="processMessage" Style="z-index: 1000;">
                            <center>
                                <br />
                                <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                                <br />
                                <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                                <br />
                                <br />
                                </center>
                        </asp:Panel>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>

    <script type="text/javascript">
        function ValidateReply() {
            var AlertReplytext = 'Please enter Reply message.';
            if (document.getElementById('<%=txtFeedbackReply.ClientID%>').value == "") {
                TrinetraCustomAlerts(AlertReplytext);
                return false;
            }
            else {
                ShowPopUp();
                return true;
            }
        }
    </script>
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
