Created
August 30, 2012 13:07
-
-
Save joneff/3528153 to your computer and use it in GitHub Desktop.
Example file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Upload_WebMail_DefaultCS" %> | |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> | |
<!DOCTYPE html> | |
<html xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<title></title> | |
<link href="styles.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> | |
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingExamplePanel" /> | |
<input type="hidden" id="UploadedFilesJson" runat="server" /> | |
<telerik:RadScriptBlock runat="server"> | |
<script type="text/javascript"> | |
var $ = $telerik.$; | |
var uploadsInProgress = 0; | |
function onFileSelected(sender, args) { | |
if (!uploadsInProgress) | |
$("#SaveButton").attr("disabled", "disabled"); | |
uploadsInProgress++; | |
} | |
function onFileUploaded(sender, args) { | |
decrementUploadsInProgress(); | |
} | |
function onUploadFailed(sender, args) { | |
decrementUploadsInProgress(); | |
} | |
function decrementUploadsInProgress() { | |
uploadsInProgress--; | |
if (!uploadsInProgress) | |
$("#SaveButton").removeAttr("disabled"); | |
} | |
</script> | |
</telerik:RadScriptBlock> | |
<asp:Panel runat="server" ID="Panel1" Visible="true"> | |
<div class="example-panel"> | |
<div class="to-subject-panel"> | |
<ul> | |
<li> | |
<label>To:</label> | |
<telerik:RadTextBox ID="ToTextBox" runat="server" Width="640px" Skin="Office2007" EnableViewState="false" /> | |
</li> | |
<li> | |
<label>Subject:</label> | |
<telerik:RadTextBox ID="SubjectTextBox" runat="server" Width="640px" Skin="Office2007" | |
EnableViewState="false" /> | |
</li> | |
</ul> | |
</div> | |
<div class="upload-panel"> | |
<div class="upload"> | |
<%-- For the purpose of this demo the files are discarded. | |
In order to store the uploaded files permanently set the TargetFolder property to a valid location. --%> | |
<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" Skin="Office2007" OnClientFileUploadFailed="onUploadFailed" | |
OnClientFileSelected="onFileSelected" OnClientFileUploaded="onFileUploaded" /> | |
</div> | |
</div> | |
<div class="editor-panel"> | |
<telerik:RadEditor ID="MailBodyEditor" runat="server" Width="735px" Height="258px" | |
EnableResize="false" EditModes="Design" Skin="Office2007" EnableViewState="false"> | |
<CssFiles> | |
<telerik:EditorCssFile Value="~/App_Themes/Default/CustomStyles.css" /> | |
</CssFiles> | |
<Tools> | |
<telerik:EditorToolGroup Tag="MainToolbar"> | |
<telerik:EditorTool Name="AjaxSpellCheck" /> | |
<telerik:EditorSeparator Visible="true" /> | |
<telerik:EditorTool Name="Undo" /> | |
<telerik:EditorTool Name="Redo" /> | |
<telerik:EditorSeparator Visible="true" /> | |
<telerik:EditorTool Name="Cut" /> | |
<telerik:EditorTool Name="Copy" /> | |
<telerik:EditorTool Name="Paste" ShortCut="CTRL+!" /> | |
</telerik:EditorToolGroup> | |
<telerik:EditorToolGroup Tag="Formatting"> | |
<telerik:EditorTool Name="Bold" /> | |
<telerik:EditorTool Name="Italic" /> | |
<telerik:EditorTool Name="Underline" /> | |
<telerik:EditorSeparator Visible="true" /> | |
<telerik:EditorTool Name="ForeColor" /> | |
<telerik:EditorTool Name="BackColor" /> | |
<telerik:EditorSeparator Visible="true"> | |
<telerik:EditorTool Name="FontName" /> | |
<telerik:EditorTool Name="RealFontSize" /> | |
</telerik:EditorToolGroup> | |
</Tools> | |
</telerik:RadEditor> | |
<asp:LinkButton ID="SaveButton" Text="SEND" runat="server" CssClass="save-button" OnClick="SaveButton_Click" /> | |
</div> | |
</div> | |
</asp:Panel> | |
<asp:Panel runat="server" ID="Panel2" Visible="false"> | |
<div class="example-panel"> | |
<div class="to-subject-panel"> | |
<ul> | |
<li> | |
<label>To:</label> | |
<asp:Label runat="server" ID="ToLabel" CssClass="text recipient" /> | |
</li> | |
<li> | |
<label>Subject:</label> | |
<asp:Label runat="server" ID="SubjectLabel" CssClass="text" /> | |
</li> | |
</ul> | |
</div> | |
<div class="upload-panel"> | |
<div class="attached-files"> | |
<div> | |
<label>Attached files:</label> | |
<asp:Repeater runat="server" ID="AttachmentRepeater" EnableViewState="false"> | |
<ItemTemplate> | |
<span class="attachment"> | |
<%#Eval("FileName")%> | |
(<%# Convert.ToInt32(Eval("ContentLength")) / 1024%>kb) | |
</span> | |
</ItemTemplate> | |
</asp:Repeater> | |
</div> | |
</div> | |
</div> | |
<div class="mail-body"> | |
<div class="mail-body-mid"> | |
<asp:Literal runat="server" ID="MailBodyLiteral" /> | |
</div> | |
<div class="mail-body-bot"> | |
</div> | |
</div> | |
<asp:LinkButton ID="BackButton" Text="BACK" runat="server" CssClass="back-button" OnClick="BackButton_Click" /> | |
</div> | |
</asp:Panel> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment