This commit is contained in:
Shannon Deminick
2012-11-08 08:12:33 +05:00
8 changed files with 22 additions and 16 deletions

View File

@@ -249,13 +249,14 @@ namespace Umbraco.Web
attributesForItem.Add(i.Key, i.Value);
}
var item = new Item()
{
NodeId = currentPage.Id.ToString(),
Field = fieldAlias,
TextIfEmpty = altText,
LegacyAttributes = attributesForItem
};
var item = new Item()
{
//NodeId = currentPage.Id.ToString();
Field = fieldAlias,
TextIfEmpty = altText,
LegacyAttributes = attributesForItem
};
var containerPage = new FormlessPage();
containerPage.Controls.Add(item);

View File

@@ -48,18 +48,19 @@ namespace umbraco.cms.presentation.settings
{
int mtid = 0;
speechBubble(speechBubbleIcon.save, "Mediatype saved", "Mediatype was successfully saved");
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, "Mediatype saved", "Mediatype was successfully saved");
if (int.TryParse(Request.QueryString["id"], out mtid))
new cms.businesslogic.media.MediaType(mtid).Save();
}
else if (sce.Message.Contains("Tab"))
{
speechBubble(speechBubbleIcon.info, "Tab added", sce.Message);
ClientTools.ShowSpeechBubble(sce.IconType, sce.Message, "");
}
else
{
base.speechBubble(sce.IconType, sce.Message, "");
ClientTools.ShowSpeechBubble(sce.IconType, sce.Message, "");
}
return true;

View File

@@ -103,7 +103,7 @@ namespace umbraco.settings
if (int.TryParse(Request.QueryString["id"], out dtid))
new cms.businesslogic.web.DocumentType(dtid).Save();
base.speechBubble(e.IconType, ui.Text("contentTypeSavedHeader"), "");
ClientTools.ShowSpeechBubble(e.IconType, ui.Text("contentTypeSavedHeader"), "");
ArrayList tmp = new ArrayList();
@@ -132,7 +132,7 @@ namespace umbraco.settings
}
else
{
base.speechBubble(e.IconType, e.Message, "");
ClientTools.ShowSpeechBubble(e.IconType, e.Message, "");
}
handled = true;
}

View File

@@ -107,7 +107,7 @@ namespace umbraco.presentation.templateControls
// content class to lookup field items
try
{
tempElementContent = GetContentFromDatabase(item.Attributes, tempNodeId.Value, currentField);
tempElementContent = GetContentFromDatabase(item.LegacyAttributes, tempNodeId.Value, currentField);
}
catch
{
@@ -248,7 +248,7 @@ namespace umbraco.presentation.templateControls
/// <param name="nodeIdInt">The node id.</param>
/// <param name="currentField">The field that should be fetched.</param>
/// <returns>The contents of the <paramref name="currentField"/> from the <paramref name="nodeIdInt"/> content object</returns>
protected virtual string GetContentFromDatabase(AttributeCollection itemAttributes, int nodeIdInt, string currentField)
protected virtual string GetContentFromDatabase(AttributeCollectionAdapter itemAttributes, int nodeIdInt, string currentField)
{
Content c = new Content(nodeIdInt);
@@ -256,7 +256,7 @@ namespace umbraco.presentation.templateControls
if (property == null)
throw new ArgumentException(String.Format("Could not find property {0} of node {1}.", currentField, nodeIdInt));
item umbItem = new item(property.Value.ToString(), new AttributeCollectionAdapter(itemAttributes));
item umbItem = new item(property.Value.ToString(), itemAttributes);
string tempElementContent = umbItem.FieldContent;
// If the current content object is a document object, we'll only output it if it's published

View File

@@ -162,7 +162,10 @@ namespace umbraco.presentation.umbraco.webservices
{
// Ensure we get the filename without the path in IE in intranet mode
// http://stackoverflow.com/questions/382464/httppostedfile-filename-different-from-ie
var fileName = new FileInfo(uploadFile.FileName).Name;
var fileName = uploadFile.FileName;
if(fileName.LastIndexOf(@"\") > 0)
fileName = fileName.Substring(fileName.LastIndexOf(@"\") + 1);
fileName = Umbraco.Core.IO.IOHelper.SafeFileName(fileName);
var postedMediaFile = new PostedMediaFile

View File

@@ -794,6 +794,7 @@ namespace umbraco.cms.businesslogic
SqlHelper.ExecuteNonQuery("delete from cmsTab where id =" + id);
InitializeVirtualTabs();
// Remove from cache
FlushFromCache(Id);
}