<%@ Page Title="" Language="C#" MasterPageFile="~/EmptyAjaxMaster.Master" AutoEventWireup="true" CodeBehind="TimelineBlockPage.aspx.cs" Inherits="MKInsight.Online.ActionTracking.TimeRecording.UI.TimelineBlockPage" %>

<%@ Register Src="../UIControls/Metabase/MetabaseViewer.ascx" TagName="MetabaseViewer" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/Interface/InputDateEx.ascx" TagName="InputDateEx" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/Interface/LabelEx.ascx" TagName="LabelEx" TagPrefix="uc3" %>
<%@ Register Src="../UIControls/Interface/LinkButtonEx.ascx" TagName="LinkButtonEx" TagPrefix="uc4" %>
<%@ Register Src="../UIControls/Interface/SimpleSectionBreak.ascx" TagName="SimpleSectionBreak" TagPrefix="uc5" %>

<%@ Register Src="../UIControls/Interface/ColorBoxEx.ascx" TagName="ColorBoxEx" TagPrefix="uc6" %>

<%@ Register Src="../UIControls/Interface/MultilineTextBoxEx.ascx" TagName="MultilineTextBoxEx" TagPrefix="uc7" %>

<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc8" %>

<asp:Content ID="Content1" ContentPlaceHolderID="h" runat="server">
    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery/jqbox.css" />
    <script type="text/javascript" src="../scripts/jquery/jquery.box-min.js"></script>

    <script type="text/javascript" src="../scripts/ASTJavascript/astreeview/astreeview_packed.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/ASTJavascript/astreeview/astreeview.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/ASTJavascript/asdropdowntreeview/dropdowntreeview.css" />

    <script type="text/javascript">

        function cb() {
            parent.$.colorbox.close();        
            $('[id*=btn_partial_refresh]', parent.document).click();
        }

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cm" runat="server">

    <asp:UpdatePanel ID="pn" runat="server">
        <ContentTemplate>
            <asp:Button  ID="btn_partial_refresh" runat="server" OnClick="OnRefresh" style="display:none" />
            <uc8:MessageBox ID="u_m" runat="server" />

            <asp:Panel ID="tb_Level1" runat="server" CssClass="w-bar">
                <asp:LinkButton runat="server" ID="tbl_Details" CssClass="w-button" Style="background: url(../images/detail32.png); " OnClick="OnDetails">
                    <asp:Label ID="tbl_DetailsLabel" runat="server"></asp:Label>
                </asp:LinkButton>

                <asp:LinkButton runat="server" ID="tbl_Meta" CssClass="w-button" Style="background: url(../images/metabase32.png); " OnClick="OnMetaData">
                    <asp:Label ID="tbl_MetaLabel" runat="server"></asp:Label>
                </asp:LinkButton>

            </asp:Panel>

            <asp:MultiView ID="mv" runat="server">
                <asp:View ID="v_detail" runat="server">
                    <table style="width: 100%">
                        <tr>
                            <td>

                                <uc2:InputDateEx ID="u_startDate" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc2:InputDateEx ID="u_endDate" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc3:LabelEx ID="u_recordedTime" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc3:LabelEx ID="u_totalExpenses" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc4:LinkButtonEx ID="u_review" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc5:SimpleSectionBreak ID="u_noteSection" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc3:LabelEx ID="u_colourLabel" runat="server" />

                                <uc6:ColorBoxEx ID="u_colour" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>

                                <uc7:MultilineTextBoxEx ID="u_notes" runat="server" />

                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Panel ID="p" runat="server" CssClass="editor" GroupingText=" ">
                                    <div style="margin-top: -25px;">
                                        <asp:Button ID="btn_Delete" runat="server" OnClick="OnDeleteNotes" />
                                    </div>
                                </asp:Panel>

                            </td>
                        </tr>
                    </table>
                </asp:View>

                <asp:View ID="v_meta" runat="server">
                    <asp:Panel ID="pn_meta" runat="server">

                        <uc1:MetabaseViewer ID="mb" runat="server" />

                    </asp:Panel>
                </asp:View>
            </asp:MultiView>

            <hr class="ee" />

            <div class="divfright">
                <asp:Button ID="btn_OK" runat="server" OnClick="OnOKClick" CausesValidation="false" />
                <asp:Button ID="btn_Cancel" runat="server" OnClick="OnCancel" CausesValidation="false" />
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>

     <script>

         try {
             $(document).ready(function () {

                 var xPos1, yPos1, timer1;

                 var prm = Sys.WebForms.PageRequestManager.getInstance();
                 prm.add_beginRequest(BeginRequestHandler);
                 prm.add_endRequest(EndRequestHandler);

                 function BeginRequestHandler(sender, args) {

                     try {
                         yPos1 = $(window).scrollTop();
                     } catch (err) { }
                 }

                 function EndRequestHandler(sender, args) {
                     try {
                         $(window).scrollTop(yPos1);
                         timer1 = window.setTimeout(function () { $(window).scrollTop(yPos1); }, 100);

                         $(window).scrollTop(yPos1);
                     }
                     catch (err) { }
                 }

             });
         }
         catch (err) { }

    </script>

</asp:Content>
