<%@ Page language="c#" Codebehind="propertypage.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Modules.ControlPlace.propertypage" %>
<%@ Register TagPrefix="ibn" TagName="BlockHeader" src="..\..\Modules\BlockHeader.ascx" %>
<%@ register TagPrefix="btn" namespace="Mediachase.UI.Web.Modules" Assembly="Mediachase.UI.Web" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<html>
<head>
	<title><%=LocRM.GetString("tPPage")%></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 leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<form id="Form1" method="post" runat="server">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" bgcolor="#ECE9D8">
	<tr>
		<td align="center" style="padding:5px;" id="tdMain" runat="server" valign="top">
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td colspan="2" style="PADDING-BOTTOM: 10px">
						<table class="ibn-propertysheet ibn-stylebox2" cellSpacing="0" cellPadding="0" width="100%" border="0">
							<tr>
								<td><ibn:blockheader id="blocknameHeader" runat="server" /></td>
							</tr>
							<tr>
								<td>
									<table class="ibn-alternating ibn-navline text" cellSpacing="0" cellPadding="3" width="100%" border="0">
										<tr>
											<td class="text" style="padding-right:10px;padding-left:10px;"><asp:TextBox id="txtBlockName" CssClass="text" width="200px" runat="server" /></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td vAlign="top" width="50%">
						<table class="ibn-propertysheet ibn-stylebox2" cellSpacing="0" cellPadding="0" width="100%" border="0">
							<tr>
								<td><ibn:blockheader id="elementHeader" runat="server" /></td>
							</tr>
							<tr>
								<td>
									<table class="ibn-alternating ibn-navline text" cellSpacing="0" cellPadding="3" width="100%" border="0">
										<tr>
											<td>
												<span style="width:20px"><img width="16" height="16" border="0" src="../../Layouts/Images/quicktip.gif"></span><%=LocRM.GetString("tHelpSelectedFields")%>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td style="PADDING-RIGHT: 8px" vAlign="top">
									<asp:datagrid id="dgSelectedFields" Width="100%" borderwidth="0px" CellSpacing="0" gridlines="None"
										cellpadding="3" AllowSorting="False" AllowPaging="False" AutoGenerateColumns="False" Runat="server">
										<HeaderStyle Height="23"></HeaderStyle>
										<ItemStyle Height="28"></ItemStyle>
										<Columns>
											<asp:BoundColumn DataField="FieldId" Visible="False"></asp:BoundColumn>
											<asp:TemplateColumn>
												<HEADERSTYLE CssClass="ibn-vh2"></HEADERSTYLE>
												<ITEMSTYLE CssClass="ibn-vb2"></ITEMSTYLE>
												<ItemTemplate>
													<%#
														Mediachase.UI.Web.Util.CommonHelper.GetMetaFieldProperty(
															(int)DataBinder.Eval(Container.DataItem, "FieldId")
															)
													%>
												</ItemTemplate>
											</asp:TemplateColumn>
											<asp:TemplateColumn>
												<HEADERSTYLE CssClass="ibn-vh2"></HEADERSTYLE>
												<ITEMSTYLE CssClass="ibn-vb2"></ITEMSTYLE>
												<ItemTemplate>
													<%# DataBinder.Eval(Container.DataItem, "DataType")%>
												</ItemTemplate>
											</asp:TemplateColumn>
											<asp:TemplateColumn Visible="True">
												<HEADERSTYLE CssClass="ibn-vh2" HorizontalAlign="Center" Width="50"></HEADERSTYLE>
												<ITEMSTYLE CssClass="ibn-vb2" HorizontalAlign="Center" Width="50"></ITEMSTYLE>
												<ItemTemplate>
													<%# DataBinder.Eval(Container.DataItem, "Weight")%>
												</ItemTemplate>
												<EditItemTemplate>
													<asp:DropDownList Runat="server" ID="ddlPosition" Width="50"></asp:DropDownList>
												</EditItemTemplate>
											</asp:TemplateColumn>
											<asp:templatecolumn itemstyle-width="70" Visible="True">
												<HEADERSTYLE CssClass="ibn-vh2"></HEADERSTYLE>
												<ITEMSTYLE CssClass="ibn-vb2" HorizontalAlign="Right"></ITEMSTYLE>
												<itemtemplate>
													<asp:imagebutton id="ibEdit" runat="server" borderwidth="0" width="16" height="16" title='<%# LocRM.GetString("Edit")%>' imageurl="../../layouts/images/Edit.GIF" commandname="Edit" causesvalidation="False">
													</asp:imagebutton>
													&nbsp;
													<asp:imagebutton id="ibDelete" runat="server" borderwidth="0" width="16" height="16" title='<%# LocRM.GetString("Delete")%>' imageurl="../../layouts/images/DELETE.GIF" commandname="Delete" causesvalidation="False">
													</asp:imagebutton>
												</itemtemplate>
												<EditItemTemplate>
													<asp:imagebutton id="Imagebutton1" runat="server" borderwidth="0" width="16" height="16" title='<%# LocRM.GetString("Save")%>' imageurl="../../layouts/images/SaveItem.gif" commandname="Update" causesvalidation="True" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "FieldName")%>'/>
													&nbsp;
													<asp:imagebutton id="Imagebutton2" runat="server" borderwidth="0" width="16" height="16" title='<%# LocRM.GetString("Cancel")%>' imageurl="../../layouts/images/cancel.gif" commandname="Cancel" causesvalidation="False" />
												</EditItemTemplate>
											</asp:templatecolumn>
											<asp:BoundColumn Visible="False" DataField="FieldName"></asp:BoundColumn>
										</Columns>
									</asp:datagrid>
								</td>
							</tr>
						</table>
					</td>
					<td vAlign="top" width="50%" style="PADDING-LEFT:7px">
						<table class="ibn-propertysheet ibn-stylebox2" cellSpacing="0" cellPadding="0" width="100%" border="0">
							<tr>
								<td><ibn:blockheader id="fieldsHeader" runat="server" /></td>
							</tr>
							<tr>
								<td>
									<table class="ibn-alternating ibn-navline text" cellSpacing="0" cellPadding="3" width="100%"
										border="0">
										<tr>
											<td colspan="3">
												<span style="width:20px"><img width="16" height="16" border="0" src="../../Layouts/Images/quicktip.gif"></span><%=LocRM.GetString("tHelpAvailableFields")%>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td style="PADDING-RIGHT: 8px" vAlign="top">
									<asp:datagrid id="dgAvailableFields" Width="100%" borderwidth="0px" CellSpacing="0" gridlines="None"
										cellpadding="3" AllowSorting=True AllowPaging="False" AutoGenerateColumns="False" Runat="server">
										<ItemStyle Height="28"></ItemStyle>
										<HeaderStyle Height="23"></HeaderStyle>
										<Columns>
											<asp:BoundColumn Visible="False" DataField="FieldId"></asp:BoundColumn>
											<asp:TemplateColumn>
												<HeaderStyle Width="25px" CssClass="ibn-vh2"></HeaderStyle>
												<ItemStyle CssClass="ibn-vb2"></ItemStyle>
												<HeaderTemplate>
													&nbsp;
													<asp:ImageButton id="btnCopy" Width="15" Runat="server" Height="15" ImageUrl="../../Layouts/Images/go_left.gif" CommandName="Copy" title='<%#LocRM.GetString("AddFields") %>'>
													</asp:ImageButton>
												</HeaderTemplate>
												<ItemTemplate>
													<asp:checkbox id="chkItem" runat="server"></asp:checkbox>
												</ItemTemplate>
											</asp:TemplateColumn>
											<asp:TemplateColumn SortExpression="FriendlyName">
												<HeaderStyle CssClass="ibn-vh2"></HeaderStyle>
												<ItemStyle CssClass="ibn-vb2"></ItemStyle>
												<ItemTemplate>
													<%#
														Mediachase.UI.Web.Util.CommonHelper.GetMetaFieldProperty(
															(int)DataBinder.Eval(Container.DataItem, "FieldId")
															)
													%>
												</ItemTemplate>
											</asp:TemplateColumn>
											<asp:TemplateColumn SortExpression="sortDataType">
												<HeaderStyle CssClass="ibn-vh2"></HeaderStyle>
												<ItemStyle CssClass="ibn-vb2"></ItemStyle>
												<ItemTemplate>
													<%# DataBinder.Eval(Container.DataItem, "DataType")%>
												</ItemTemplate>
											</asp:TemplateColumn>
											<asp:TemplateColumn>
												<HeaderStyle CssClass="ibn-vh2"></HeaderStyle>
												<ItemStyle Width="50px" CssClass="ibn-vb2"></ItemStyle>
												<ItemTemplate>
													<asp:ImageButton id="ibCopy" Width="15" Runat="server" Height="15" ImageUrl="../../Layouts/Images/go_left.gif" CommandName="CopyOne" title='<%#LocRM.GetString("tAddOneField") %>'>
													</asp:ImageButton>&nbsp;
													<asp:imagebutton id="Imagebutton3" runat="server" borderwidth="0" width="16" height="16" title='<%# LocRM.GetString("Delete")%>' Visible='<%# (bool)(DataBinder.Eval(Container.DataItem,"CanDelete")) %>' imageurl="../../layouts/images/DELETE.GIF" commandname="Delete" causesvalidation="False">
													</asp:imagebutton>
												</ItemTemplate>
											</asp:TemplateColumn>
											<asp:BoundColumn Visible="False" DataField="FieldName"></asp:BoundColumn>
										</Columns>
									</asp:datagrid>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td align=right style="padding:0 5 5 5;">
			<asp:label id="lblError" CssClass="text" style="color:red;padding-right: 10px" Runat="server" />
			<btn:imbutton class="text" id="btnSave" Runat="server" Text=""></btn:imbutton>&nbsp;&nbsp;
			<btn:imbutton class="text" CausesValidation="false" id="btnCancel" Runat="server" Text="" IsDecline="true"></btn:imbutton>
		</td>
	</tr>
</table>
</form>	
</body>
</html>