<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register src="Interfaces/TicketDetails.ascx" tagname="TicketDetails" tagprefix="uc1" %>

<%@ Register src="Interfaces/UserAssignedTicketListingsView.ascx" tagname="UserAssignedTicketListingsView" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%">
<head id="Head1" runat="server">
    <title>Listing Page - Bug Error Demo</title>
    
    <link href="css-styles/default-style.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript">
    //        var cticket_popup_window;

        function open_popup_window(url_window, id_ticket, url_referer, url_frame, width, height) {
            if (cticket_popup_window) {
                cticket_popup_window.close();
            }
            cticket_popup_window = window.open(url_window + "?id_ticket=" + id_ticket + "&url_referer=" + url_referer + "&url_frame=" + url_frame, "ctk_window", "width=" + width + ",height=" + height);
            if (cticket_popup_window) {
                try {
                    cticket_popup_window.resizeTo(width + 10, height + 34);
                }
                catch (err) {
                }
            }
            if (cticket_popup_window)
                cticket_popup_window.focus();
        }
    </script>
    
    <script language="javascript" type="text/javascript" >
        function onSucceeded(result, userContext, methodName) {
        }
        function onFailed(error, userContext, methodName) {
        }
    </script>
    
    <script language="javascript" type="text/javascript" >
        function Reload() {
            __doPostBack('BtnRefreshLists', '');
        }
        function ReleaseTicket(id_ticket_locked) {
            if (document.getElementById("ActiveIdTicket"))
                document.getElementById("ActiveIdTicket").value = id_ticket_locked;
            PageMethods.Refresh(document.getElementById("ActiveIdTicket").value);
            sleep(1500);
            Reload();
        }
    </script>    

</head>
<body style="margin: 0px; width: 100%; height: 100%; overflow: hidden;" scroll="no">
    <form id="form1" runat="server" style="height: 100%; width: 100%;">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true">
        </telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="100%"
            Width="100%" Transparency="20" HorizontalAlign="Center"  >
            <div class="loading">
            <asp:Image ID="Image1" runat="server" ImageUrl="~/imgages/MediumLoading.gif" />
        </div>
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">
                <table class="HeaderRow_Vista" style="height: 30px;" cellspacing="0" cellpadding="0" width="100%" border="0" bgcolor="#e5efff">
                    <tr>
                        <td height="30">
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 30px;">
                                <tr>
                                    <td class="outer_header_text">
                                        &nbsp;Ticket List - Open Tickets &nbsp;<span id="window_size_text"></span>
                                    </td>
                                    <td align="right">
                                        <table cellspacing="0" cellpadding="0" border="0">
                                            <tr>
                                                <td align="right" valign="middle">Refresh&nbsp; 
                                                    <asp:ImageButton ID="BtnRefreshLists" runat="server" 
                                                        ImageUrl="~/images/Refresh.gif" onclick="BtnRefreshLists_Click" />
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                </td>
                                                <td align="center">
                                                    <font color="white">&nbsp;Refresh&nbsp;Time:&nbsp;</font>
                                                </td>
                                                <td align="right">
                                                    <telerik:RadComboBox ID="cbxTimeInterval" runat="server" Skin="Vista" 
                                                        onselectedindexchanged="cbxTimeInterval_SelectedIndexChanged" 
                                                        AutoPostBack="True">
                                                        <Items>
                                                            <telerik:RadComboBoxItem runat="server" Text="No Refresh" 
                                                                Value="0" />
                                                            <telerik:RadComboBoxItem runat="server" Text="1 Minute" 
                                                                Value="60000" />
                                                            <telerik:RadComboBoxItem runat="server" Text="2 Minutes" 
                                                                Value="120000" />
                                                            <telerik:RadComboBoxItem runat="server" Selected="True" Text="5 Minutes" 
                                                                Value="300000" />
                                                            <telerik:RadComboBoxItem runat="server" Text="10 Minutes" 
                                                                Value="600000" />
                                                            <telerik:RadComboBoxItem runat="server" Text="15 Minutes" 
                                                                Value="900000" />
                                                        </Items>
                                                        <CollapseAnimation Duration="200" Type="OutQuint" />
                                                    </telerik:RadComboBox>
                                                    <asp:HiddenField ID="ActiveIdTicket" runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <div>
                   <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" VisibleDuringInit="false"
                    Orientation="Horizontal" Skin="Default" HeightOffset="30">
                        <telerik:RadPane ID="MidPane" runat="server" Width="100%" Height="100%"  Scrolling="None">
                            <uc2:UserAssignedTicketListingsView ID="UserAssignedTicketListingsView1" 
                                runat="server" />
                        </telerik:RadPane>
                        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Backward"  />
                        <telerik:RadPane ID="BottomPane" runat="server" Height="220" Scrolling="None" Collapsed="True"> 
                            <uc1:TicketDetails ID="TicketDetails1" runat="server" />
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </div>
        </telerik:RadAjaxPanel>
    </form>
</body>
</html>
