<%@ Page Language="vb" AutoEventWireup="true" MasterPageFile="~/FiniqAppMasterPage.Master"    CodeBehind="FinIQ_Dashboard.aspx.vb" Inherits="FinIQWebApp.FinIQ_Dashboard" EnableEventValidation="false" %>
<%--<%@ Reference Control="UC_Calendar.ascx" %> 
<%@ Register Src="UC_Calendar.ascx" TagName="EventCalControl" TagPrefix="ucCalEvt" %>--%>
<%@ Register Src="../FinIQ_User_Controls/DateControl.ascx" TagName="DateControl"    TagPrefix="ucDateControl" %>
<%@ Register Src="~/FinIQ_Dashboard/UC_SurfaceGraph.ascx" TagPrefix="ucSurfaceGraph" TagName="UC_SurfaceGraph" %>
<%@ Register Src="~/FinIQ_Dashboard/UC_ColorPalette.ascx" TagPrefix="ucColorPalette" TagName="UC_ColorPalette" %>
<%@ Register Src="~/FinIQ_Dashboard/UC_Poster.ascx" TagPrefix="ucPoster" TagName="UC_Poster" %>
<%@ Register Src="~/FinIQ_Dashboard/UC_Card.ascx" TagPrefix="ucCard" TagName="UC_Card" %>
<%@ Register Src="~/FinIQ_Dashboard/UC_Calendar.ascx" TagPrefix="ucCalEvt" TagName="EventCalControl" %>




<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>

    <link href="Dashboard_main.css" rel="Stylesheet" type="text/css" id="CssLink" runat="server" />
    <%--    <link href="../FinIQJS/jquery-ui.min.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="../FinIQJS/external/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../FinIQJS/jquery-ui.min.js"></script>--%>
    <script type="text/javascript" src="Dashboard_Main.js"></script>

    <div style="display: block; float: left; width: 100%; margin-top: -35px; background-color: inherit; padding: 0px 10px 10px;">
        <asp:Label ID="lblerror" runat="server" CssClass="lblError" Text="" Style="display: block;"></asp:Label>
        <asp:Label ID="lblInfo" runat="server" CssClass="lblError lblInfo" Text=""></asp:Label>
    </div>
    <div class="divFilter">
        <div id="arrow" class="hamburgerIcon">
            <span class="bar1"></span>
            <span class="bar2"></span>
            <span class="bar3"></span>
        </div>

        <div id="Div1" class="usertype" runat="server" style="width: 20% !important;">
            <asp:Label ID="lblUserType" runat="server" CssClass="lblUserType" Text=""></asp:Label>
        </div>
        <div style="width: 20px; float: left;">
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" Visible="true" DisplayAfter="1">
                <ProgressTemplate>
                    <div>
                        <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Loading... </span>
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
            <div id="Loader" class="loaderNEW" style="display: none;">
                <img alt="Loading" src="../App_Resources/loading.gif" /><span class="lbl">Saving the layout... </span>
            </div>
        </div>
        <div class="divMsg">
        </div>
        <div style="">
            <table class="HeaderTable" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left" style="display: none;">
                        <%--<asp:UpdatePanel ID="updatePanel4" UpdateMode="Always" runat="server" >
                                <Triggers>
                                    <%-- <asp:AsyncPostBackTrigger ControlID="ddlProduct" EventName="SelectedIndexChanged" />
                                </Triggers>
                                <ContentTemplate>--%>
                                    Product 
                                   <asp:DropDownList ID="ddlProduct" runat="server" AutoPostBack="false" CssClass="Productdropdown ddl">
                                   </asp:DropDownList>
                        <%--/ContentTemplate>
                            </asp:UpdatePanel>--%>                            
                                  
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlLayout" runat="server" AutoPostBack="true" CssClass="ddl" Width="150px"></asp:DropDownList>
                        <asp:TextBox runat="server" ID="txtLayout" CssClass="txt" Width="150px"></asp:TextBox>
                    </td>
                    <td style="float: right;">
                        <input id="btnLoad" type="submit" value="Load" class="btn" runat="server" visible="false" />
                        <input id="fbutton" type="button" value="Save" class="saveLayout saveSeqButton Save" />

                        <input id="fmapping" type="Button" value="Mapping" style="display: none;" />
                        <asp:TextBox ID="Login" runat="server" Style="display: none;"></asp:TextBox>
                        <asp:TextBox ID="Entity" runat="server" Style="display: none"></asp:TextBox>
                        <asp:TextBox ID="UserType1" runat="server" Style="display: none;"></asp:TextBox>
                        &nbsp;&nbsp;
                        <input type="button" value="Dashboard Setup" class="DashboardSetup" onclick="window.open('FinIQ_Dashboard_Setup.aspx?master_popup=popup&menustr=CRM,%20Portfolio,%20Collateral%20-%20FinIQ%20Dashboard%20Master&Mode=4.5&csrfToken=')" />

                    </td>
                </tr>
            </table>
        </div>

    </div>
    <div class="divCon" style="min-width: 100%;">
        <div class="bodyDivForDashboard">
            <table>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btnSave_reload" runat="server" Text="Button" Style="display: none;" />
                    </td>
                </tr>
                <tr>
                    <td class="TDDraggable">
                        <div id="mainDrag">
                            <h3>
                                <input type="text" id="txtsearchSH" value="" class="txt txtsearchSH search_icon" onkeyup="javascript:SearchScenario(this, event);" placeholder="Scenario Search..." />
                                <span class="sort" title="sort" onclick="sort(); return true;"></span>
                            </h3>
                            <div id="draggableContainer" style="">
                            </div>
                        </div>
                    </td>

                    <td style="display: block;">
                        <div id="droppableContainer">


                            <div class="innerDroppableContainer">
                                <%--<uc1:UC_Card runat="server" ID="UC_Card" BigDigit="3" cardFor="Revenue" CardTenor="Monthly" smallDigit=".25m" />--%>
                                <asp:UpdatePanel ID="updatePanel2" UpdateMode="Conditional" runat="server"
                                    ChildrenAsTriggers="true">
                                    <Triggers>
                                    </Triggers>
                                    <ContentTemplate>
                                        <asp:PlaceHolder ID="PlaceHolderMain" runat="server" EnableViewState="false"></asp:PlaceHolder>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                            <div id="chartdiv" runat="server" style="height: auto; width: auto; background-color: red;">
                            </div>
                            <asp:Button ID="btn_getDataPointDetails" runat="server" Text="Button" Style="display: none;" />
                            <asp:HiddenField ID="dataHiddenField" runat="server" />
                            <asp:HiddenField ID="linknameHiddenField" runat="server" />
                            <%--<div class="zoomChartDiv" runat="server" id="zoomChartDiv"></div>--%>
                        </div>
                    </td>
                </tr>
            </table>
            <div id="Div2" class="mainContainer" style="display: none; width: 1920px;" runat="server">

                <asp:UpdatePanel ID="updatePanel1" UpdateMode="Always" runat="server">
                    <ContentTemplate>

                        <asp:PlaceHolder ID="PlaceHolderMaster" runat="server"></asp:PlaceHolder>

                    </ContentTemplate>
                </asp:UpdatePanel>

            </div>

            <div class="gridpanel" style="display: none;" id="pnlRMGroup" runat="server">
                <div class="DPDetailsHeading">
                    <span id="gridPanelTitle" class="gridPanelTitleClass"></span>
                    <button type="button" value="X" onclick="removediv(this)" class="btnCancelDPDetails">X</button>
                </div>

                <asp:UpdatePanel ID="gridupdatePanel" UpdateMode="Conditional" runat="server" style="padding: 11px;">
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btn_getDataPointDetails" EventName="Click" />
                    </Triggers>
                    <ContentTemplate>
                        <asp:GridView ID="dataPointGrid" runat="server">
                            <HeaderStyle CssClass="GridHeader" />
                            <RowStyle CssClass="GridItem" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="true" />
                            <AlternatingRowStyle CssClass="GridItem" />
                            <SelectedRowStyle CssClass="GridItemSelect" />

                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>


            <div class="zoomChartDiv" id="zoomChartDiv" style="display: none;">
                <button type="button" onclick="removeZoomedPanel(this);" class="zoomedPanelClosebtn" title="Close">X</button>
                <asp:UpdatePanel ID="tempUpdatePanelForChart" UpdateMode="Always" runat="server">
                    <ContentTemplate>
                        <asp:PlaceHolder ID="PlaceHolderForChart" runat="server"></asp:PlaceHolder>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>

            <asp:Label ID="Label1" runat="server" Text="Label" Visible="false"></asp:Label>

            <input id="hdnWSPath" runat="server" type="hidden" value="" />
            <asp:HiddenField ID="HiddenField1" runat="server"></asp:HiddenField>

            <div class="ViewGridDetailsPanel" id="ViewGridDetailsPanel" runat="server" style="display: none;">
                <button type="button" onclick="removeOpenedGridPanel(this);" class="GridPanelClosebtn" title="Close">X</button>
                <asp:UpdatePanel ID="tempUpdatePanelForGrid" UpdateMode="Always" runat="server">
                    <ContentTemplate>
                        <asp:PlaceHolder ID="PlaceHolderForCompleteGrid" runat="server" EnableViewState="true" ViewStateMode="Enabled"></asp:PlaceHolder>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>

    </div>

    <div id="pnlSelectView" style="display: none;">
        <select>
            <option value="RM_View" label="RM View"></option>
            <option value="GT_View" label="GT View"></option>
            <option value="WM_View" label="WM View"></option>
            <option value="Personal" label="Personal"></option>
            <option value="Personal" label="Private"></option>
            <option value="Personal" label="New"></option>

        </select>
    </div>

    <asp:HiddenField runat="server" ID="hdnWidth" Value="1380" />
    <asp:HiddenField runat="server" ID="hdnHeight" Value="750" />
    <script type="text/javascript">


        $(document).ready(function () {
            $('[id$="hdnWidth"]').val($(window)[0].innerWidth);
            $('[id$="hdnHeight"]').val($(window)[0].innerHeight);

            window.onresize = function () {
                $('[id$="hdnWidth"]').val($(window)[0].innerWidth);
                $('[id$="hdnHeight"]').val($(window)[0].innerHeight);
            }
        });

        function SelectView() {
            $('#pnlSelectView').dialog();
        }

    </script>
</asp:Content>
