fixed merge issues

This commit is contained in:
Shannon Deminick
2013-04-17 23:03:51 +06:00
parent de0e47d7ef
commit 580123cb87
4 changed files with 16 additions and 20 deletions

View File

@@ -18,6 +18,7 @@ using umbraco.cms.businesslogic.web;
using umbraco.interfaces;
using umbraco.uicontrols;
using Content = umbraco.cms.businesslogic.Content;
using ContentType = umbraco.cms.businesslogic.ContentType;
using Media = umbraco.cms.businesslogic.media.Media;
using Property = umbraco.cms.businesslogic.property.Property;
using StylesheetProperty = umbraco.cms.businesslogic.web.StylesheetProperty;
@@ -31,18 +32,15 @@ namespace umbraco.controls
/// </summary>
public class ContentControl : TabView
{
private readonly Content _content;
internal Dictionary<string, IDataType> DataTypes = new Dictionary<string, IDataType>();
private UmbracoEnsuredPage _prntpage;
public ContentControl()
{
//by default set this to true for content
SavePropertyDataWhenInvalid = true;
}
internal Dictionary<string, IDataType> DataTypes = new Dictionary<string, IDataType>();
private readonly Content _content;
private readonly ArrayList _dataFields = new ArrayList();
private UmbracoEnsuredPage _prntpage;
public event EventHandler SaveAndPublish;
public event EventHandler SaveToPublish;
@@ -360,16 +358,16 @@ namespace umbraco.controls
}
}
foreach (var property in DataTypes)
{
var defaultData = property.Value.Data as DefaultData;
if (defaultData != null)
foreach (var property in DataTypes)
{
defaultData.PropertyTypeAlias = property.Key;
defaultData.NodeId = _content.Id;
var defaultData = property.Value.Data as DefaultData;
if (defaultData != null)
{
defaultData.PropertyTypeAlias = property.Key;
defaultData.NodeId = _content.Id;
}
property.Value.DataEditor.Save();
}
property.Value.DataEditor.Save();
}
//don't update if the name is empty
if (!NameTxt.Text.IsNullOrWhiteSpace())

View File

@@ -2,6 +2,7 @@ using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core.IO;
using Umbraco.Core.Services;
using umbraco.BusinessLogic.Actions;
using umbraco.uicontrols.DatePicker;
using umbraco.BusinessLogic;
@@ -313,9 +314,7 @@ namespace umbraco.cms.presentation
if (_document.Level == 1 || _document.PathPublished)
{
var previouslyPublished = _document.HasPublishedVersion();
Trace.Warn("before d.publish");
if (_document.PublishWithResult(base.getUser(), false))
{
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editContentPublishedHeader", null), ui.Text("speechBubbles", "editContentPublishedText", null));

View File

@@ -109,7 +109,7 @@ namespace umbraco.cms.presentation
//so we need to 'retrieve' that value and set it on the property of the new IContent object.
//NOTE This is a workaround for the legacy approach to saving values through the DataType instead of the Property
//- (The DataType shouldn't be responsible for saving the value - especically directly to the db).
foreach (var item in tmp.DataTypes)
foreach (var item in _contentControl.DataTypes)
{
_media.getProperty(item.Key).Value = item.Value.Data.Value;
}

View File

@@ -191,7 +191,7 @@ namespace umbraco.cms.presentation.members
//so we need to 'retrieve' that value and set it on the property of the new IContent object.
//NOTE This is a workaround for the legacy approach to saving values through the DataType instead of the Property
//- (The DataType shouldn't be responsible for saving the value - especically directly to the db).
foreach (var item in tmp.DataTypes)
foreach (var item in _contentControl.DataTypes)
{
_document.getProperty(item.Key).Value = item.Value.Data.Value;
}
@@ -224,8 +224,7 @@ namespace umbraco.cms.presentation.members
}
ClientTools.ShowSpeechBubble(BasePages.BasePage.speechBubbleIcon.save,
ui.Text("speechBubbles", "editMemberSaved", base.getUser()), "");
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editMemberSaved", base.getUser()), "");
}
}