<%@ register TagPrefix="lst" namespace="Mediachase.UI.Web.Modules" Assembly="Mediachase.UI.Web" %>
<%@ Page language="c#" Codebehind="SharingEditor.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Directory.SharingEditor" %>
<%@ Register TagPrefix="ibn" TagName="BlockHeader" src="..\Modules\BlockHeader.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD id="pT_headTag">
		<title>
			<%=LocRM.GetString("tTitle") %>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script src="../Scripts/browser.js"></script>
		<script src="../Scripts/buttons.js"></script>		
		<LINK href="../layouts/styles/windows.css" type="text/css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/theme.css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/color1.css" rel="stylesheet">
		<script><!--
		if ((browseris.mac) && !browseris.ie5up)
		{
			var macstyle = "../layouts/styles/mac.css";
			document.write("<link rel='stylesheet' Type='text/css' href='" + macstyle + "'>");
		}
	
		//--></script>
		<script language="JavaScript"> 
			function disableEnterKey() 
			{ 
				try {
					if (window.event.keyCode == 13 && window.event.srcElement.type != "textarea")
						window.event.keyCode = 0;
				}
				catch (e) {}
			} 
		</script>
	</HEAD>
	<body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
		<form id="frmMain" runat="server">
			<ibn:blockheader id="secHeader" title="ToolBar" runat="server"></ibn:blockheader>
			<table class="ibn-propertysheet" style="HEIGHT: 100%" height="100%" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr height="22">
					<td width="280" height="22" class="boldtext"><%=LocRM.GetString("Available") %>
						:</td>
					<td width="4">&nbsp;</td>
					<td class="ibn-navframe boldtext" height="22"><%=LocRM.GetString("Selected") %>
							:</td>
				</tr>
				<tr style="HEIGHT: 100%">
					<td vAlign="top" width="280">
						<!-- Groups & Users -->
						<table class="text" style="MARGIN-TOP: 5px" cellSpacing="0" cellPadding="3" width="100%">
							<tr>
								<td width="9%"><%=LocRM.GetString("Group") %>
									:</td>
								<td width="91%"><lst:indenteddropdownlist id="ddGroups" runat="server" CssClass="text" Width="190px" AutoPostBack="True" DataTextField="GroupName" DataValueField="GroupId"></lst:indenteddropdownlist></td>
							</tr>
							<TR>
								<TD width="9%"><%=LocRM.GetString("Search") %>:</TD>
								<TD width="91%">
									<asp:TextBox id="tbSearch" runat="server" CssClass="text" Width="125px"></asp:TextBox>
									<asp:button id="btnSearch" runat="server" Width="60px" CssClass="text" CausesValidation="False"></asp:button></TD>
							</TR>
							<tr>
								<td vAlign="top"><%=LocRM.GetString("User") %>
									:</td>
								<td vAlign="top"><asp:listbox id="lbUsers" runat="server" CssClass="text" Width="190px" SelectionMode="Multiple" Rows="6"></asp:listbox></td>
							</tr>
							<TR>
								<TD vAlign="top"></TD>
								<TD vAlign="top">
									<asp:CheckBox id="cbCanManage" runat="server">
									</asp:CheckBox></TD>
							</TR>
							<tr>
								<td vAlign="top" height="28">&nbsp;</td>
								<td><asp:button id="btnAdd" runat="server" CssClass="text" Width="90px" CausesValidation="False"></asp:button></td>
							</tr>
						</table>
						<Button id="btnSave" runat="server" Text="Button" style="DISPLAY:none"></Button>
						<!-- End Groups & Users -->
					</td>
					<td width="4">&nbsp;</td>
					<td vAlign="top" class="ibn-navframe" height="100%">
						<!-- Data GRID -->
						<div style="OVERFLOW-Y:auto;HEIGHT:300px">
							<asp:DataGrid Runat="server" ID="dgMembers" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="False" cellpadding="3" gridlines="None" CellSpacing="3" borderwidth="0px" Width="100%">
								<ItemStyle CssClass="ibn-propertysheet"></ItemStyle>
								<HeaderStyle CssClass="text"></HeaderStyle>
								<Columns>
									<asp:BoundColumn DataField="UserId" Visible="False"></asp:BoundColumn>
									<asp:TemplateColumn HeaderText='Name'>
										<ItemTemplate>
											<%# GetLink( (int)DataBinder.Eval(Container.DataItem, "UserId"),false)%>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText='Name' itemstyle-width="50">
										<ItemTemplate>
											<%# GetLevel( (int)DataBinder.Eval(Container.DataItem, "Level"))%>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:templatecolumn itemstyle-width="30" Visible="True">
										<itemtemplate>
											<asp:imagebutton id="ibDelete" runat="server" borderwidth="0" width="16" height="16" title="delete" imageurl="../layouts/images/DELETE.GIF" commandname="Delete" causesvalidation="False"></asp:imagebutton>
										</itemtemplate>
									</asp:templatecolumn>
								</Columns>
							</asp:DataGrid>
							<!-- End Data GRID -->
						</div>
					</td>
				</tr>
			</table>
			<script language=javascript>
				function FuncSave()
				{
					DisableButtons(document.forms[0].<%=btnSave.ClientID%>);
					<%=Page.GetPostBackClientEvent(btnSave,"") %>;
				}
			</script>
		</form>
	</body>
</HTML>
