<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/FiniqAppMasterPage.Master" CodeBehind="MenuHeaderList.aspx.vb" Inherits="FinIQWebApp.MenuHeaderList" %>

<asp:content id="Content1" contentplaceholderid="MainContent" runat="Server">

<%--    <script src="../FinIQJS/jquery-ui.min.js"></script>
    <link href="../FinIQJS/jquery-ui.min.css" rel="stylesheet" />--%>

    <script type="text/javascript">
      /* <ShekharL / ManasiA || 26-May-2021 || UBPINT-853 || Code changes to prevent logout on enter/tab key >*/
        function DoPostBack() {
            //txtFind_TextChanged(this, "TextChanged");
            $("#ctl00_MainContent_btnSearch").click();
            return true;
        }

        function txtTradeKeydown(e) {
            if (e.keyCode == 13) {
                // alert(1);
              //  $("#ctl00_MainContent_txtFind").change();
               // return true;
                $("#ctl00_MainContent_btnSearch").click();
                return true;
                // $('#btnSearch').trigger('click');
               // _doPostBack("txtFind", "TextChanged");
            }
        }
        /* <ShekharL / ManasiA || 26-May-2021 || UBPINT-853 || Code changes to prevent logout on enter/tab key >*/
    </script>


    <style type="text/css">
       .DispToggle, .CollapseToggle {
    width: 20px !important;
    height: 20px !important;
    outline: 0 !important;
    background-repeat: no-repeat;
    padding-left: 40px;
}
       /*updated by ShekharL @14-May-2022 BBVASOLAR Assigned by Rushikesh N.  */
#ctl00_MainContent_dtlstExhanges a:link {
    padding: 5px;
    height:14px; 
    display: block;
    vertical-align: middle;
    width: 350px !important;    
    transition: all 0.30s ease-in;
}
/*Added by ShekharL @14-May-2022 BBVASOLAR Assigned by Rushikesh N.  */
#ctl00_MainContent_dtlstExhanges a:link:hover{
    font-weight:500;
    font-size:125%; 
}

.ShareDetailsContainer {
    display: none;
    border-radius: 10px;
    width: 710px;
    height: auto;
    position: absolute;
    border-collapse: collapse;
}

    .ShareDetailsContainer table table {
    }

.lblInfo_share {
    font: normal 14px/32px Verdana, Helvetica, sans-serif !important;
    padding: 5px;
}

.inputs {
    border: 1px;
}

.GridCSS {
    text-decoration: none;
    border-style: none;
}

#dvCode table {
    float: left;
    margin: 2px;
}

/*Added by ShekharL @14-May-2022 BBVASOLAR Assigned by Rushikesh N.  */
.MH_firstcolumn{
    width:28px !important;
}

    </style>

      <asp:ScriptManagerProxy ID="scriptmanagerproxy1" runat="server"></asp:ScriptManagerProxy>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>

            <table class="Filter" style="border: none">

                <tr>
                    <td>
                            <asp:Label ID="lblFind" runat="server" Text="Page Name" CssClass="lbl"></asp:Label>
                         <%-- ShekharL / ManasiA || 26-May-2021 || UBPINT-853 || event changes to onkeyup from onkeypress to prevent logout on enter/tab key --%>
                        <asp:TextBox ID="txtFind" Width="300px" AutoPostBack ="true" runat="server" Style="margin-left: 45px;" CssClass="txt" onkeyup="return txtTradeKeydown(event);" autofocus onfocus="this.select();" ></asp:TextBox> <%--AshwiniP on 02122019--%>
                         <%--<input type="text" id="txtFind" Style="margin-left: 45px;" Class="txt" runat="server">--%>
                         <asp:Button ID="btnSearch" Style="text-align: center !important; width: 90px; margin-right: 8px;margin-left:8px;" Text="Find" runat="server" CssClass="btn"  />

                    </td>
            
                    <td>
                          <asp:Button ID="btnExpandAll" Style="text-align: center !important; width: 90px; margin-right: 8px" Text="Expand All" runat="server" CssClass="btn" />
                        <asp:Button ID="btnCollapseAll" Style="text-align: center !important; width: 90px; margin-right: 8px" Text="Collapse All" runat="server" CssClass="btn" />

                        <%-- changes made by Saniya.s || 16th Nov || JIRA ID - INT1FIN47-246 start --%>
                     <%--   <asp:Button ID="btnExport" Visible="true" Style="text-align: center !important; width: 110px; margin-right: 8px"  runat="server" CssClass="btn" />--%>
                        <asp:Button ID="lnkExportToExcel" Visible="true" Style="text-align: center !important; width: 110px; margin-right: 8px"  runat="server" CssClass="Export2Excel" />
                      <%-- changes made by Saniya.s || 16th Nov || JIRA ID - INT1FIN47-246 end --%>

                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                    </td>
                </tr>
            </table>

            <table>
                <tr>
                    <td>
                        <%-- Start  commented by ShekharL @14-May-2022 BBVASOLAR Assigned by Rushikesh N.        --%>
                        <div id="divshares" style="display: inline-block;" runat="server" AllowDrag="true" AllowDrop="true">
                            <asp:DataList ID="dtlstExhanges"  runat="server" AllowDrag="true" AllowDrop="true" RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="1">
                                <ItemTemplate>
                                            <%--    <br />--%>
                                    <div class="SN_HLine" style=" padding-top: 20px; display: inline-block; min-width: 100%;">
                                        <table style="width: 100%; min-width: 75vw;">
                                            <tr>
                                                <td class="MH_firstcolumn" style=" max-width:28px; white-space: nowrap;">
                                                    <asp:Button runat="server" ID="btnDisp" OnClick="Expand_exchange" CommandArgument='<%#Eval("AppMenuHeaderCaption")%>' class="DispToggle" />
                                                <asp:Button runat="server" ID="btncollapse" Visible="false" OnClick="Collapse_exchange" class="CollapseToggle" /></td>
                                                <%--<td></td>--%>
                                                <td style=" white-space: nowrap; padding-left: 4px;">
                                                    <asp:Label ID="lblExchangLong" CssClass="SN_lblHeader" runat="server" Text='<%#Eval("AppMenuHeaderCaption")%>'></asp:Label>
                                                     <asp:Label ID="lblPageCount" CssClass="SN_lblHeader" runat="server"  Text='<%#Eval("PageCount")%>'></asp:Label>
                                                    </td>
                                                <td  style="width: 100%;"></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <asp:DataList ID="dtlstShares" Style="margin-top: 10px !important; margin-bottom: 10px; margin-left: 5px !important;" runat="server" AllowDrag="true" AllowDrop="true" RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="3">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" CausesValidation="false" runat="server" Style="padding-left: 30px" ForeColor="#4da6ff" Text='<%# Eval("AppName")%>'  OnClick="OpenPageButton_Click"></asp:LinkButton>
                                            <asp:LinkButton ID="lnkAppId" runat="server" Style="padding-left: 30px" ForeColor="#4da6ff" Text='<%# Eval("AppId")%>' visible="false"></asp:LinkButton>
                                             <%--  END commented by ShekharL @14-May-2022 BBVASOLAR Assigned by Rushikesh N.        --%>
                                        </ItemTemplate>
                                    </asp:DataList>
                                </ItemTemplate>
                            </asp:DataList>
                        </div>
                    </td>
                    <td>
                        <div id="div_lblcode" class="ShareDetailsContainer" runat="server">
                            <table>
                                <tr>
                                    <th>
                                        <asp:Label ID="lblInfo_share" CssClass="lblInfo_share" runat="server"> </asp:Label></th>
                                </tr>
                                <tr>
                                    <td>
                                        <table id="grdSharDetails" style="padding-left: 16px !important;  border-width:0px !important;" class="Grid" cellspacing="0" cellpading="0"></table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
            <table>

                <tr>
                    <td style="width: 163px">
                        <input id="hdnButtonClick" type="hidden" runat="server" />

                        <asp:HiddenField ID="hdnAccountName" runat="server" />
                        <asp:HiddenField ID="FileName" runat="server" />
                        <asp:HiddenField ID="HdnFileFullPath" runat="server" />

                    </td>

                </tr>

            </table>
        </ContentTemplate>
              <Triggers>
            <asp:PostBackTrigger ControlID="lnkExportToExcel" /> <%-- changes made by Saniya.s || 16th Nov || JIRA ID - INT1FIN47-246 --%>
     
        </Triggers>
    </asp:UpdatePanel>


    <script type="text/javascript">
        $(document).ready(function () {
            $("#dtlstExhanges").click(function () {
              
            });
            $(".draggable").draggable({ revert: 'invalid', helper: 'clone' });
            $(".droppable").droppable();
            $(".droppable").bind('drop', function (ev, ui) { itemInSpot(ui.draggable, this); });
        });
        function itemInSpot(drag_item, spot) {
            var oldSpotItem = $(spot).find('img');
            if (oldSpotItem.length > 0) {
                oldSpotItem.remove();
            }
            var item = $('<img />');
            item.attr('src', drag_item.attr('src')).attr('class', drag_item.attr('class')).appendTo(spot).draggable({ revert: 'invalid' });
            //drag_item.remove(); // remove the old object
        }
		function openPage(uPath) {
             try {
                 var queryToken = window.location.search.split("&");
                 $(queryToken).each(function (i, j) {
                     if (j.split("=")[0] == "csrfToken") {
                         qtok = j.split("=")[1];
                     }
                 });
                 uPath = uPath.replace('~', '');
                 uPath = window.origin + "/FinIQWebApp" + uPath;
                 window.open(uPath, "_blank");
             } catch (er) { console.log(er.message); }
         }
    </script>
</asp:Content>

