DO NOT D,OWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB

File cleanup, removed resx files, moved all files tagged for deletion to umbraco.Legacy project.

[TFS Changeset #57568]
This commit is contained in:
Shandem
2009-08-03 11:51:03 +00:00
parent f815b259db
commit e8dae88654
171 changed files with 252 additions and 8229 deletions

View File

@@ -1,56 +0,0 @@
using System;
namespace umbraco.editorControls.wysiwyg
{
/// <summary>
/// Summary description for WysiwygDataType.
/// </summary>
public class WysiwygDataType : cms.businesslogic.datatype.BaseDataType,interfaces.IDataType
{
private editor _Editor;
private cms.businesslogic.datatype.DefaultData _baseData;
private interfaces.IDataPrevalue _prevalueeditor;
public override interfaces.IDataEditor DataEditor
{
get
{
if (_Editor == null)
{
_Editor = new editor((cms.businesslogic.datatype.DefaultData)Data);
}
return _Editor;
}
}
public override interfaces.IData Data
{
get
{
if (_baseData == null)
_baseData = new cms.businesslogic.datatype.DefaultData(this);
return _baseData;
}
}
public override Guid Id
{
get {return new Guid("a3776494-0574-4d93-b7de-efdfdec6f2d1");}
}
public override string DataTypeName
{
get {return "Editor";}
}
public override interfaces.IDataPrevalue PrevalueEditor
{
get
{
if (_prevalueeditor == null)
_prevalueeditor = new DefaultPrevalueEditor(this,false);
return _prevalueeditor;
}
}
}
}

View File

@@ -1,577 +0,0 @@
using System;
using System.Collections;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.BusinessLogic;
using umbraco.interfaces;
using umbraco.uicontrols;
namespace umbraco.editorControls.wysiwyg
{
/// <summary>
/// Generates a field for typing numeric data
/// </summary>
public class editor : HiddenField, IDataFieldWithButtons
{
private ArrayList _buttons = new ArrayList();
private bool _isInitialized = false;
private String _text;
private ArrayList _menuIcons = new ArrayList();
private bool _browserIsCompatible = false;
private cms.businesslogic.datatype.DefaultData _data;
public editor(cms.businesslogic.datatype.DefaultData Data)
{
_data = Data;
if (HttpContext.Current.Request.Browser.Win32 &&
HttpContext.Current.Request.Browser.Browser == "IE")
_browserIsCompatible = true;
}
public virtual bool TreatAsRichTextEditor
{
get { return true; }
}
public bool ShowLabel
{
get { return false; }
}
public Control Editor
{
get { return this; }
}
public String Text
{
get
{
if (_text == null) return "";
HttpContext.Current.Trace.Warn("return text", _text);
return _text;
}
set
{
_text = " " + value + " ";
if (_text.Trim() != "")
{
// Check for umbraco tags
string pattern = @"[^'](<\?UMBRACO_MACRO\W*[^>]*/>)[^']";
MatchCollection tags =
Regex.Matches(_text, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags)
{
_text =
_text.Replace(tag.Groups[1].Value,
"<IMG alt='" + tag.Groups[1].Value + "' src=\"/imagesmacroo.gif\">");
}
// Clean urls
// _text = _text.Replace("http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"], "").Replace("HTTP://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"], "");
}
base.Value = _text.Trim();
}
}
public virtual object[] MenuIcons
{
get
{
initButtons();
object[] tempIcons = new object[_menuIcons.Count];
for (int i = 0; i < _menuIcons.Count; i++)
tempIcons[i] = _menuIcons[i];
return tempIcons;
}
}
public override string Value
{
get { return base.Value; }
set
{
base.Value = " " + value + " ";
// Check for umbraco tags
string pattern = @"[^'](<\?UMBRACO_MACRO\W*[^>]*/>)[^']";
MatchCollection tags =
Regex.Matches(base.Value + " ", pattern,
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags)
{
base.Value =
base.Value.Replace(tag.Groups[1].Value,
"<IMG alt='" + tag.Groups[1].Value + "' src=\"/imagesmacroo.gif\">");
}
Text = base.Value.Trim();
}
}
private string cleanImages(string html)
{
string[] allowedAttributes = UmbracoSettings.ImageAllowedAttributes.ToLower().Split(',');
string pattern = @"<img [^>]*>";
MatchCollection tags =
Regex.Matches(html + " ", pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags)
{
if (tag.Value.ToLower().IndexOf("umbraco_macro") == -1)
{
string cleanTag = "<img";
// gather all attributes
// TODO: This should be replaced with a general helper method - but for now we'll wanna leave umbraco.dll alone for this patch
Hashtable ht = new Hashtable();
MatchCollection m =
Regex.Matches(tag.Value.Replace(">", " >"),
"(?<attributeName>\\S*)=\"(?<attributeValue>[^\"]*)\"|(?<attributeName>\\S*)=(?<attributeValue>[^\"|\\s]*)\\s",
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match attributeSet in m)
ht.Add(attributeSet.Groups["attributeName"].Value.ToString().ToLower(),
attributeSet.Groups["attributeValue"].Value.ToString());
// Build image tag
foreach (string attr in allowedAttributes)
{
if (helper.FindAttribute(ht, attr) != "")
cleanTag += " " + attr + "=\"" + helper.FindAttribute(ht, attr) + "\"";
}
// If umbracoResizeImage attribute exists we should resize the image!
if (helper.FindAttribute(ht, "umbracoresizeimage") != "")
{
try
{
cleanTag += doResize(ht);
}
catch (Exception err)
{
cleanTag += " src=\"" + helper.FindAttribute(ht, "src") + "\"";
if (helper.FindAttribute(ht, "width") != "")
{
cleanTag += " width=\"" + helper.FindAttribute(ht, "width") + "\"";
cleanTag += " height=\"" + helper.FindAttribute(ht, "height") + "\"";
}
Log.Add(LogTypes.Error, User.GetUser(0), -1,
"Error resizing image in editor: " + err.ToString());
}
}
else
{
// Add src, width and height properties
cleanTag += " src=\"" + helper.FindAttribute(ht, "src") + "\"";
if (helper.FindAttribute(ht, "width") != "")
{
cleanTag += " width=\"" + helper.FindAttribute(ht, "width") + "\"";
cleanTag += " height=\"" + helper.FindAttribute(ht, "height") + "\"";
}
}
if (bool.Parse(GlobalSettings.EditXhtmlMode))
cleanTag += "/";
cleanTag += ">";
html = html.Replace(tag.Value, cleanTag);
}
}
return html;
}
private string doResize(Hashtable attributes)
{
string resizeDim = helper.FindAttribute(attributes, "umbracoresizeimage");
string[] resizeDimSplit = resizeDim.Split(',');
string orgSrc = helper.FindAttribute(attributes, "src").Replace("%20", " ");
int orgHeight = int.Parse(helper.FindAttribute(attributes, "umbracoorgheight"));
int orgWidth = int.Parse(helper.FindAttribute(attributes, "umbracoorgwidth"));
string beforeWidth = helper.FindAttribute(attributes, "umbracobeforeresizewidth");
string beforeHeight = helper.FindAttribute(attributes, "umbracobeforeresizeheight");
string newSrc = "";
if (orgHeight > 0 && orgWidth > 0 && resizeDim != "" && orgSrc != "")
{
// Check filename
if (beforeHeight != "" && beforeWidth != "")
{
orgSrc = orgSrc.Replace("_" + beforeWidth + "x" + beforeHeight, "");
}
string ext = orgSrc.Substring(orgSrc.LastIndexOf(".") + 1, orgSrc.Length - orgSrc.LastIndexOf(".") - 1);
newSrc = orgSrc.Replace("." + ext, "_" + resizeDimSplit[0] + "x" + resizeDimSplit[1] + ".jpg");
string fullSrc = HttpContext.Current.Server.MapPath(orgSrc);
string fullSrcNew = HttpContext.Current.Server.MapPath(newSrc);
// Load original image
System.Drawing.Image image = System.Drawing.Image.FromFile(fullSrc);
// Create new image with best quality settings
Bitmap bp = new Bitmap(int.Parse(resizeDimSplit[0]), int.Parse(resizeDimSplit[1]));
Graphics g = Graphics.FromImage(bp);
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
// Copy the old image to the new and resized
Rectangle rect = new Rectangle(0, 0, int.Parse(resizeDimSplit[0]), int.Parse(resizeDimSplit[1]));
g.DrawImage(image, rect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
// Copy metadata
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
ImageCodecInfo codec = null;
for (int i = 0; i < codecs.Length; i++)
{
if (codecs[i].MimeType.Equals("image/jpeg"))
codec = codecs[i];
}
// Set compresion ratio to 90%
EncoderParameters ep = new EncoderParameters();
ep.Param[0] = new EncoderParameter(Encoder.Quality, 90L);
// Save the new image
bp.Save(fullSrcNew, codec, ep);
orgSrc = newSrc;
}
return " src=\"" + newSrc + "\" width=\"" + resizeDimSplit[0] + "\" height=\"" + resizeDimSplit[1] + "\"";
}
public void Save()
{
if (Text.Trim() != "")
{
// Parse for servername
if (HttpContext.Current.Request.ServerVariables != null)
{
_text = _text.Replace(helper.GetBaseUrl(HttpContext.Current) + GlobalSettings.Path + "/", "");
_text = _text.Replace(helper.GetBaseUrl(HttpContext.Current), "");
}
// Parse for editing scriptname
string pattern2 = GlobalSettings.Path + "/richTextHolder.aspx?[^#]*#";
MatchCollection tags2 =
Regex.Matches(_text, pattern2, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags2)
{
_text = _text.Replace(tag.Value, "");
HttpContext.Current.Trace.Warn("editor-match", tag.Value);
}
// Parse for macros inside images
string pattern = @"<IMG\W*alt='(<?[^>]*>)'[^>]*>";
MatchCollection tags =
Regex.Matches(_text, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags)
if (tag.Groups.Count > 0)
{
string umbTag = tag.Groups[1].Value;
// Check for backwards compliance with old macro-tag format (<?UMBRACO_MACRO xxxx> vs. new format with closed tags: <?UMBRACO_MACRO xxxx/>)
if (umbTag.IndexOf("/>") < 0)
umbTag = umbTag.Substring(0, umbTag.Length - 1) + "/>";
_text = _text.Replace(tag.Value, umbTag);
}
// check for image tags
_text = cleanImages(_text);
_text = replaceMacroTags(_text).Trim();
// clean macros and add paragraph element for tidy
bool removeParagraphs = false;
if (_text.Length > 15 && _text.ToLower().Substring(0, 17) == "|||?umbraco_macro")
{
removeParagraphs = true;
_text = "<p>" + _text + "</p>";
}
// tidy html
if (UmbracoSettings.TidyEditorContent)
{
string tidyTxt = library.Tidy(_text, false);
if (tidyTxt != "[error]")
{
// compensate for breaking macro tags by tidy
_text = tidyTxt.Replace("/?>", "/>");
if (removeParagraphs)
{
if (_text.Length - _text.Replace("<", "").Length == 2)
_text = _text.Replace("<p>", "").Replace("</p>", "");
}
}
else
Log.Add(LogTypes.Error, User.GetUser(0), _data.NodeId,
"Error tidying txt from property: " + _data.PropertyId.ToString());
}
// rescue umbraco tags
_text = _text.Replace("|||?", "<?").Replace("/|||", "/>").Replace("|*|", "\"");
// if text is an empty parargraph, make it all empty
if (_text.ToLower() == "<p></p>")
_text = "";
}
// cms.businesslogic.Content.GetContentFromVersion(_version).getProperty(_alias).Value = Text;
_data.Value = Text;
}
private string replaceMacroTags(string text)
{
while (findStartTag(text) > -1)
{
string result = text.Substring(findStartTag(text), findEndTag(text) - findStartTag(text));
text = text.Replace(result, generateMacroTag(result));
}
return text;
}
private string generateMacroTag(string macroContent)
{
string macroAttr = macroContent.Substring(5, macroContent.IndexOf(">") - 5);
string macroTag = "|||?UMBRACO_MACRO ";
Hashtable attributes = ReturnAttributes(macroAttr);
IDictionaryEnumerator ide = attributes.GetEnumerator();
while (ide.MoveNext())
{
if (ide.Key.ToString().IndexOf("umb_") != -1)
macroTag += ide.Key.ToString().Substring(4, ide.Key.ToString().Length - 4) + "=|*|" +
ide.Value.ToString() + "|*| ";
}
macroTag += "/|||";
return macroTag;
}
public static Hashtable ReturnAttributes(String tag)
{
Hashtable ht = new Hashtable();
MatchCollection m =
Regex.Matches(tag, "(?<attributeName>\\S*)=\"(?<attributeValue>[^\"]*)\"",
RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match attributeSet in m)
ht.Add(attributeSet.Groups["attributeName"].Value.ToString(),
attributeSet.Groups["attributeValue"].Value.ToString());
return ht;
}
private int findStartTag(string text)
{
string temp = "";
text = text.ToLower();
if (text.IndexOf("ismacro=\"true\"") > -1)
{
temp = text.Substring(0, text.IndexOf("ismacro=\"true\""));
return temp.LastIndexOf("<");
}
return -1;
}
private int findEndTag(string text)
{
string find = "<!-- endumbmacro --></div>";
return text.ToLower().IndexOf("<!-- endumbmacro --></div>") + find.Length;
}
private void initButtons()
{
if (!_isInitialized)
{
_isInitialized = true;
// Test for browser compliance
if (_browserIsCompatible)
{
// Add icons for the editor control:
// Html
// Preview
// Style picker, showstyles
// Bold, italic, Text Gen
// Align: left, center, right
// Lists: Bullet, Ordered, indent, undo indent
// Link, Anchor
// Insert: Image, macro, table, formular
_buttons.Add(
new editorButton("html", ui.Text("buttons", "htmlEdit", null),
GlobalSettings.Path + "/images/editor/html.gif", "viewHTML('" + ClientID + "')"));
_buttons.Add("split");
_buttons.Add(
new editorButton("showstyles", ui.Text("buttons", "styleShow", null) + " (CTRL+SHIFT+V)",
GlobalSettings.Path + "/images/editor/showStyles.gif",
"umbracoShowStyles('" + ClientID + "')"));
_buttons.Add("split");
_buttons.Add(
new editorButton("bold", ui.Text("buttons", "bold", null) + " (CTRL+B)",
GlobalSettings.Path + "/images/editor/bold.gif",
"umbracoEditorCommand('" + ClientID + "', 'bold', '')"));
_buttons.Add(
new editorButton("italic", ui.Text("buttons", "italic", null) + " (CTRL+I)",
GlobalSettings.Path + "/images/editor/italic.gif",
"umbracoEditorCommand('" + ClientID + "', 'italic', '')"));
_buttons.Add(
new editorButton("graphicheadline", ui.Text("buttons", "graphicHeadline", null) + "(CTRL+B)",
GlobalSettings.Path + "/images/editor/umbracoTextGen.gif",
"umbracoTextGen('" + ClientID + "')"));
_buttons.Add("split");
_buttons.Add(
new editorButton("justifyleft", ui.Text("buttons", "justifyLeft", null),
GlobalSettings.Path + "/images/editor/left.gif",
"umbracoEditorCommand('" + ClientID + "', 'justifyleft', '')"));
_buttons.Add(
new editorButton("justifycenter", ui.Text("buttons", "justifyCenter", null),
GlobalSettings.Path + "/images/editor/center.gif",
"umbracoEditorCommand('" + ClientID + "', 'justifycenter', '')"));
_buttons.Add(
new editorButton("justifyright", ui.Text("buttons", "justifyRight", null),
GlobalSettings.Path + "/images/editor/right.gif",
"umbracoEditorCommand('" + ClientID + "', 'justifyright', '')"));
_buttons.Add("split");
_buttons.Add(
new editorButton("listBullet", ui.Text("buttons", "listBullet", null),
GlobalSettings.Path + "/images/editor/bullist.gif",
"umbracoEditorCommand('" + ClientID + "', 'insertUnorderedList', '')"));
_buttons.Add(
new editorButton("listNumeric", ui.Text("buttons", "listNumeric", null),
GlobalSettings.Path + "/images/editor/numlist.gif",
"umbracoEditorCommand('" + ClientID + "', 'insertOrderedList', '')"));
_buttons.Add(
new editorButton("deindent", ui.Text("buttons", "deindent", null),
GlobalSettings.Path + "/images/editor/deindent.gif",
"umbracoEditorCommand('" + ClientID + "', 'Outdent', '')"));
_buttons.Add(
new editorButton("indent", ui.Text("buttons", "indent", null),
GlobalSettings.Path + "/images/editor/inindent.gif",
"umbracoEditorCommand('" + ClientID + "', 'Indent', '')"));
_buttons.Add("split");
_buttons.Add(
new editorButton("linkInsert", ui.Text("buttons", "linkInsert", null),
GlobalSettings.Path + "/images/editor/link.gif",
"umbracoLink('" + ClientID + "')"));
_buttons.Add(
new editorButton("linkLocal", ui.Text("buttons", "linkLocal", null),
GlobalSettings.Path + "/images/editor/anchor.gif",
"umbracoAnchor('" + ClientID + "')"));
_buttons.Add("split");
_buttons.Add(
new editorButton("pictureInsert", ui.Text("buttons", "pictureInsert", null),
GlobalSettings.Path + "/images/editor/image.gif",
"umbracoImage('" + ClientID + "')"));
_buttons.Add(
new editorButton("macroInsert", ui.Text("buttons", "macroInsert", null),
GlobalSettings.Path + "/images/editor/insMacro.gif",
"umbracoInsertMacro('" + ClientID + "', '" + GlobalSettings.Path + "')"));
_buttons.Add(
new editorButton("tableInsert", ui.Text("buttons", "tableInsert", null),
GlobalSettings.Path + "/images/editor/instable.gif",
"umbracoInsertTable('" + ClientID + "', '" + GlobalSettings.Path + "')"));
_buttons.Add(
new editorButton("formFieldInsert", ui.Text("buttons", "formFieldInsert", null),
GlobalSettings.Path + "/images/editor/form.gif",
"umbracoInsertForm('" + ClientID + "', '" + GlobalSettings.Path + "')"));
// add save icon
foreach (object o in _buttons)
{
try
{
MenuIconI menuItem = new MenuIconClass();
editorButton e = (editorButton)o;
menuItem.OnClickCommand = e.onClickCommand;
menuItem.ImageURL = e.imageUrl;
menuItem.AltText = e.alttag;
menuItem.ID = e.id;
_menuIcons.Add(menuItem);
}
catch
{
_menuIcons.Add("|");
}
}
}
}
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.ClientScript.RegisterClientScriptInclude(Page.GetType(), "UMBRACO_EDITOR", GlobalSettings.Path + "/js/editorBarFunctions.js");
}
/// <summary>
/// Render this control to the output parameter specified.
/// </summary>
/// <param name="output"> The HTML writer to write out to </param>
protected override void Render(HtmlTextWriter output)
{
if (_browserIsCompatible)
{
base.Render(output);
output.Write("<iframe name=\"" + ClientID + "_holder\" id=\"" + ClientID +
"_holder\" style=\"border: 0px; width: 100%; height: 100%\" frameborder=\"0\" src=\"" +
GlobalSettings.Path + "/richTextHolder.aspx?nodeId=" + _data.NodeId.ToString() +
"&versionId=" + _data.Version.ToString() + "&propertyId=" + _data.PropertyId.ToString() +
"\"></iframe>");
output.Write("<input type=\"hidden\" name=\"" + ClientID + "_source\" value=\"\">");
string strScript = "function umbracoRichTextSave" + ClientID + "() {\nif (document.frames[\"" +
ClientID + "_holder\"].document.getElementById(\"holder\")) document.getElementById(\"" +
ClientID + "\").value = document.frames[\"" + ClientID +
"_holder\"].document.getElementById(\"holder\").innerHTML;\n}" +
"addSaveHandler('umbracoRichTextSave" + ClientID + "();');";
try
{
if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack)
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "umbracoRichTextSave" + this.ClientID, strScript, true);
else
Page.ClientScript.RegisterStartupScript(this.GetType(), "umbracoRichTextSave" + this.ClientID, strScript, true);
}
catch
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "umbracoRichTextSave" + this.ClientID, strScript, true);
}
}
else
{
output.WriteLine("<textarea name=\"" + ClientID + "\" style=\"width: 100%; height: 95%\">" +
HttpContext.Current.Server.HtmlEncode(base.Value.Trim()) +
"</textarea>");
output.WriteLine(
"<p class=\"guiDialogTiny\"><i>(Unfortunately WYSIWYG editing is only useLiveEditing in Internet Explorer on Windows. <a href=\"http://umbraco.org/various/cross-platform.aspx\" target=\"_blank\">More info</a>)</i></p>");
}
}
}
internal class editorButton
{
public string imageUrl;
public string onClickCommand;
public string alttag;
public string id;
public editorButton(string Id, string AltTag, string ImageUrl, string OnClickCommand)
{
id = Id;
alttag = AltTag;
imageUrl = ImageUrl;
onClickCommand = OnClickCommand;
}
}
}

View File

@@ -1,130 +0,0 @@
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.BusinessLogic;
using umbraco.DataLayer;
namespace umbraco.editorControls.ultraSimpleMailer
{
/// <summary>
/// Summary description for mailerConfiguratorPreValueEditor.
/// </summary>
public class mailerConfiguratorPreValueEditor : umbraco.editorControls.tinymce.tinyMCEPreValueConfigurator
{
// UI controls
private TextBox _textboxEmail;
private TextBox _textboxSender;
private DropDownList _dropdownlistMG;
// referenced datatype
private cms.businesslogic.datatype.BaseDataType _datatype;
public static ISqlHelper SqlHelper
{
get { return Application.SqlHelper; }
}
public mailerConfiguratorPreValueEditor(cms.businesslogic.datatype.BaseDataType DataType) : base(DataType)
{
// state it knows its datatypedefinitionid
_datatype = DataType;
setupChildControls();
}
private void setupChildControls()
{
_dropdownlistMG = new DropDownList();
_dropdownlistMG.ID = "memberGroup";
_textboxSender = new TextBox();
_textboxSender.ID = "SenderName";
_textboxEmail = new TextBox();
_textboxEmail.ID = "SenderEmail";
// put the childcontrols in context - ensuring that
// the viewstate is persisted etc.
Controls.Add(_dropdownlistMG);
Controls.Add(_textboxSender);
Controls.Add(_textboxEmail);
// Get all membergroups
foreach(cms.businesslogic.member.MemberGroup mg in cms.businesslogic.member.MemberGroup.GetAll)
_dropdownlistMG.Items.Add(new ListItem(mg.Text, mg.Id.ToString()));
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad (e);
if (!Page.IsPostBack)
{
string[] config = Configuration.Split("|".ToCharArray());
if (config.Length > 9)
{
_textboxSender.Text = config[9];
_textboxEmail.Text = config[10];
_dropdownlistMG.SelectedValue = config[11];
}
}
}
public Control Editor
{
get
{
return this;
}
}
public override void Save()
{
base.Save();
// Generate data-string
string data = Configuration + "|" + _textboxSender.Text + "|"+ _textboxEmail.Text + "|" + _dropdownlistMG.SelectedValue;
// If the add new prevalue textbox is filled out - add the value to the collection.
IParameter[] SqlParams = new IParameter[] {
SqlHelper.CreateParameter("@value",data),
SqlHelper.CreateParameter("@dtdefid",_datatype.DataTypeDefinitionId)};
SqlHelper.ExecuteNonQuery("delete from cmsDataTypePreValues where datatypenodeid = @dtdefid",SqlParams);
SqlHelper.ExecuteNonQuery("insert into cmsDataTypePreValues (datatypenodeid,[value],sortorder,alias) values (@dtdefid,@value,0,'')",SqlParams);
}
protected override void Render(HtmlTextWriter writer)
{
writer.WriteLine("<table>");
writer.Write("<tr><th>Sender name:</th><td>");
_textboxSender.RenderControl(writer);
writer.Write("</td></tr>");
writer.Write("<tr><th>Sender email:</th><td>");
_textboxEmail.RenderControl(writer);
writer.Write("</td></tr>");
writer.Write("<tr><th>Membergroup to recieve mail:</th><td>");
_dropdownlistMG.RenderControl(writer);
writer.Write("</td></tr>");
writer.Write("</table>");
base.Render(writer);
}
public string Configuration
{
get
{
object conf =
SqlHelper.ExecuteScalar<object>("select value from cmsDataTypePreValues where datatypenodeid = @datatypenodeid",
SqlHelper.CreateParameter("@datatypenodeid", _datatype.DataTypeDefinitionId));
if (conf != null)
return conf.ToString();
else
return "";
}
}
}
}

View File

@@ -1,128 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Text.RegularExpressions;
using DotNetOpenMail; /* http://dotnetopenmail.sourceforge.net/ */
namespace umbraco.editorControls.ultraSimpleMailer
{
/// <summary>
/// Summary description for mailerHelper.
/// </summary>
public class mailerHelper
{
public mailerHelper()
{
//
// TODO: Add constructor logic here
//
}
public static EmailMessage CreateEmbeddedEmail(string body, int newsletterId)
{
EmailMessage message = new EmailMessage();
Hashtable addedAtt = new Hashtable();
body = template.ParseInternalLinks(body);
//string currentDomain = "http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
//string pattern = "href=\"?([^\\\"' >]+)|src=\\\"?([^\\\"' >]+)";
string currentDomain = "http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
string pattern = "href=\"?([^\\\"' >]+)|src=\\\"?([^\\\"' >]+)|background=\\\"?([^\\\"' >]+)";
string appendNewsletter = "umbNl=" + newsletterId.ToString();
MatchCollection tags = Regex.Matches(body, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags)
if (tag.Groups.Count > 0)
{
if (tag.Groups[1].Value.ToLower().IndexOf("http://") == -1 &&
tag.Groups[2].Value.ToLower().IndexOf("http://") == -1 &&
tag.Groups[1].Value.ToLower().IndexOf("mailto:") == -1 &&
tag.Groups[2].Value.ToLower().IndexOf("mailto:") == -1)
{
// links
if (tag.Groups[1].Value != "")
{
if (tag.Groups[0].Value.ToLower() == "href=\"/")
{
if (tag.Groups[1].Value.IndexOf("?") == -1)
body = body.Replace(tag.Groups[0].Value + "\"", "href=\"" + currentDomain + tag.Groups[1].Value + "?" + appendNewsletter+ "\"");
else
body = body.Replace(tag.Groups[0].Value + "\"", "href=\"" + currentDomain + tag.Groups[1].Value + "&" + appendNewsletter + "\"");
}
else
{
if (tag.Groups[1].Value.IndexOf("?") == -1)
body = body.Replace("href=\"" + tag.Groups[1].Value + "\"", "href=\"" + currentDomain + tag.Groups[1].Value + "?" + appendNewsletter + "\"");
else
body = body.Replace("href=\"" + tag.Groups[1].Value + "\"", "href=\"" + currentDomain + tag.Groups[1].Value + "&" + appendNewsletter + "\"");
}
}
// src
else
{
string imageExtextions = "jpg,jpeg,gif,png";
string image = tag.Groups[2].Value;
if (image == "")
image = tag.Groups[3].Value;
string orgImage = image;
string ext = image.Split(char.Parse("."))[image.Split(char.Parse(".")).Length -1].ToLower();
bool isImage = imageExtextions.IndexOf(ext) != -1;
if (isImage)
{
string guid = Guid.NewGuid().ToString();
FileAttachment attachment = CreateImageAttachment(image, ext, guid);
if (attachment != null)
{
if (addedAtt.ContainsKey(image))
{
body = body.Replace(image, "cid:" + addedAtt[image].ToString());
}
else
{
message.AddRelatedAttachment(attachment);
body = body.Replace(image, "cid:" + guid);
addedAtt.Add(image, guid);
}
}
else
{
body = body.Replace(orgImage, currentDomain + tag.Groups[2].Value);
}
// break;
}
else
{
body = body.Replace(orgImage, currentDomain + tag.Groups[2].Value);
}
}
}
}
message.HtmlPart = new HtmlAttachment(body);
return message;
}
private static FileAttachment CreateImageAttachment(string image, string ext, string contentId)
{
string path = System.Web.HttpContext.Current.Server.MapPath(image);
if (!System.IO.File.Exists(path))
return null;
FileInfo file = new FileInfo(path);
FileAttachment attachment = new FileAttachment(file, contentId);
attachment.ContentType = "image/" + ext.ToLower().Replace("jpg", "jpeg");
return attachment;
}
}
}

View File

@@ -1,196 +0,0 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
using DotNetOpenMail; /* http://dotnetopenmail.sourceforge.net/ */
using System.Collections;
using umbraco.DataLayer;
using umbraco.BusinessLogic;
namespace umbraco.editorControls.ultraSimpleMailer
{
/// <summary>
/// Summary description for mailerLogic.
/// </summary>
public class mailerLogic
{
public mailerLogic()
{
//
// TODO: Add constructor logic here
//
}
public static ISqlHelper SqlHelper
{
get { return Application.SqlHelper; }
}
public static int GetTotalReceiptients(umbraco.cms.businesslogic.member.MemberGroup Group)
{
return SqlHelper.ExecuteScalar<int>("select count(*) from cmsMember inner join cmsMember2memberGroup on cmsmember.nodeId = cmsMember2MemberGroup.member where memberGroup = @memberGroupId", SqlHelper.CreateParameter("@memberGroupId", Group.Id));
}
public static void SendTestmail(string email,
umbraco.cms.businesslogic.property.Property Property,
string fromName, string fromEmail, bool IsHtml)
{
// version
string version = Property.VersionId.ToString();
// Get document
umbraco.cms.businesslogic.web.Document d = new umbraco.cms.businesslogic.web.Document(umbraco.cms.businesslogic.Content.GetContentFromVersion(Property.VersionId).Id);
System.Web.HttpContext.Current.Items["pageID"] = d.Id;
// Format mail
string subject = d.Text;
string sender = "\"" + fromName + "\" <" + fromEmail + ">";
// Get template
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter sw = new StringWriter(sb);
System.Web.UI.HtmlTextWriter writer = new System.Web.UI.HtmlTextWriter(sw);
umbraco.template t = new template(d.Template);
t.ParseWithControls(new umbraco.page(d.Id, d.Version)).RenderControl(writer);
// Embedded emails ;) added by DB, 2005-10-04
EmailMessage message = mailerHelper.CreateEmbeddedEmail(sb.ToString(), cms.businesslogic.web.Document.GetContentFromVersion(Property.VersionId).Id);
message.FromAddress = new EmailAddress(fromEmail, fromName);
message.ToAddresses.Add(new EmailAddress(email));
message.Subject = subject;
message.Send(new SmtpServer(GlobalSettings.SmtpServer));
}
public static void SendMail(umbraco.cms.businesslogic.member.MemberGroup Group, umbraco.cms.businesslogic.property.Property Property, string fromName, string fromEmail, bool IsHtml)
{
// Create ArrayList with emails who've received the e-mail
ArrayList sent = new ArrayList();
// set timeout
System.Web.HttpContext.Current.Server.ScriptTimeout = 43200; // 12 hours
// version
string version = Property.VersionId.ToString();
// Get document
umbraco.cms.businesslogic.web.Document d = new umbraco.cms.businesslogic.web.Document(umbraco.cms.businesslogic.Content.GetContentFromVersion(Property.VersionId).Id);
int id = d.Id;
System.Web.HttpContext.Current.Items["pageID"] = id;
// Format mail
string subject = d.Text;
string sender = "\"" + fromName + "\" <" + fromEmail + ">";
// Get template
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter sw = new StringWriter(sb);
System.Web.UI.HtmlTextWriter writer = new System.Web.UI.HtmlTextWriter(sw);
umbraco.template t = new template(d.Template);
t.ParseWithControls(new umbraco.page(d.Id, d.Version)).RenderControl(writer);
EmailMessage message = mailerHelper.CreateEmbeddedEmail(sb.ToString(), cms.businesslogic.web.Document.GetContentFromVersion(Property.VersionId).Id);
message.FromAddress = new EmailAddress(fromEmail, fromName);
message.Subject = subject;
SmtpServer smtpServer = new SmtpServer(GlobalSettings.SmtpServer);
// Bulk send mails
int counter = 0;
System.Text.StringBuilder sbStatus = new System.Text.StringBuilder();
sbStatus.Append("The Newsletter '" + d.Text + "' was starting at " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + "\n");
using(IRecordsReader dr = SqlHelper.ExecuteReader("select text, email from cmsMember inner join umbracoNode node on node.id = cmsMember.nodeId inner join cmsMember2memberGroup on cmsmember.nodeId = cmsMember2MemberGroup.member where memberGroup = @memberGroupId", SqlHelper.CreateParameter("@memberGroupId", Group.Id)))
{
while(dr.Read())
{
try
{
if (!sent.Contains(dr.GetString("email")))
{
message.ToAddresses.Clear();
message.ToAddresses.Add(new EmailAddress(dr.GetString("email"), dr.GetString("text")));
message.Send(smtpServer);
// add to arraylist of receiptients
sent.Add(dr.GetString("email"));
// Append to status
sbStatus.Append("Sent to " + dr.GetString("text") + " <" + dr.GetString("email") + "> \n\r");
}
else
{
// Append to status
sbStatus.Append("E-mail has already been sent to email '" + dr.GetString("email") + ". You have a duplicate member: " + dr.GetString("text") + " <" + dr.GetString("email") + "> \n\r");
}
}
catch(Exception ee)
{
sbStatus.Append("Error sending to " + dr.GetString("text") + " <" + dr.GetString("email") + ">: " +
ee.ToString() + " \n");
}
// For progress bar
counter++;
if(counter % 5 == 0)
{
System.Web.HttpContext.Current.Application.Lock();
System.Web.HttpContext.Current.Application["ultraSimpleMailerProgress" + id.ToString() + "Done"] = counter;
System.Web.HttpContext.Current.Application.UnLock();
}
}
}
sbStatus.Append("Finished at " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + "\n");
// Send status mail
library.SendMail(fromEmail, fromEmail, "Newsletter status", sbStatus.ToString(), false);
}
private static string updateLocalUris(string body, int newsletterId)
{
string currentDomain = "http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
string pattern = "href=\"?([^\\\"' >]+)|src=\\\"?([^\\\"' >]+)";
string appendNewsletter = "umbNl=" + newsletterId.ToString();
MatchCollection tags = Regex.Matches(body, pattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
foreach (Match tag in tags)
if (tag.Groups.Count > 0)
{
if (tag.Groups[1].Value.ToLower().IndexOf("http://") == -1 &&
tag.Groups[2].Value.ToLower().IndexOf("http://") == -1 &&
tag.Groups[1].Value.ToLower().IndexOf("mailto:") == -1 &&
tag.Groups[2].Value.ToLower().IndexOf("mailto:") == -1)
{
// links
if (tag.Groups[1].Value != "")
{
// Special case for root link ("/")
if (tag.Groups[0].Value.ToLower() == "href=\"/\"")
{
if (tag.Groups[1].Value.IndexOf("?") == -1)
body = body.Replace(tag.Groups[0].Value, "href=\"" + currentDomain + tag.Groups[1].Value + "?" + appendNewsletter+ "\"");
else
body = body.Replace(tag.Groups[0].Value, "href=\"" + currentDomain + tag.Groups[1].Value + "&" + appendNewsletter + "\"");
}
else
{
if (tag.Groups[1].Value.IndexOf("?") == -1)
body = body.Replace(tag.Groups[1].Value, currentDomain + tag.Groups[1].Value + "?" + appendNewsletter);
else
body = body.Replace(tag.Groups[1].Value, currentDomain + tag.Groups[1].Value + "&" + appendNewsletter);
}
}
// src
else
body = body.Replace(tag.Groups[2].Value, currentDomain + tag.Groups[2].Value);
}
}
return body;
}
}
}

View File

@@ -1,56 +0,0 @@
using System;
namespace umbraco.editorControls.ultraSimpleMailer
{
/// <summary>
/// Summary description for ultraSimpleMailerDataType.
/// </summary>
public class ultraSimpleMailerDataType : cms.businesslogic.datatype.BaseDataType,interfaces.IDataType
{
private ultraSimpleMailerEditor _Editor;
private cms.businesslogic.datatype.DefaultData _baseData;
private mailerConfiguratorPreValueEditor _prevalueeditor;
public override interfaces.IDataEditor DataEditor
{
get
{
if (_Editor == null)
{
_Editor = new ultraSimpleMailerEditor((umbraco.cms.businesslogic.datatype.DefaultData)Data, ((mailerConfiguratorPreValueEditor)PrevalueEditor).Configuration);
}
return _Editor;
}
}
public override interfaces.IData Data
{
get
{
if (_baseData == null)
_baseData = new cms.businesslogic.datatype.DefaultData(this);
return _baseData;
}
}
public override Guid Id
{
get {return new Guid("AABE748C-EFB6-4225-B7B2-DABC6FE36945");}
}
public override string DataTypeName
{
get {return "UltraSimpleMailer(tm)";}
}
public override interfaces.IDataPrevalue PrevalueEditor
{
get
{
if (_prevalueeditor == null)
_prevalueeditor = new mailerConfiguratorPreValueEditor(this);
return _prevalueeditor;
}
}
}
}

View File

@@ -1,168 +0,0 @@
using System;
using System.Collections;
using umbraco.editorControls.wysiwyg;
using umbraco.uicontrols;
using System.Web.UI;
namespace umbraco.editorControls.ultraSimpleMailer
{
/// <summary>
/// Summary description for ultraSimpleMailerEditor.
/// </summary>
public class ultraSimpleMailerEditor : umbraco.editorControls.tinyMCE3.TinyMCE, interfaces.IDataFieldWithButtons
{
umbraco.cms.businesslogic.datatype.DefaultData _data;
string _configuration;
private controls.progressBar pb;
public ultraSimpleMailerEditor(umbraco.cms.businesslogic.datatype.DefaultData Data, string Configuration)
: base(Data, Configuration)
{
_configuration = Configuration;
_data = Data;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// init progressbar
pb = new umbraco.controls.progressBar();
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "UltraSimpleMailerJs", "<script language='javascript' src='/" + GlobalSettings.ClientPath + "/ultraSimpleMailer/javascript.js'></script>");
string[] config = _configuration.Split("|".ToCharArray());
cms.businesslogic.member.MemberGroup mg = new umbraco.cms.businesslogic.member.MemberGroup(int.Parse(config[11]));
string totalReceip = mailerLogic.GetTotalReceiptients(mg).ToString();
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "ultraSimpleMailerAjax", "<script>\nultraSimpleMailerTotalMails = " + totalReceip + ";\nvar ultraSimpleMailerId = 'ultraSimpleMailerProgress" + this._data.NodeId + "';</script>");
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "progressBar", "<script language='javascript' src='/umbraco_client/progressBar/javascript.js'></script>");
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "progressBarCss", "<link href=\"" + GlobalSettings.ClientPath + "/progressBar/style.css\" type=\"text/css\" rel=\"stylesheet\">");
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
}
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
// Debug - needs logic
string[] config = _configuration.Split("|".ToCharArray());
cms.businesslogic.member.MemberGroup mg = new umbraco.cms.businesslogic.member.MemberGroup(int.Parse(config[11]));
writer.WriteLine("<input type=\"hidden\" name=\"" + this.ClientID + "_doSend\" id=\"" + this.ClientID + "_doSend\" value=\"" + umbraco.helper.Request(this.ClientID + "_doSend") + "\" />");
writer.WriteLine("<input type=\"hidden\" name=\"" + this.ClientID + "_doTest\" id=\"" + this.ClientID + "_doTest\" value=\"" + umbraco.helper.Request(this.ClientID + "_doTest") + "\" />");
if (umbraco.helper.Request(this.ClientID + "_doTest") == "" && umbraco.helper.Request(this.ClientID + "_doSend") == "")
base.Render(writer);
else
{
writer.WriteLine("<div class=\"propertypane\" style=\"margin: 10px; padding: 10px; width: 100%;height: 100%;background-color: light-blue\">");
if (umbraco.helper.Request(this.ClientID + "_sendButton") != "")
{
// Test mail
if (umbraco.helper.Request(this.ClientID + "_doTest") != "")
{
writer.WriteLine("<h3 style=\"margin-left: -1px;\">Send newsletter to test...</h3><br/>");
mailerLogic.SendTestmail(umbraco.helper.Request(this.ClientID + "_test_rcp"), new cms.businesslogic.property.Property(_data.PropertyId), config[9], config[10], true);
writer.WriteLine("Test mail sent to: <b>" + umbraco.helper.Request(this.ClientID + "_test_rcp") + "</b><br/>");
}
else
{
writer.WriteLine("<h3 style=\"margin-left: -1px;\">Send newsletter to all...</h3><br/>");
mailerLogic.SendMail(mg, new cms.businesslogic.property.Property(_data.PropertyId), config[9], config[10], true);
writer.WriteLine("Sent...<br/>");
}
}
else
{
if (umbraco.helper.Request(this.ClientID + "_doTest") != "")
{
writer.WriteLine("<h3 style=\"margin-left: -1px;\">Send newsletter to test...</h3><br/>");
writer.WriteLine("Send test to: <input type=\"text\" name=\"" + this.ClientID + "_test_rcp\" id=\"" + this.ClientID + "_test_rcp\"/>");
writer.WriteLine("<input type=\"submit\" name=\"" + this.ClientID + "_sendButton\" class=\"guiInputButton\" value=\"Send\"/>");
}
else
{
string strScript = " alert('The MassMailer / UltraSimplerMailer is incompatible with Umbraco 4'); umbPgStep = 1;\n umbPgIgnoreSteps = true;\n";
if (ScriptManager.GetCurrent(Page).IsInAsyncPostBack)
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), this.ClientID, strScript, true);
else
Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, strScript, true);
writer.WriteLine(" <div id=\"ultraSimpleMailerAnimDiv\" style=\"DISPLAY: none; TEXT-ALIGN: left\"><br /><br /><span style=\"border: #999 1px solid; PADDING: 15px; BACKGROUND: white; WIDTH: 300px; TEXT-ALIGN: center\"><img id=\"ultraSimpleMailerAnim\" height=\"42\" alt=\"Sending mails...\" src=\"images/anims/publishPages.gif\"" +
" width=\"150\" /><br />\n" +
" <span class=\"guiDialogTiny\" style=\"TEXT-ALIGN: center\">Sending mails...</span>\n" +
" <br />\n" +
" <br />\n");
// Progressbar
pb.ID = "ultraSimpleMailerUpgradeStatus";
pb.Width = 200;
pb.RenderControl(writer);
writer.WriteLine(" </span><br /><br /></div>\n" +
"<div id=\"ultraSimpleMailerFormDiv\">");
writer.WriteLine("<h3 style=\"margin-left: -1px;\">Send newsletter to all...</h3><br/>");
writer.WriteLine("Please confirm that you want to send this message to <b>" + mailerLogic.GetTotalReceiptients(mg).ToString() + "</b> recipients<br/>");
writer.WriteLine("<input type=\"checkbox\" name=\"" + this.ClientID + "_sendButton\" id=\"" + this.ClientID + "_sendButton\" value=\"1\"/> Yes<br/>");
writer.WriteLine("<input style=\"margin-left: -10px;\" type=\"button\" onClick=\"if (document.getElementById('" + this.ClientID + "_sendButton').checked) {ultraSimpleMailerDoSend('" + this.ClientID + "');} else {alert('Please confirm');}\" value=\"Send\"/>");
writer.WriteLine("</div>");
}
}
writer.WriteLine("</div>");
}
}
public object[] MenuIcons
{
get
{
object[] _buttons = { };
ArrayList buttons = new ArrayList();
for (int i = 0; i < _buttons.Length; i++)
buttons.Add(_buttons[i]);
// Add the two new buttons
MenuIconI menuItemSend = new MenuIconClass();
menuItemSend.OnClickCommand = "ultraSimpleMailer_doSend('" + this.ClientID + "')";
menuItemSend.ImageURL = GlobalSettings.ClientPath + "/ultraSimpleMailer/images/newsletterSend.gif";
menuItemSend.AltText = "Send newsletter to all";
menuItemSend.ID = "sendToAll";
buttons.Insert(0, menuItemSend);
MenuIconI menuItemTest = new MenuIconClass();
menuItemTest.OnClickCommand = "ultraSimpleMailer_doSendTest('" + this.ClientID + "')";
menuItemTest.ImageURL = GlobalSettings.ClientPath + "/ultraSimpleMailer/images/newsletterSendTest.gif";
menuItemTest.AltText = "Test newsletter by sending to a mail address you specify";
menuItemTest.ID = "sendToTest";
buttons.Insert(1, menuItemTest);
buttons.Insert(2, "|");
// Re-create the button array
_buttons = new object[buttons.Count];
for (int i = 0; i < buttons.Count; i++)
_buttons[i] = buttons[i];
return _buttons;
}
}
}
}

View File

@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{255F5DF1-4E43-4758-AC05-7A0B68EB021B}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -98,10 +98,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\foreign dlls\AjaxControlToolkit.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenMail">
<Name>DotNetOpenMail</Name>
<HintPath>..\..\foreign dlls\DotNetOpenMail.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
@@ -313,6 +309,7 @@
<Compile Include="textfield\TextFieldDataType.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="wysiwyg\editorButton.cs" />
<Compile Include="tinyMCE3\TinyMCE.cs" />
<Compile Include="tinyMCE3\tinyMCE3dataType.cs" />
<Compile Include="tinyMCE3\webcontrol\plugin\ConfigSection.cs" />
@@ -332,21 +329,6 @@
<Compile Include="ultimatepicker\ultimatePickerDataEditor.cs" />
<Compile Include="ultimatepicker\ultimatePickerDataType.cs" />
<Compile Include="ultimatepicker\ultimatePickerPrevalueEditor.cs" />
<Compile Include="ultraSimpleMailer\__TODELETE__mailerConfiguratorPreValueEditor.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ultraSimpleMailer\__TODELETE__mailerHelper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ultraSimpleMailer\__TODELETE__mailerLogic.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ultraSimpleMailer\__TODELETE__ultraSimpleMailerDataType.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ultraSimpleMailer\__TODELETE__ultraSimpleMailerEditor.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="uploadfield\DataTypeUploadField.cs">
<SubType>Code</SubType>
</Compile>
@@ -358,19 +340,15 @@
<Compile Include="userControlWrapper\usercontrolDataEditor.cs" />
<Compile Include="userControlWrapper\usercontrolDataType.cs" />
<Compile Include="userControlWrapper\usercontrolPrevalueEditor.cs" />
<Compile Include="__TODELETE__wysiwyg\__TODELETE__editor.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="__TODELETE__wysiwyg\__TODELETE__WysiwygDataType.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="yesno\yesNo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="yesno\YesNoDataType.cs">
<SubType>Code</SubType>
</Compile>
<EmbeddedResource Include="imagecropper\Resources.resx" />
<EmbeddedResource Include="imagecropper\Resources.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="textfield\textFieldDataEditor.resx">
<DependentUpon>textFieldDataEditor.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace umbraco.editorControls.wysiwyg
{
public class editorButton
{
public string imageUrl;
public string onClickCommand;
public string alttag;
public string id;
public editorButton(string Id, string AltTag, string ImageUrl, string OnClickCommand)
{
id = Id;
alttag = AltTag;
imageUrl = ImageUrl;
onClickCommand = OnClickCommand;
}
}
}