<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Category.aspx.vb" Inherits="CalendarAdmin.Category" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Assembly="Microsoft.Web.DynamicDataControls" Namespace="Microsoft.Web.DynamicDataControls"  TagPrefix="cc1" %>
<!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" >
<head id="Head1" runat="server">
    <title>Calendar Administration (Category...)</title>
     <link href="style/Login.css"rel="stylesheet" type="text/css">
  <style type="text/css">
   .ModalBackground {
    	background-color: Gray;
    	filter: alpha(opacity=70);
        opacity: 0.7;
        -moz-opacity: 0.7;
    }
</style>  
    

</head>
<body >
<script language=javascript type="text/javascript" >

function ShowMyModalPopup(catId,catTitle) 
{ 
 var modal = $find('mpeCategory');
 var label=document.getElementById('lblModal'); 
 document.getElementById('hdnCatId').value=catId;
 document.getElementById('hdnCatTitle').value=catTitle;
 label.innerHTML="<center>"+"Are you sure you want to" + "<br>" + "delete the category: " + "<br><b>\"" + catTitle  +"\" ?"+"</b></center>";  
 modal.show(); 
}


function HideModalPopup() 
{ 
  var modal = $find('mpeCategory'); 
  modal.hide(); 
}

function fnClickDelete(sender, e) 
{ 
  __doPostBack(sender,e); 
}


</script>
    <form id="Category" runat="server">
    
    <div id="Border" class="container">
        <div id="Header" class="header" >
            <asp:Image ID="imgLogo" runat="server" ImageUrl="~/images/edventure_logo.jpg" /></div>
        <div id="ProjectTitle" class="projectitle">
         <h2> Calendar Administration </h2>
         </div>
       
            <div id="NavButton" class="NavButton">
            <asp:LinkButton ID="lnkLogout" runat="server" Font-Bold="True" Font-Names="Arial" style="float:right;"  Font-Size="10pt">Logout</asp:LinkButton>
            <asp:Button ID="btnEvent" runat="server" Text="Events" BorderStyle="None" ForeColor="White" BackColor="#666666" Height="30px" Width="140px" Font-Names="Arial" Font-Bold="True" />
            <asp:Button ID="btnCategories" runat="server" Text="Categories" BorderStyle="None" ForeColor="#666666" BackColor="#E7E7E9" Height="30px" Width="140px" Font-Names="Arial" Font-Bold="True" />
            <asp:Button ID="btnClosedDates" runat="server" Text="Closed Dates" BorderStyle="None" ForeColor="White" BackColor="#666666" Height="30px" Width="140px" Font-Names="Arial" Font-Bold="True" />
            <asp:Button ID="btnUsers" runat="server" Text="Users" BorderStyle="None" ForeColor="White" BackColor="#666666" Height="30px" Width="140px" Font-Names="Arial" Font-Bold="True" />
            </div>
            <div id="FormTitle" class="formtitle">
         <h1>Category</h1>
         
         </div> 
         <div id="AddNew" class="AddNew" >
                        
                            <br />
                            
                            <asp:Button ID="btnAddCategory" runat="server" Text="Add Category >" BorderStyle="None" ForeColor="White" BackColor="#333333" Height="30px" Width="140px" Font-Names="Arial" Font-Bold="True" /></div>
            
        <div id="Message" class="Message" style="text-align: left">
            <asp:Label ID="lblMessage" runat="server" ForeColor="#FF0033" Font-Bold="True" Font-Size="10pt" />&nbsp;</div>
           
            
            <div id="CategoryGrid" class="CategoryGrid">
                <asp:GridView ID="grdCategory" runat="server" AutoGenerateColumns="False" BackColor="#F3F3F4"
                    BorderStyle="None" DataKeyNames="category_id,category_text" Font-Names="Arial"
                    Font-Size="10pt" ForeColor="#666666" ShowFooter="True" Width="100%" BorderWidth="0px" GridLines="None" Height="20px">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="btnArrow" runat="server" CommandName="Update" ImageUrl="~/images/UpArrow.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Display Order">
                            <ItemTemplate>
                                <asp:TextBox ID="txtDispOrd" runat="server" BorderColor="#666666" BorderWidth="1px"
                                    ReadOnly="True" Text='<%# Bind("display_order") %>' Width="20px"></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Width="150px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Category Title">
                            <ItemTemplate>
                                <asp:TextBox ID="txtCatTitle" runat="server" BorderColor="#666666" BorderWidth="1px"
                                    ReadOnly="True" Text='<%# Bind("category_text") %>' Width="312px" MaxLength="50"></asp:TextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:TextBox ID="txtCatTitle" runat="server" BorderColor="#666666" BorderWidth="1px"
                                    Width="310px"></asp:TextBox>
                            </FooterTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ShowHeader="False">
                            <FooterTemplate>
                                &nbsp;<asp:ImageButton ID="ImageButton1" runat="server" CommandName="AddNew" ImageUrl="~/images/btnAdd.gif" />
                            </FooterTemplate>
                            <ItemTemplate>
                                &nbsp;<asp:HyperLink ID="delHyperLnk" runat="server" ImageUrl="~/images/btnDelete.gif"
                                    oImageUrl="~/images/btnDelete.gif">Delete Category</asp:HyperLink>
                            </ItemTemplate>
                            <ControlStyle BorderStyle="None" ForeColor="White" />
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#B2B2B2" Font-Bold="True" Font-Names="Arial" />
                    <AlternatingRowStyle BackColor="#E7E7E9" BorderStyle="None" />
                    <RowStyle BorderStyle="None" />
                </asp:GridView>
                </div>
        <div style="width: 756px;float:left;text-align:left;margin-left:7px; "><br />
        <asp:Button ID="btnSave" runat="server" Text="Save >" BorderStyle="None" ForeColor="White" BackColor="#333333" Height="30px" Width="81px" Font-Names="Arial" Font-Bold="True" />
        </div>
        &nbsp;&nbsp;

    
    </div>
    
       
        
        <asp:ScriptManager ID="SM_Category" runat="server">
        </asp:ScriptManager>
        <cc2:ModalPopupExtender ID="mpeCategory" runat="server" BackgroundCssClass="ModalBackground"
            CancelControlID="btnModalCancel" OnCancelScript="HideModalPopup()"
            PopupControlID="Panel1" TargetControlID="Panel1" Drag="True">
        </cc2:ModalPopupExtender>
        
        <asp:Panel ID="Panel1" runat="server" Height="193px" Width="317px" BackColor="WhiteSmoke" CssClass="PannelDsg">
            <asp:HiddenField ID="hdnCatId" runat="server" />
            <asp:HiddenField ID="hdnCatTitle" runat="server" />
            &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<br />
            &nbsp; &nbsp; &nbsp; 
            <asp:Label ID="lblModal" runat="server" Font-Bold="False" Height="66px" Width="270px" Font-Size="X-Large"></asp:Label><br />
            &nbsp;
            <br />
            <br />
            <asp:Label ID="lblModalInfo" runat="server" Font-Size="Smaller" Height="13px" Text='  (All associated Events will shift to the "General" Category)  '
                Width="316px"></asp:Label><br />
            &nbsp;<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<asp:ImageButton
                ID="btnModalDelete" runat="server" ImageUrl="~/images/btnDelete.gif" />
            &nbsp;
           <asp:ImageButton ID="btnModalCancel" runat="server" ImageUrl="~/images/btnCancel.gif" /></asp:Panel>
           </form> 
</body>
</html>
