From 4fcd23d8dc911fbbee0463765d61f709d9e1183a Mon Sep 17 00:00:00 2001 From: Kristian Schneider Date: Thu, 20 Nov 2014 12:04:54 +0000 Subject: [PATCH 1/6] Fix for U4-5657 List view typo: "There are no items show in the list." --- src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index b034f935b2..41f504084a 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -130,7 +130,7 @@ This item has been changed after publication This item is not published Last published - There are no items show in the list. + There are no items to show in the list. Media Type Link to media item(s) Member Group From 1ab321c7b17dac16f0d86823f718423ddcd7e0d4 Mon Sep 17 00:00:00 2001 From: Kristian Schneider Date: Thu, 20 Nov 2014 14:04:13 +0000 Subject: [PATCH 2/6] Fix for U4-5737 Create package: ContentType Tab index not saved --- src/Umbraco.Core/Services/EntityXmlSerializer.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Services/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/EntityXmlSerializer.cs index c260b10418..30a51f157e 100644 --- a/src/Umbraco.Core/Services/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/EntityXmlSerializer.cs @@ -248,7 +248,9 @@ namespace Umbraco.Core.Services { var tab = new XElement("Tab", new XElement("Id", propertyGroup.Id.ToString(CultureInfo.InvariantCulture)), - new XElement("Caption", propertyGroup.Name)); + new XElement("Caption", propertyGroup.Name), + new XElement("SortOrder", propertyGroup.SortOrder)); + tabs.Add(tab); } @@ -354,7 +356,8 @@ namespace Umbraco.Core.Services { var tab = new XElement("Tab", new XElement("Id", propertyGroup.Id.ToString(CultureInfo.InvariantCulture)), - new XElement("Caption", propertyGroup.Name)); + new XElement("Caption", propertyGroup.Name), + new XElement("SortOrder", propertyGroup.SortOrder)); tabs.Add(tab); } From 3e66235932ab95e486168a37d5372bf8ed740010 Mon Sep 17 00:00:00 2001 From: Kristian Schneider Date: Thu, 20 Nov 2014 14:23:47 +0000 Subject: [PATCH 3/6] amendment to U4-5737 Create package: ContentType Tab index not saved to ensure that the sortorder gets updated when importing doctypes --- src/Umbraco.Core/Services/PackagingService.cs | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/Umbraco.Core/Services/PackagingService.cs b/src/Umbraco.Core/Services/PackagingService.cs index 47310ab1c3..ace4931b5b 100644 --- a/src/Umbraco.Core/Services/PackagingService.cs +++ b/src/Umbraco.Core/Services/PackagingService.cs @@ -74,7 +74,7 @@ namespace Umbraco.Core.Services public XElement Export(IContent content, bool deep = false, bool raiseEvents = true) { var nodeName = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : content.ContentType.Alias.ToSafeAliasWithForcingCheck(); - + if (raiseEvents) { if (ExportingContent.IsRaisedEventCancelled(new ExportEventArgs(content, nodeName), this)) @@ -84,13 +84,13 @@ namespace Umbraco.Core.Services var exporter = new EntityXmlSerializer(); var xml = exporter.Serialize(_contentService, _dataTypeService, content, deep); - if(raiseEvents) + if (raiseEvents) ExportedContent.RaiseEvent(new ExportEventArgs(content, xml, false), this); return xml; } - + /// /// Imports and saves package xml as @@ -107,7 +107,7 @@ namespace Umbraco.Core.Services if (ImportingContent.IsRaisedEventCancelled(new ImportEventArgs(element), this)) return Enumerable.Empty(); } - + var name = element.Name.LocalName; if (name.Equals("DocumentSet")) { @@ -120,7 +120,7 @@ namespace Umbraco.Core.Services if (contents.Any()) _contentService.Save(contents, userId); - if(raiseEvents) + if (raiseEvents) ImportedContent.RaiseEvent(new ImportEventArgs(contents, element, false), this); return contents; } @@ -134,7 +134,7 @@ namespace Umbraco.Core.Services if (contents.Any()) _contentService.Save(contents, userId); - if(raiseEvents) + if (raiseEvents) ImportedContent.RaiseEvent(new ImportEventArgs(contents, element, false), this); return contents; } @@ -248,7 +248,7 @@ namespace Umbraco.Core.Services //TODO: We need to refactor this so the packager isn't making direct db calls for an 'edge' case var database = ApplicationContext.Current.DatabaseContext.Database; - var dtos = database.Fetch("WHERE datatypeNodeId = @Id", new {Id = propertyType.DataTypeDefinitionId}); + var dtos = database.Fetch("WHERE datatypeNodeId = @Id", new { Id = propertyType.DataTypeDefinitionId }); var propertyValueList = new List(); foreach (var preValue in propertyValue.Split(',')) @@ -261,7 +261,7 @@ namespace Umbraco.Core.Services } //set property value - content.SetValue(propertyTypeAlias, propertyValue); + content.SetValue(propertyTypeAlias, propertyValue); } } } @@ -491,13 +491,13 @@ namespace Umbraco.Core.Services { contentType.AddPropertyGroup(caption); - int sortOrder; - if(tab.Element("SortOrder") != null && - int.TryParse(tab.Element("SortOrder").Value, out sortOrder)) - { - // Override the sort order with the imported value - contentType.PropertyGroups[caption].SortOrder = sortOrder; - } + } + + int sortOrder; + if (tab.Element("SortOrder") != null && int.TryParse(tab.Element("SortOrder").Value, out sortOrder)) + { + // Override the sort order with the imported value + contentType.PropertyGroups[caption].SortOrder = sortOrder; } } } @@ -549,7 +549,7 @@ namespace Umbraco.Core.Services dataTypeDefinition = dataTypeDefinitions.First(); } } - + // For backwards compatibility, if no datatype with that ID can be found, we're letting this fail silently. // This means that the property will not be created. if (dataTypeDefinition == null) @@ -786,15 +786,15 @@ namespace Umbraco.Core.Services var dataTypeDefinition = dataTypes.First(x => x.Name == dataTypeDefinitionName); var valuesWithoutKeys = prevaluesElement.Elements("PreValue") - .Where(x => ((string) x.Attribute("Alias")).IsNullOrWhiteSpace()) + .Where(x => ((string)x.Attribute("Alias")).IsNullOrWhiteSpace()) .Select(x => x.Attribute("Value").Value); var valuesWithKeys = prevaluesElement.Elements("PreValue") - .Where(x => ((string) x.Attribute("Alias")).IsNullOrWhiteSpace() == false) + .Where(x => ((string)x.Attribute("Alias")).IsNullOrWhiteSpace() == false) .ToDictionary( - key => (string) key.Attribute("Alias"), - val => new PreValue((string) val.Attribute("Value"))); - + key => (string)key.Attribute("Alias"), + val => new PreValue((string)val.Attribute("Value"))); + //save the values with keys _dataTypeService.SavePreValues(dataTypeDefinition, valuesWithKeys); @@ -841,7 +841,7 @@ namespace Umbraco.Core.Services var exporter = new EntityXmlSerializer(); var xml = exporter.Serialize(dictionaryItem); - + if (includeChildren) { var children = _localizationService.GetDictionaryItemChildren(dictionaryItem.Key); @@ -1115,7 +1115,7 @@ namespace Umbraco.Core.Services dontRender = bool.Parse(dontRenderElement.Value); } - var existingMacro = _macroService.GetByAlias(macroAlias) as Macro; + var existingMacro = _macroService.GetByAlias(macroAlias) as Macro; var macro = existingMacro ?? new Macro(macroAlias, macroName, controlType, controlAssembly, xsltPath, scriptPath, cacheByPage, cacheByMember, dontRender, useInEditor, cacheDuration); @@ -1210,7 +1210,7 @@ namespace Umbraco.Core.Services public XElement Export(IMedia media, bool deep = false, bool raiseEvents = true) { var nodeName = UmbracoConfig.For.UmbracoSettings().Content.UseLegacyXmlSchema ? "node" : media.ContentType.Alias.ToSafeAliasWithForcingCheck(); - + if (raiseEvents) { if (ExportingMedia.IsRaisedEventCancelled(new ExportEventArgs(media, nodeName), this)) @@ -1220,7 +1220,7 @@ namespace Umbraco.Core.Services var exporter = new EntityXmlSerializer(); var xml = exporter.Serialize(_mediaService, _dataTypeService, media, deep); - if(raiseEvents) + if (raiseEvents) ExportedMedia.RaiseEvent(new ExportEventArgs(media, xml, false), this); return xml; @@ -1334,7 +1334,7 @@ namespace Umbraco.Core.Services if (templates.Any()) _fileService.SaveTemplate(templates, userId); - if(raiseEvents) + if (raiseEvents) ImportedTemplate.RaiseEvent(new ImportEventArgs(templates, element, false), this); return templates; @@ -1352,10 +1352,10 @@ namespace Umbraco.Core.Services IEnumerable styleSheets = Enumerable.Empty(); - if(element.Elements().Any()) + if (element.Elements().Any()) throw new NotImplementedException("This needs to be implimentet"); - + if (raiseEvents) ImportingStylesheets.RaiseEvent(new ImportEventArgs(styleSheets, element, false), this); @@ -1480,7 +1480,7 @@ namespace Umbraco.Core.Services /// public static event TypedEventHandler> ImportedContent; - + public static event TypedEventHandler> ExportingContent; /// @@ -1607,7 +1607,7 @@ namespace Umbraco.Core.Services /// Occurs before Importing Stylesheets /// public static event TypedEventHandler> ImportingStylesheets; - + /// /// Occurs after Template is Imported and Saved /// @@ -1622,7 +1622,7 @@ namespace Umbraco.Core.Services /// Occurs after Template is Exported to Xml /// public static event TypedEventHandler> ExportedTemplate; - + /// /// Occurs before Importing umbraco package /// From 6db4fedcad952577f6ad55773c09db591df1b58d Mon Sep 17 00:00:00 2001 From: Ismail Mayat Date: Thu, 20 Nov 2014 15:12:34 +0000 Subject: [PATCH 4/6] some reason there is double quote escape which is not needed as peta poco handles any encoding --- .../umbraco/controls/ContentTypeControlNew.ascx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs index 0f1fc3a090..67ee7a19f1 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs @@ -1090,7 +1090,7 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }}); foreach (DataGridItem dgi in dgTabs.Items) { int tabid = int.Parse(dgi.Cells[0].Text); - string tabName = ((TextBox)dgi.FindControl("txtTab")).Text.Replace("'", "''"); + string tabName = ((TextBox) dgi.FindControl("txtTab")).Text; int tabSortOrder; if (Int32.TryParse(((TextBox)dgi.FindControl("txtSortOrder")).Text, out tabSortOrder)) { From 1abdca2432b3b4e028573d244a3a4dde400a77be Mon Sep 17 00:00:00 2001 From: Anthony Dang Date: Thu, 20 Nov 2014 15:22:13 +0000 Subject: [PATCH 5/6] Issue U4-5307 - Added umb-editor css class to allow text box stretching. --- .../views/propertyeditors/multipletextbox/multipletextbox.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multipletextbox/multipletextbox.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multipletextbox/multipletextbox.html index ffa8b3f00d..9eeab2c3b4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multipletextbox/multipletextbox.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/multipletextbox/multipletextbox.html @@ -1,7 +1,7 @@