<%@ Page Title="" Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true" CodeBehind="ProposedControlsCustomViewPage.aspx.cs" Inherits="MKInsight.Online.RRAM2.ControlsPrposedAndStandardControls.ProposedControlsCustomViewPage" %>

<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc2" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>

<%@ Register Src="../UIControls/PopupsHandler.ascx" TagName="PopupsHandler" TagPrefix="uc4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../UIControls/PopupPanel.ascx" TagName="PopupPanel" TagPrefix="uc5" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="../UIControls/MKControls/ProposedControlsAuditTrail.ascx"
    TagName="ProposedControlsAuditTrail" TagPrefix="uc6" %>
<%@ Register Src="~/UIControls/Interface/TextBoxEx.ascx" TagPrefix="uc1" TagName="TextBoxEx" %>
<%@ Register Src="~/UIControls/Interface/MultilineTextBoxEx.ascx" TagPrefix="uc1" TagName="MultilineTextBoxEx" %>
<%@ Register Src="~/UIControls/Interface/TextBoxDecimalEx.ascx" TagPrefix="uc1" TagName="TextBoxDecimalEx" %>
<%@ Register Src="~/UIControls/Interface/CheckBoxEX.ascx" TagPrefix="uc1" TagName="CheckBoxEX" %>
<%@ Register Src="~/UIControls/Metabase/MetabaseViewer.ascx" TagPrefix="uc1" TagName="MetabaseViewer" %>
<%@ Register Src="../UIControls/EntityLibrary/EntityEffectiveness.ascx" TagName="EntityEffectiveness" TagPrefix="uc3" %>
<%@ Register Src="../UIControls/EntityLibrary/ManagedItemsState.ascx" TagName="ManagedItemsState" TagPrefix="uc10" %>

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

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

<%@ Register Src="../UIControls/Interface/LabelEx.ascx" TagName="LabelEx" TagPrefix="uc9" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>
    <script type="text/javascript" src="../scripts/jquery/jquery.box-min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery/jqbox.css" />
    <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>
        $(document).bind('cbox_open', function () {
            $('html').css({ overflow: 'hidden' });
        }).bind('cbox_closed', function () {
            $('html').css({ overflow: 'auto' });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">
    <asp:UpdatePanel ID="up_n" runat="server">
        <ContentTemplate>
            <uc1:Header ID="usc_Header" runat="server" />

            <uc2:MessageBox ID="usc_M" runat="server" />

            <asp:MultiView ID="mv" runat="server">
                <asp:View ID="vMain" runat="server">

                    <uc10:ManagedItemsState ID="u_manage" runat="server" />

                    <table id="tb_RiskUniverse" runat="server" style="width: 100%;">
                        <tr runat="server" id="tr_Menu">
                            <td class="left" colspan="2" style="border-top-width: 1px; border-top-color: black; height: 42px; background-color: whitesmoke; vertical-align: top;">
                                <asp:Panel ID="pn_Menu" runat="server" CssClass="w-bar">

                                    <asp:LinkButton runat="server" ID="tbl_New" CssClass="w-button" Style="background: url(../images/add32.png); ">
                                        <asp:Label ID="tbl_NewLabel" runat="server"></asp:Label>
                                    </asp:LinkButton>

                                    <asp:LinkButton runat="server" ID="tbl_Search" CssClass="w-button" Style="background: url(../images/search32.png); ">
                                        <asp:Label ID="tbl_SearchLabel" runat="server"></asp:Label>
                                    </asp:LinkButton>

                                    <asp:LinkButton runat="server" ID="tbl_Import" CssClass="w-button" Style="background: url(../images/importreport32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '95%', height: '95%', iframe: true,href:'ImportManagedControl.aspx?t=26' });  return false;">
                                        <asp:Label ID="tbl_ImportLabel" runat="server"></asp:Label>
                                    </asp:LinkButton>

                                    <asp:LinkButton runat="server" ID="tbl_ManagedStates" CssClass="w-button" Style="background: url(../images/elb32.png); ">
                                        <asp:Label ID="tbl_ManagedStatesLabel" runat="server"></asp:Label>
                                    </asp:LinkButton>

                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td class="left" style="vertical-align: top;">

                                <cc4:MKGridView ID="dg_CS" runat="server" AllowPaging="True" AllowSorting="True"
                                    AutoGenerateColumns="False" BorderStyle="None" CellPadding="3" DataKeyNames="ID"
                                    OnRowDataBound="OnRowDataBound">
                                    <AlternatingRowStyle CssClass="alternatingrowstyle" />
                                    <FooterStyle BackColor="White" ForeColor="#000066" />
                                    <HeaderStyle CssClass="headerstyle" Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
                                    <PagerStyle HorizontalAlign="Left" />
                                    <Columns>
                                        <asp:CommandField HeaderText="Select" ShowSelectButton="True" />
                                        <asp:BoundField DataField="ID" HeaderText="ProposedControlsUniqueReference" SortExpression="ID" />
                                        <asp:BoundField DataField="RiskName" HeaderText="RiskName" SortExpression="RiskName">
                                            <ItemStyle Width="200px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Name" HeaderText="ProposedControlsName" SortExpression="Name" />

                                        <asp:BoundField DataField="StatusName" HeaderText="ProposedControlsStatus" SortExpression="StatusName" />
                                        <asp:BoundField DataField="Ref" HeaderText="ProposedControlsReference" SortExpression="Ref" />
                                    </Columns>
                                    <PagerTemplate>
                                        <asp:Label ID="lbl_ShowRows" runat="server" Text="Show rows:" /><asp:DropDownList
                                            ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="OnSelectedIndexChanged">
                                            <asp:ListItem Value="10" />
                                            <asp:ListItem Value="20" />
                                            <asp:ListItem Value="50" />
                                            <asp:ListItem Value="100" />
                                            <asp:ListItem Value="150" />
                                            <asp:ListItem Value="500" />
                                        </asp:DropDownList>
                                        &#160;&#160;<asp:Label ID="lbl_page" runat="server" Text="Page" /><asp:TextBox ID="txtGoToPage"
                                            runat="server" AutoPostBack="true" CssClass="gotopage" OnTextChanged="GoToPageOnTextChanged" /><asp:Label
                                                ID="lbl_Of" runat="server" Text="of" /><asp:Label ID="lblTotalNumberOfPages" runat="server" />&#160;&#160;<asp:Button
                                                    ID="btn_p" runat="server" CommandArgument="Prev" CommandName="Page" CssClass="previous"
                                                    SkinID="_" ToolTip="Previous Page" /><asp:Button ID="btn_n" runat="server" CommandArgument="Next"
                                                        CommandName="Page" CssClass="next" SkinID="_" ToolTip="Next Page" />
                                    </PagerTemplate>
                                    <SelectedRowStyle BackColor="#D6E8FF" />
                                </cc4:MKGridView>


                                <asp:Panel ID="pv" runat="server" Visible="False">

                                    <asp:Panel ID="tbM" runat="server" CssClass="w-bar">

                                        <asp:LinkButton runat="server" ID="tbl_Details" CssClass="w-button" Style="background: url(../images/detail32.png); ">
                                            <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); ">
                                            <asp:Label ID="tbl_MetaLabel" runat="server"></asp:Label>
                                        </asp:LinkButton>

                                        <asp:LinkButton runat="server" ID="tbl_ManagedMeta" CssClass="w-button" Style="background: url(../images/magnagedMetabase32.png); ">
                                            <asp:Label ID="tbl_ManagedMetaLabel" runat="server"></asp:Label>
                                        </asp:LinkButton>

                                        <asp:LinkButton runat="server" ID="tbl_AuditTrail" CssClass="w-button" Style="background: url(../images/history32.png); ">
                                            <asp:Label ID="tbl_AuditTrailLabel" runat="server"></asp:Label>
                                        </asp:LinkButton>

                                    </asp:Panel>

                                    <asp:Panel ID="pn_a_1" runat="server">

                                        <uc8:ProposedControlButtonActions ID="u_a_1" runat="server" />

                                    </asp:Panel>

                                    <asp:Panel ID="pn_Details" runat="server">
                                    </asp:Panel>

                                    <uc3:EntityEffectiveness ID="u_cm" runat="server" />

                                    <asp:Panel ID="pn_Meta" runat="server" Visible="false">
                                        <uc1:MetabaseViewer runat="server" ID="mb_Metadata" />
                                    </asp:Panel>

                                    <asp:Panel ID="pn_Managedmetadata" runat="server" Visible="false">
                                        <uc1:MetabaseViewer runat="server" ID="mb_Managedmetadata" />
                                    </asp:Panel>

                                    <asp:Panel ID="pn_a_2" runat="server">

                                        <uc8:ProposedControlButtonActions ID="u_a_2" runat="server" />

                                    </asp:Panel>

                                </asp:Panel>

                            </td>

                        </tr>
                    </table>
                </asp:View>
                <asp:View ID="vSearch" runat="server">
                    <div>
                        <asp:Panel ID="p_Search" runat="server">
                            <table>
                                <tr>
                                    <td colspan="2">
                                        <uc1:TextBoxEx runat="server" ID="u_SRef" />

                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <uc1:TextBoxEx runat="server" ID="u_SName" />

                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <uc1:CheckBoxEX runat="server" ID="u_ShowImp" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="left" colspan="2">
                                        <uc4:PopupsHandler ID="ph_SO" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="left" colspan="2">
                                        <uc4:PopupsHandler ID="ph_SS" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="left" colspan="2">
                                        <uc4:PopupsHandler ID="ph_STD" runat="server" />
                                    </td>
                                </tr>

                                <tr>
                                    <td class="left" colspan="2" style="vertical-align: top;">
                                        <asp:Button ID="btn_SSearch" runat="server" Text="Add" />
                                        <asp:Button ID="btn_SClear" runat="server" Text="Clear" />
                                        <asp:Button ID="btn_SCancel" runat="server" Text="Cancel" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="left" colspan="2" style="vertical-align: top;">&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </asp:View>
                
                <asp:View ID="v_History" runat="server">
                    <div>
                        <asp:Button ID="btn_HCancel" runat="server" Text="Cancel" />
                    </div>
                    <hr class="ee" />
                    <div>
                        <uc6:ProposedControlsAuditTrail ID="usc_History" runat="server" />
                    </div>
                </asp:View>
            </asp:MultiView>
            <asp:Button ID="btn_pHandler" runat="server" Text="Button" Style="display: none;" />
            <asp:Panel ID="p" runat="server" CssClass="frame" Style="display: none;">
                <div class="overlay">
                    <div style="float: right; margin-top: -28px; margin-right: -10px;">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="~/images/jq/close.png" runat="server" />
                    </div>
                    <div class="floatright">
                        <asp:Button ID="btn_TopOK" runat="server" />
                    </div>
                    <uc5:PopupPanel ID="usc_PP" runat="server" />
                    <div class="divpok">
                        <asp:Button ID="btn_POK" runat="server" />
                    </div>
                </div>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mdp" runat="server" TargetControlID="btn_pHandler" PopupControlID="P"
                BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <cc1:DragPanelExtender ID="dpE" runat="server" DragHandleID="pnlHeader" TargetControlID="p" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="pr" runat="server" AssociatedUpdatePanelID="up_n" DisplayAfter="40">
        <ProgressTemplate>
            <div class="UpdateProgressBackground">
                <center>
                    <div class="UpdateProgressContent">
                        <h3>
                            <asp:Label ID="lbl_Wait" runat="server"></asp:Label></h3>
                        <br />
                        <img id="Img1" src="~/images/ajax.gif" alt="" runat="server" />
                    </div>
                </center>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <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>
