<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="WFMarker.ascx.vb" Inherits="WebFoundations.WFWorkflow.UI.WFMarker" %>
<%@ Register Assembly="WebFoundations.ServerControls" Namespace="WebFoundations.ServerControls" TagPrefix="WFC" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/WFContent/Modules/WFWorkflow/ItemProcesso/ZuriLoader.ascx" TagPrefix="uc1" TagName="ZuriLoader" %>
<%@ Register Src="~/WFContent/Modules/WFWorkflow/WFMarkerList.ascx" TagPrefix="uc1" TagName="WFMarkerList" %>

<section class="zuri-workspace contAreaTrabalho">
    <asp:UpdatePanel ID="pnlMarkers" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:HiddenField ID="updValue" runat="server" />
        <asp:LinkButton ID="updateButton" runat="server" Style="display: none;" />
        <section id="pnlFiltros" class="wacont-Main" runat="server">
            <asp:Panel ID="pnlCntFiltros" DefaultButton="btnFiltrar" CssClass="wabusca-avancada" runat="server" Style="display:block;">
                <fieldset>
                    <legend class="walegend"><asp:Label ID="lblFiltros" CssClass="txt-buscar" runat="server" /></legend>
                    <div class="wabusca-avancadaTB">
                    <asp:Repeater ID="rptFiltros" runat="server">
                        <ItemTemplate>
                            <span id="flData" class="waFilter" runat="server">
                                <asp:HiddenField ID="hidIdentificador" runat="server" />
                                <asp:Label ID="lblNomeFiltro" CssClass="labelItem" runat="server" />
                                <div>
                                    <asp:TextBox ID="txtFiltroNome" Width="100%" runat="server" />
                                    <asp:DropDownList ID="ddlFiltro" Width="100%" runat="server" />
                                    <asp:Label ID="lblFrom" CssClass="busca-label01" runat="server" />
                                    <asp:TextBox ID="txtFiltro1" Width="40%" CssClass="busca-id" runat="server" />
                                    <asp:RegularExpressionValidator ID="vlFiltro1" runat="server" CssClass="validador" ControlToValidate="txtFiltro1"
                                        Display="Dynamic" ValidationExpression="\d*" />
                                    <WFC:DatePicker ID="dateFrom" Width="40%" DisableLowerValuesFor="dateTo" ValidationGroup="Inbox" runat="server" />
                                    <asp:Label ID="lblTo" CssClass="busca-label01" runat="server" />
                                    <asp:TextBox ID="txtFiltro2" Width="40%" CssClass="busca-id" runat="server" />
                                    <asp:RegularExpressionValidator ID="vlFiltro2" runat="server" CssClass="validador" ControlToValidate="txtFiltro2"
                                        Display="Dynamic" ValidationExpression="\d*" />
                                    <WFC:DatePicker ID="dateTo" Width="40%" ValidationGroup="Inbox" runat="server"  />
                                    <asp:CheckBox ID="chkFiltro" CssClass="busca-check01" runat="server" />
                                </div>
                            </span>
                        </ItemTemplate>
                    </asp:Repeater>
                    </div>
                    <asp:Button ID="btnFiltrar" CssClass="wainput-submit" runat="server" />
                </fieldset>            
            </asp:Panel>
        </section>
        <asp:Panel ID="pnlTiles"  CssClass="listGroup" style="width:100%;display:inline-block;" runat="server">
            <asp:Repeater ID="rptTiles" runat="server">
                <HeaderTemplate>
                    <article>
                        <ul class="panel">
                </HeaderTemplate>
                <FooterTemplate></ul></article></FooterTemplate>
                <ItemTemplate>
                    <li id="itemTile" class="rectangle-tile" runat="server">
                        <asp:LinkButton ID="lnkFilter" OnClick="TileFilter_Click" runat="server">
                            <asp:HiddenField ID="hidItemIdentifier" runat="server" />
                            <asp:Label ID="lblItemName" runat="server" />
                            <asp:Label ID="lblWatermark" CssClass="watermark" runat="server" />
                        </asp:LinkButton>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
        </asp:Panel>
        <asp:Panel ID="pnlAgrupado" Style="width: 100%; display: inline-block;" runat="server">
            <asp:Label ID="lblNoItemsFound" visible="false" runat="server" />
            <center>
            <div style="position:relative;vertical-align:middle;display:inline-block;">
                    <telerik:RadHtmlChart runat="server"  ID="chtAgrupado" Visible="false">
                        <ChartTitle>
                            <Appearance Align="Center" Position="Top">
                                <TextStyle Bold="true" FontFamily="Segoe UI,Verdana,Geneva,DejaVu Sans,sans-serif" Italic="false" Color="Black" Margin="5" Padding="5" />
                            </Appearance>
                        </ChartTitle>
                        <PlotArea>
                            <XAxis>
                                <MinorGridLines Visible="false" />
                                <MajorGridLines Visible="false" />
                            </XAxis>
                            <YAxis>
                                <MinorGridLines Visible="false" />
                            </YAxis>
                        </PlotArea>
                    </telerik:RadHtmlChart>
                    <asp:Repeater ID="rptAgrupado" runat="server">
                        <HeaderTemplate>
                            <table class="stripes report-legend">
                                <thead>
                                    <tr>
                                        <th><asp:Label ID="lblCampo" runat="server" /></th>
                                        <th><asp:Label ID="lblValor" runat="server" /></th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr>
                                <td><asp:LinkButton ID="lnkCampo" runat="server" /></td>
                                <td style="text-align:center;"><asp:LinkButton ID="lnkValor" runat="server" /></td>
                            </tr>
                            </tbody>
                            </table>
                        </FooterTemplate>
                        <ItemTemplate>
                            <tr>
                                <td><asp:LinkButton ID="lnkCampo" runat="server" /></td>
                                <td style="text-align:center;"><asp:LinkButton ID="lnkValor" runat="server" /></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:LinkButton ID="lnkViewAll" runat="server" />
            </div>
            </center>
        </asp:Panel>
        <asp:Panel ID="pnlDetalhe" runat="server">
            <uc1:WFMarkerList runat="server" id="WFMarkerList" />
            <div style="text-align:center;margin-top:1em;">
                <asp:Button ID="btnVoltar" runat="server" />&nbsp;&nbsp;
                <asp:Button ID="btnExport" runat="server" />&nbsp;&nbsp;
                <asp:Button ID="btnExportCSV" runat="server" />
            </div>
        </asp:Panel>
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="btnExport" />
        <asp:PostBackTrigger ControlID="btnExportCSV" />
    </Triggers>
</asp:UpdatePanel>
</section>
<uc1:ZuriLoader runat="server" ID="ZuriLoader" />
<telerik:RadWindow RenderMode="Lightweight" ID="ListPopUp" runat="server" Width="700px" Height="500px" Modal="true" 
    VisibleStatusbar="false" AutoSize="true" AutoSizeBehaviors="Height, Width"/>
