Work items: 29917, 30065, 30066
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Web.UI.WebControls;
|
||||
using ClientDependency.Core;
|
||||
using umbraco.cms.helpers;
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using umbraco.controls.GenericProperties;
|
||||
using umbraco.IO;
|
||||
using umbraco.presentation;
|
||||
using umbraco.cms.businesslogic;
|
||||
@@ -603,7 +604,7 @@ jQuery(function() { refreshDropDowns(); });
|
||||
GenericProperties.GenericProperty gpData = gp.GenricPropertyControl;
|
||||
if (gpData.Name.Trim() != "" && gpData.Alias.Trim() != "")
|
||||
{
|
||||
if (cType.getPropertyType(Casing.SafeAliasWithForcingCheck(gpData.Alias.Trim())) == null)
|
||||
if (doesPropertyTypeAliasExist(gpData))
|
||||
{
|
||||
string[] info = { gpData.Name, gpData.Type.ToString() };
|
||||
cms.businesslogic.propertytype.PropertyType pt = cType.AddPropertyType(cms.businesslogic.datatype.DataTypeDefinition.GetDataTypeDefinition(gpData.Type), Casing.SafeAliasWithForcingCheck(gpData.Alias.Trim()), gpData.Name);
|
||||
@@ -665,6 +666,18 @@ jQuery(function() { refreshDropDowns(); });
|
||||
}
|
||||
}
|
||||
|
||||
private bool doesPropertyTypeAliasExist(GenericProperty gpData)
|
||||
{
|
||||
bool hasAlias = cType.getPropertyType(Casing.SafeAliasWithForcingCheck(gpData.Alias.Trim())) != null;
|
||||
ContentType ct = cType;
|
||||
while (ct.MasterContentType > 0)
|
||||
{
|
||||
ct = new ContentType(ct.MasterContentType);
|
||||
hasAlias = ct.getPropertyType(Casing.SafeAliasWithForcingCheck(gpData.Alias.Trim())) != null;
|
||||
}
|
||||
return !hasAlias;
|
||||
}
|
||||
|
||||
public bool HasRows(System.Data.DataView dv)
|
||||
{
|
||||
return (dv.Count == 0);
|
||||
|
||||
@@ -154,7 +154,7 @@ body
|
||||
background: url('../images/speechbubble/speechbubble_body.png') no-repeat;
|
||||
width: 235px;
|
||||
margin: 0;
|
||||
padding: 10px 20px 10px 10px;
|
||||
padding: 5px 20px 5px 10px;
|
||||
}
|
||||
.speechBubbleBottom
|
||||
{
|
||||
@@ -179,7 +179,7 @@ body
|
||||
font-size: 11px;
|
||||
font-family: Trebuchet MS, Lucida Grande, verdana, arial;
|
||||
margin: 0;
|
||||
width: 220px;
|
||||
width: 180px;
|
||||
}
|
||||
#tray
|
||||
{
|
||||
|
||||
@@ -15,11 +15,11 @@ UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function() {
|
||||
sbHtml.innerHTML = '' +
|
||||
'<div class="speechBubbleTop"></div>' +
|
||||
'<div class="speechBubbleContent">' +
|
||||
'<img id="' + this.id + 'Icon" style="float: left; margin: 0px 10px 10px 0;" />' +
|
||||
'<img id="' + this.id + 'Icon" style="float: left; margin: 0px 5px 10px 3px;" />' +
|
||||
' <img class="speechClose" onClick="UmbSpeechBubble.Hide();" id="' + this.id + 'close" src="/umbraco/images/speechBubble/speechBubble_close.gif" width="18" height="18" border="0" alt="Close"' +
|
||||
' onmouseover="this.src = \'/umbraco/images/speechBubble/speechBubble_close_over.gif\';" onmouseout="this.src=\'images/speechBubble/speechBubble_close.gif\';">' +
|
||||
' <h3 id="' + this.id + 'Header">The header!</h3>' +
|
||||
' <p id="' + this.id + 'Message">Default Text Container!<br /></p>' +
|
||||
' <div style="float: right; width: 186px; margin-right: 10px;"><h3 id="' + this.id + 'Header">The header!</h3>' +
|
||||
' <p style="width: 185px" id="' + this.id + 'Message">Default Text Container!<br /></p></div><br style="clear: both" />' +
|
||||
'</div>' +
|
||||
'<div class="speechBubbleBottom"></div>'
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace umbraco.cms.presentation.members
|
||||
else
|
||||
{
|
||||
ClientTools
|
||||
.ShowSpeechBubble(speechBubbleIcon.save, e.Message, "")
|
||||
.ShowSpeechBubble(e.IconType, e.Message, "")
|
||||
.SyncTree(dt.Id.ToString(), true);
|
||||
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ namespace umbraco.cms.presentation.settings
|
||||
|
||||
} else if (sce.Message.Contains("Tab")) {
|
||||
speechBubble(speechBubbleIcon.info, "Tab added", sce.Message);
|
||||
} else
|
||||
{
|
||||
base.speechBubble(sce.IconType, sce.Message, "");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user