⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view-createeditpost.ascx

📁 community server 源码
💻 ASCX
📖 第 1 页 / 共 2 页
字号:
<%@ Control Language="C#" %>
<%@ Import Namespace="CommunityServer.Components" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Register TagPrefix="CSD" Namespace="CommunityServer.Discussions.Controls" Assembly="CommunityServer.Discussions" %>
<%@ Register TagPrefix="CSDP" Namespace="CommunityServer.Discussions.Controls.PostDisplay" Assembly="CommunityServer.Discussions" %>
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
<%@ Import Namespace="CommunityServer.Discussions.Controls" %>
<%@ Import Namespace="CommunityServer.Discussions.Components" %>
<%@ Import Namespace="CommunityServer.Components" %>
<%@ Import Namespace="CommunityServer.Controls" %>
<%@ Import Namespace="CommunityServer" %>
<%@ Register TagPrefix="TWC" Namespace="Telligent.Web.UI" Assembly="Telligent.Web.UI" %>


<script language="javascript">

	function SelectPreview()
    {
        document.getElementById('Preview').innerHTML = '';
        document.getElementById('loading').style.display = 'block';
        CreateEditPost.PreviewPost('<%= this.Parent.ClientID %>', previewCallBack);
        
        InkCheck(false);
    }
    
    function previewCallBack(res)
    {
		if (res.error)
			alert(res.error);
		else
		{
			var e = document.getElementById('Preview');
			e.innerHTML = res.value;
		}
			
        document.getElementById('loading').style.display = 'none';
    }
    
       function toggleInk(cb)
       {
			if(cb.checked)
			{
				document.getElementById('<%= InkControl.ClientID %>').style.display = '';
			}
			else
			{
				document.getElementById('<%= InkControl.ClientID %>').style.display = 'none';
			}
       }
      
    var recentLookUp = null;
    function FetchRelated()
    {
        var query = document.getElementById('<%= PostSubject.ClientID %>').value;
        if(query != recentLookUp && query != '')
        {
            recentLookUp = query;
            <%= SearchCallBack.ClientID %>.Callback(query);
        }
        
        InkCheck(false);
    }
    
    function getAttachmentData(result)
	{
		// result = new Array(TemporaryPostAttachmentGuid, FileName, FriendlyFileName, IsRemote)
		if (result != null)
		{
			document.getElementById('<%= ServerUploadTempID.ClientID %>').value = result[0];
			document.getElementById('<%= ServerFilename.ClientID %>').value = result[1];
			document.getElementById('<%= Filename.ClientID %>').innerHTML = result[1];
			document.getElementById('<%= RemoveAttachment.ClientID %>').style.visibility = 'visible';
		}
	}
	
	function removeAttachment()
	{
		document.getElementById('<%= ServerUploadTempID.ClientID %>').value = '';
		document.getElementById('<%= ServerFilename.ClientID %>').value = '';
		document.getElementById('<%= Filename.ClientID %>').innerHTML = '';
		document.getElementById('<%= RemoveAttachment.ClientID %>').style.visibility = 'hidden';
	}

       function InkHidden()
       {
			InkCheck(false);
       }
       function InkVisible()
       {
			InkCheck(true);
       }
       function InkCheck(showInk)
       {
			var InkCheckCB = $('<%= EnableInk.ClientID %>');
			var InkCheckInkEditor = $('inkWrapper');
			if(showInk && InkCheckCB.checked)
			{
				$('inkWrapper').style.position= 'static';
			}
			else
 			{
				$('inkWrapper').style.position= 'absolute';
 			}
 			
 			return true;
      }
</script>

<div class="CommonContentArea">
	<div class="CommonBreadCrumbArea"><CSD:BreadCrumb ShowHome="true" runat="server" id="Breadcrumb2"/></div>
	<h2 class="CommonTitle"><asp:Label id="ForumName" Runat="server" /></h2>
	<div class="CommonContent">
		<div class="CommonDescription"><asp:Label id="ForumDescription" Runat="server" /></div>
		
	<TWC:TabbedPanes id="EditorTabs" runat="server"
		PanesCssClass="CommonPane"
		TabSetCssClass="CommonPaneTabSet"
		TabCssClasses="CommonPaneTab,CommonPaneTab1,CommonPaneTab2"
		TabSelectedCssClasses="CommonPaneTabSelected,CommonPaneTabSelected1,CommonPaneTabSelected2"
		TabHoverCssClasses="CommonPaneTabHover,CommonPaneTabHover1,CommonPaneTabHover2"
		>
		<TWC:TabbedPane runat="server" ID="ComposePane">
			<Tab OnClickClientFunction="InkHidden"><CS:ResourceControl runat="server" ResourceName="CreateEditPost_Tab_Compose" /></Tab>
			<Content>
				<div id="Reply" runat="server" Visible="false">
					<strong><asp:Literal id="ReplyDetails" Runat="server" /></strong>
					<div class="ForumReplyToPostArea">
					<asp:Literal id="ReplyBody" runat="server" />
					</div>
				</div>

				<div id="Post" runat="server" visible="true" class="CommonFormArea">
					<div id="Edit" runat="server" visible="false">
						<div class="CommonFormFieldName">
							<label><CS:ResourceControl runat="server" ResourceName="CreateEditPost_Inline6" ID="Resourcecontrol1"/> <asp:label id="PostEditor" runat="server" /></label>
						</div>
					</div>
					
					<div id="MessageTo" runat="server" visible="false">
						<div class="CommonFormFieldName">
							<label for="<%= To.ClientID %>" ><CS:ResourceControl runat="server" ResourceName="CreateEditPost_To" ID="Resourcecontrol5"/></label>
						</div>
						<div class="CommonFormField">
							<asp:textbox readonly="true"  autocomplete="off" id="To" runat="server"  style="width:80%;" />
						</div>
					</div>
					
					<div runat="server" visible="false" id="Tr1" NAME="Tr1">
						<div class="CommonFormFieldName">
							<label for="<%= Forums.ClientID %>"><CS:ResourceControl runat="server" ResourceName="CreateEditPost_Forums" ID="Resourcecontrol4"/> </label><br />
						</div>
						<div class="CommonFormField">
							<asp:textbox autocomplete="off" id="Forums" runat="server" style="width:80%;" />
						</div>
					</div>
					
					<div class="CommonFormFieldName">
						<label for="<%= PostSubject.ClientID %>" accesskey = "9"><CS:ResourceControl runat="server" ResourceName="CreateEditPost_Inline7" ID="Resourcecontrol2"/> <asp:requiredfieldvalidator id="postSubjectValidator" runat="server" CssClass="validationWarning" ControlToValidate="PostSubject" ErrorMessage="*" /></label><br />
					</div>
					<div class="CommonFormField">
						<asp:textbox autocomplete="off" id="PostSubject" CssClass="CommonInputBig" runat="server" style="width:80%;" />	
					</div>
					
					<div class="CommonFormFieldName">
						<label for="<%= PostBody.ClientID %>" ><CS:ResourceControl runat="server" ResourceName="CreateEditPost_Body" ID="Resourcecontrol3"/></label>
						<asp:requiredfieldvalidator id="postBodyValidator" runat="server" CssClass="validationWarning" ControlToValidate="postBody" EnableClientScript="False">*</asp:requiredfieldvalidator>
						<CSD:QuoteValidator id="postBodyQuoteValidator" runat="server" CssClass="validationWarning" ControlToValidate="PostBody" EnableClientScript="false">Non matching quote blocks in post</CSD:QuoteValidator>
					</div>
					<div class="CommonFormField">
						<CS:Editor Width="100%" runat="Server" id="PostBody" />
					</div>
					
					<asp:PlaceHolder ID="TaggingArea" Runat="server">
						<div class="CommonFormFieldName">
							<CS:ResourceControl runat="server" ResourceName="CreateEditPost_Tags" ID="Resourcecontrol10"/>
						</div>
						<div class="CommonFormField">
							<CS:TagEditor runat="server" id="Tags" />
						</div>
					</asp:PlaceHolder>
					
					<asp:PlaceHolder Runat="server" ID="EditNotesArea" Visible="False">
						<div class="CommonFormFieldName">
							<CS:ResourceLabel runat="server" ResourceName="CreateEditPost_EditNotes" ID="Resourcelabel2"/>
						</div>
						<div class="CommonFormField">
							<asp:textbox id="EditNotesBody" runat="server" columns="90" TextMode="MultiLine" rows="5"></asp:textbox>
							<asp:requiredfieldvalidator id="editNotesValidator" runat="server" CssClass="validationWarning" ControlToValidate="EditNotesBody" />
						</div>
	                    
						<div class="CommonFormFieldName">
							<CS:ResourceLabel runat="server" ResourceName="CreateEditPost_CurrentEditNotes" ID="Resourcelabel3"/>
						</div>
						<div class="CommonFormField">
							<asp:textbox ReadOnly="true" id="CurrentEditNotesBody" runat="server" columns="90" TextMode="MultiLine" rows="5"></asp:textbox>
						</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -