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

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

    <style type="text/css">
        #ctl00_MainContent_dlQueues a:link {
            padding: 5px;
            display: block;
            vertical-align: middle;
        }

        .tdPadding {
            padding: 10px;
        }

        .btn_ballcss {
            /* Gray */
            border: none;
            padding: 20px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            cursor: pointer;
            border-radius: 50%;
        }

        .ShareDetailsContainer {
            display: none;
            border-radius: 10px;
            width: 710px;
            height: auto;
            position: absolute;
            box-shadow: 3px 3px 4px #666;
            border: solid 1px #ddd;
            border-collapse: collapse;
        }

            .ShareDetailsContainer table table {
            }

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

        .DispToggle, .CollapseToggle {
            width: 20px !important;
            height: 20px !important;
            border: none 0px #FFF !important;
            color: #FFF !important;
            outline: 0 !important;
            background-color: #FFFFFF;
            background-repeat: no-repeat;
        }

        .DispToggle {
            background-image: url("../App_Resources/plus1.png");
        }

        .CollapseToggle {
            background-image: url("../App_Resources/minus_1.png");
        }

        .inputs {
            border: 1px;
            color: white;
        }

        .GridCSS {
            border-bottom: 1px solid #000;
            text-decoration: none;
            border-style: none;
            border: White;
        }

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

        .lblHeader {
            font: normal 14px/14px Verdana, Helvetica, sans-serif !important;
            color: #000000 !important;
            margin: 0px !important;
        }

        .btn, .btn:hover {
            text-align: left !important;
            box-shadow: 0px 2px #ddd !important;
            outline: none !important;
        }

        .Grid, .grid {
            border: solid 1px #dddddd;
            border-collapse: collapse;
        }

        .hidden {
            display: none;
        }

        .ui-widget.ui-widget-content {
            z-index: 9999999 !important;
            /*Arati Kulkarni CCS Changes 16-Jan-2019*/
            box-shadow: 0 0 10px #000000;
            padding: 0px;
            max-width: none !important;
            /*Arati Kulkarni CCS Changes 16-Jan-2019*/
        }

        /*Arati Kulkarni CCS Changes 16-Jan-2019*/
        .ui-widget-overlay {
            background: #000 !important;
            opacity: .3 !important;
        }

        .ui-dialog .ui-dialog-titlebar, .ui-dialog .ui-dialog-titlebar .ui-widget {
            background-image: none !important;
            background-color: #fff !important;
            color: #000000 !important;
            border: none;
        }

        .ui-selectmenu-button, .ui-widget, .ui-state-default, .ui-corner-all {
            border-radius: 8px !important;
        }

        .ui-dialog .ui-dialog-titlebar-close span {
            background-color: #fff !important;
            color: #000000 !important;
        }

        .ColorBoxes {
            width: 20px;
        }

        .EQ {
            background-color: #f56b6b;
        }

        .FI {
            background-color: #ffc72b; /*#CC6600*/
        }

        .FX {
            background-color: #5bc3ff; /*#a34ebb;*/
        }

        .UT {
            background-color: #77d74f; /*#5baf49*/
        }
        /*Arati Kulkarni CCS Changes 16-Jan-2019*/
        
    .snooker a, #ctl00_MainContent_dlQueues .tdPadding input , #ctl00_MainContent_dtAllTemplates .tdPadding input {
margin: 5px;
padding: 0px;
width: 4em;
height: 4em;
border-radius: 4em;
box-sizing: border-box;
border: solid 0px #FFF !important;
border-collapse: collapse;
background-image: url(../App_Resources/snooker2.png);
background-repeat: no-repeat;
background-size: 105%;
background-attachment: scroll;
background-position: center;
color: #FFF;
font: normal 14px/3em verdana;
text-align: center;
text-decoration: none;
display: block;
vertical-align: middle;
box-shadow: 0px 17px 10px -8px #757575;
text-shadow: 1px 1px 1px #000;
opacity: 0.85;

}

.snooker_larger {
    width: 4em !important;
height: 4em !important;
}
.snooker a:hover, #ctl00_MainContent_dlQueues .tdPadding input:hover, #ctl00_MainContent_dtAllTemplates .tdPadding input:hover {
   box-shadow: 0px 0px 20px 2px #808080;
   opacity:1;
}
.c1{
background-color: #f56b6b;
}
.c2{
background-color: #CC6600;
}
.c3{
background-color: #a34ebb;
}
.c4{
background-color: #5baf49;
}
.c5{
background-color: #1b8de6;
}
.c6{
background-color: #f1b709;
}

.snooker{
list-style:none;
list-style-position:inside;
margin:0px;
padding:0px;
}
.snooker li{
float:left;
}
    </style>
    <asp:UpdatePanel ID="UpdatePanel_Verifier" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <table class="Filter" style="border: none">
                <tr>
                    <td>
                        <asp:Label ID="lblWorklow" runat="server" Text="Workflow " CssClass="lbl"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlWorkFlow" runat="server" CssClass="ddl" Width="244px" EnableViewState="true" AutoPostBack="true" />
                    </td>
                    <td>
                        <asp:Button ID="btnExpandAll" Visible="true" Style="text-align: center !important; width: 90px; margin-right: 8px" Text="Expand All" runat="server" CssClass="btn" />
                        <asp:Button ID="btnCollapseAll" Visible="true" Style="text-align: center !important; width: 90px; margin-right: 8px" Text="Collapse All" runat="server" CssClass="btn" />
                        <asp:Label ID="lblMessage" runat="server" Visible="false" ForeColor="#4da6ff" Text="Template names in red color is/are not mapped to Deal Entry."></asp:Label>
                    </td>
                    <td></td>
                    <td id="lbl_EQ" runat="server" class="ColorBoxes">
                        <div style="width: 13px; height: 12px; background-color: #f56b6b;"></div>

                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Label ID="Label4" runat="server" CssClass="lbl" Text="EQ"></asp:Label>
                    </td>


                    <td id="lbl_FI" runat="server" class="ColorBoxes">
                        <div style="width: 13px; height: 12px; background-color: #ffc72b;"></div>

                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Label ID="Label3" runat="server" CssClass="lbl" Text="FI"></asp:Label>
                    </td>


                    <td id="lbl_FX" runat="server" class="ColorBoxes">
                        <div style="width: 13px; height: 12px; background-color: #5bc3ff;"></div>

                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Label ID="Label2" runat="server" CssClass="lbl" Text="FX"></asp:Label>
                    </td>



                    <td id="lbl_UT" runat="server" class="ColorBoxes">
                        <div style="width: 13px; height: 12px; background-color: #77d74f;"></div>

                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Label ID="Label1" runat="server" CssClass="lbl" Text="UT"></asp:Label>
                    </td>

                      <td id="lbl_IR" runat="server" class="ColorBoxes">
                        <div style="width: 13px; height: 12px; background-color: #a34ebb;"></div>

                    </td>
                    <td class="ctlBlotterPaddingRight">
                        <asp:Label ID="Label5" runat="server" CssClass="lbl" Text="Other"></asp:Label>
                    </td>

                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                    </td>
                </tr>
            </table>
            <table>
                <tr>
                    <td>
                        <div id="divWorkflows" style="display: inline-block;" runat="server" allowdrag="true" allowdrop="true">
                            <asp:DataList ID="dlQueues" Style="border-bottom: 1px solid #DDDDDD !important;" runat="server" AllowDrag="True" AllowDrop="true" RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="1" OnItemDataBound="dlQueues_ItemDataBound">
                                <ItemTemplate>
                                    <br />
                                    <div style="border-bottom: 1px solid #DDDDDD !important; padding-top: 10px; display: inline-block; min-width: 100%;">
                                        <table style="width: 100%">
                                            <tr>
                                                <td>
                                                    <asp:Button runat="server" ID="btnDisp" OnClick="btnDisp_Click" CommandArgument='<%#Eval("queueID")%>' CommandName="WorkflowEx" class="DispToggle" OnChange="NoPostback()" />
                                                </td>
                                                <td>
                                                    <asp:Button runat="server" ID="btncollapse" OnClick="btncollapse_Click" Visible="false" CommandArgument='<%#Eval("queueID")%>' class="CollapseToggle" OnChange="NoPostback()" />
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblQueueName" Style="display: none;" runat="server" Text='<%#Eval("queueName")%>'></asp:Label>
                                                    <asp:Label ID="lblQueueID" Style="display: none;" runat="server" Text='<%#Eval("queueID")%>' Visible="false"></asp:Label>
                                                </td>
                                                <td style="width: 90%; white-space: nowrap; padding: 5px;">
                                                    <asp:Label ID="lblExchangLong" CssClass="lblHeader" runat="server" Text='<%#Eval("queueName")%>'></asp:Label>
                                                </td>
                                            </tr>

                                        </table>
                                    </div>

                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Label ID="lblNMIDs" runat="server" Style="padding-left: 0px" Text="Note Master IDs" Visible="false"></asp:Label>
                                            </td>
                                            <td class="tdPadding">
                                                <asp:Button runat="server" ID="btn_Ball1" class="btn_ballcss" ToolTip="" Visible="false" OnClick="btn_Ball1_Click" />
                                                <asp:Label runat="server" ID="lblTokenID1" class="hidden" />
                                            </td>
                                            <td class="tdPadding">
                                                <asp:Button runat="server" ID="btn_Ball2" class="btn_ballcss" ToolTip="" Visible="false" OnClick="btn_Ball2_Click" />
                                                <asp:Label runat="server" ID="lblTokenID2" class="hidden" />
                                            </td>
                                            <td class="tdPadding">
                                                <asp:Button runat="server" ID="btn_Ball3" class="btn_ballcss" ToolTip="" Visible="false" OnClick="btn_Ball3_Click" />
                                                <asp:Label runat="server" ID="lblTokenID3" class="hidden" />
                                            </td>
                                            <td class="tdPadding">
                                                <asp:Button runat="server" ID="btn_Ball4" class="btn_ballcss" ToolTip="" Visible="false" OnClick="btn_Ball4_Click" />
                                                <asp:Label runat="server" ID="lblTokenID4" class="hidden" />
                                            </td>
                                            <td class="tdPadding">
                                                <asp:Button runat="server" ID="btn_Ball5" class="btn_ballcss" ToolTip="" Visible="false" OnClick="btn_Ball5_Click" />
                                                <asp:Label runat="server" ID="lblTokenID5" class="hidden" />
                                            </td>
                                            <td class="tdPadding">
                                                <asp:Button runat="server" ID="btn_Ball6" class="btn_ballcss" ToolTip="" Visible="false" OnClick="btn_Ball6_Click" />
                                                <asp:Label runat="server" ID="lblTokenID6" class="hidden" />
                                            </td>
                                        </tr>
                                    </table>

                                </ItemTemplate>
                            </asp:DataList>
                        </div>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    <script type="text/javascript">

        function DoPostBack() {
            __doPostBack("txtFind", "TextChanged");
        }

        function txtTradeKeydown(e) {
            if (e.keyCode == 13) {
                // alert(1);
                
                $("#ctl00_MainContent_btnSearch").focus();
                // $('#btnSearch').trigger('click');
                _doPostBack("txtFind", "TextChanged");
            }
        }

        function NoPostback() {
            event.returnValue = false;
        }

        $(document).ready(function () {
            $("#dtAllTemplates").click(function () {
                alert("Hello world!");
            });
            $(".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' });
        }

        function New_Order_Compact(lblcntrl) {
            var templateID = $("#ctl00_MainContent_dtAllTemplates_ctl00_dtWorkflowSetup" + lblcntrl + "_lblTemplateCode")
            alert(templateID);
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateCode=" + templateID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
        }




        function btn_Ball3_Click(evt) {
            
        }
    </script>
</asp:Content>
