Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 67ebb53

Browse files
committed
:neckbeard: The Whitespace Crusader Strikes Again!
1 parent d2a3fc7 commit 67ebb53

19 files changed

+53
-41
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ Have a question?
9292

9393
## License
9494

95-
Copyright © 2015 Umbrella Inc, Our Umbraco and [other contributors](https://github.com/leekelleher/umbraco-doc-type-grid-editor/graphs/contributors)
95+
Copyright © 2014 Umbrella Inc, Our Umbraco and [other contributors](https://github.com/leekelleher/umbraco-doc-type-grid-editor/graphs/contributors)
9696

9797
Licensed under the [MIT License](LICENSE.md)

src/Our.Umbraco.DocTypeGridEditor/Bootstrap.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
using Our.Umbraco.DocTypeGridEditor.Web.Attributes;
33
using Our.Umbraco.DocTypeGridEditor.Web.Mvc;
44
using Umbraco.Core;
5+
using Umbraco.Core.Events;
6+
using Umbraco.Core.Models;
57
using Umbraco.Core.Services;
68

79
namespace Our.Umbraco.DocTypeGridEditor
@@ -20,7 +22,7 @@ protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplica
2022
DataTypeService.Saved += ExpireCache;
2123
}
2224

23-
private void ExpireCache(IDataTypeService sender, global::Umbraco.Core.Events.SaveEventArgs<global::Umbraco.Core.Models.IDataTypeDefinition> e)
25+
private void ExpireCache(IDataTypeService sender, SaveEventArgs<IDataTypeDefinition> e)
2426
{
2527
foreach (var dataType in e.SavedEntities)
2628
{
@@ -29,4 +31,4 @@ private void ExpireCache(IDataTypeService sender, global::Umbraco.Core.Events.Sa
2931
}
3032
}
3133
}
32-
}
34+
}

src/Our.Umbraco.DocTypeGridEditor/Extensions/ContentTypeServiceExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ public static string GetAliasByGuid(this IContentTypeService contentTypeService,
1414
.ExecuteScalar<string>("SELECT [cmsContentType].[alias] FROM [cmsContentType] INNER JOIN [umbracoNode] ON [cmsContentType].[nodeId] = [umbracoNode].[id] WHERE [umbracoNode].[uniqueID] = @0", id));
1515
}
1616
}
17-
}
17+
}

src/Our.Umbraco.DocTypeGridEditor/Extensions/ViewEnginesCollectionExtensions.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ namespace Our.Umbraco.DocTypeGridEditor.Extensions
55
{
66
internal static class ViewEnginesCollectionExtensions
77
{
8-
public static bool ViewExists(this ViewEngineCollection viewEngines,
8+
public static bool ViewExists(
9+
this ViewEngineCollection viewEngines,
910
ControllerContext controllerContext,
1011
string viewName, bool isPartial = false)
1112
{
1213
var result = !isPartial
1314
? viewEngines.FindView(controllerContext, viewName, null)
1415
: viewEngines.FindPartialView(controllerContext, viewName);
16+
1517
if (result.View != null)
1618
return true;
1719

1820
LogHelper.Warn<Bootstrap>("No view file found with the name " + viewName);
21+
1922
return false;
2023
}
2124
}
22-
}
25+
}

src/Our.Umbraco.DocTypeGridEditor/Helpers/DocTypeGridEditorHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private static IPublishedContent ConvertValue(string id, string contentTypeAlias
9393
}
9494
catch(Exception ex)
9595
{
96-
LogHelper.Error<DocTypeGridEditorHelper>("Error creating Property object.", ex);
96+
LogHelper.Error<DocTypeGridEditorHelper>("[DocTypeGridEditor] Error creating Property object.", ex);
9797
}
9898

9999
if (prop2 != null)

src/Our.Umbraco.DocTypeGridEditor/Helpers/XmlHelper.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,5 @@ public static T GetAttributeValueFromNode<T>(XmlNode node, string attributeName,
2727
}
2828
return defaultValue;
2929
}
30-
31-
3230
}
33-
}
31+
}

src/Our.Umbraco.DocTypeGridEditor/Models/DetachedPublishedContent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ public override int Level
152152
get { return 0; }
153153
}
154154
}
155-
}
155+
}

src/Our.Umbraco.DocTypeGridEditor/Models/DetachedPublishedProperty.cs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,32 @@ public DetachedPublishedProperty(PublishedPropertyType propertyType, object valu
2929
_xpathValue = new Lazy<object>(() => _propertyType.ConvertSourceToXPath(_sourceValue.Value, _isPreview));
3030
}
3131

32-
public string PropertyTypeAlias {
32+
public string PropertyTypeAlias
33+
{
3334
get
3435
{
3536
return _propertyType.PropertyTypeAlias;
3637
}
3738
}
3839

39-
public bool HasValue
40+
public bool HasValue
4041
{
4142
get { return DataValue != null && DataValue.ToString().Trim().Length > 0; }
4243
}
4344

44-
public object DataValue { get { return _rawValue; } }
45-
public object Value { get { return _objectValue.Value; } }
46-
public object XPathValue { get { return _xpathValue.Value; } }
45+
public object DataValue
46+
{
47+
get { return _rawValue; }
48+
}
49+
50+
public object Value
51+
{
52+
get { return _objectValue.Value; }
53+
}
54+
55+
public object XPathValue
56+
{
57+
get { return _xpathValue.Value; }
58+
}
4759
}
48-
}
60+
}

src/Our.Umbraco.DocTypeGridEditor/PackageActions/AddObjectToJsonArray.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
using Newtonsoft.Json;
88
using Newtonsoft.Json.Linq;
99
using umbraco.cms.businesslogic.packager.standardPackageActions;
10+
using umbraco.interfaces;
1011
using Umbraco.Core;
1112
using Umbraco.Core.Logging;
12-
using umbraco.interfaces;
1313
using Formatting = Newtonsoft.Json.Formatting;
1414
using XmlHelper = Our.Umbraco.DocTypeGridEditor.Helpers.XmlHelper;
1515

@@ -53,7 +53,7 @@ public bool Execute(string packageName, XmlNode xmlData)
5353

5454
if (string.IsNullOrWhiteSpace(srcJson))
5555
return false;
56-
56+
5757
var srcObj = JsonConvert.DeserializeObject(srcJson) as JObject;
5858
var trgArr = JsonConvert.DeserializeObject(trgJson) as JArray ?? new JArray();
5959

@@ -130,4 +130,4 @@ public XmlNode SampleXml()
130130
return helper.parseStringToXmlNode(sample);
131131
}
132132
}
133-
}
133+
}

src/Our.Umbraco.DocTypeGridEditor/Web/Attributes/DocTypeGridEditorPreviewAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ public override void OnResultExecuting(ResultExecutingContext filterContext)
2121
base.OnResultExecuting(filterContext);
2222
}
2323
}
24-
}
24+
}

0 commit comments

Comments
 (0)