Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #32 from umco/develop
Browse files Browse the repository at this point in the history
Preparing v1.1.2 release
  • Loading branch information
leekelleher authored Jul 10, 2018
2 parents a421109 + d91ccff commit 08b473e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image: Visual Studio 2017

# version format
version: 1.1.1.{build}
version: 1.1.2.{build}

# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
Expand Down
3 changes: 2 additions & 1 deletion src/Our.Umbraco.InnerContent/Helpers/InnerContentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public static IEnumerable<IPublishedContent> ConvertInnerContentToPublishedConte
return items.Select((x, i) => ConvertInnerContentToPublishedContent((JObject)x, parentNode, i, level, preview)).ToList();
}

public static IPublishedContent ConvertInnerContentToPublishedContent(JObject item,
public static IPublishedContent ConvertInnerContentToPublishedContent(
JObject item,
IPublishedContent parentNode = null,
int sortOrder = 0,
int level = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public override void ConfigureForDisplay(PreValueCollection preValues)
{
base.ConfigureForDisplay(preValues);

if (preValues.PreValuesAsDictionary.ContainsKey("hideLabel"))
var asDictionary = preValues.PreValuesAsDictionary;
if (asDictionary.ContainsKey("hideLabel"))
{
var boolAttempt = preValues.PreValuesAsDictionary["hideLabel"].Value.TryConvertTo<bool>();
var boolAttempt = asDictionary["hideLabel"].Value.TryConvertTo<bool>();
if (boolAttempt.Success)
{
HideLabel = boolAttempt.Result;
Expand Down Expand Up @@ -80,7 +81,7 @@ protected void ConvertInnerContentDbToString(JObject item, IDataTypeService data
catch (InvalidOperationException)
{
// https://github.com/umco/umbraco-nested-content/issues/111
// Catch any invalid cast operations as likely means courier failed due to missing
// Catch any invalid cast operations as likely means Courier failed due to missing
// or trashed item so couldn't convert a guid back to an int

item[propKey] = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ angular.module("umbraco").controller("Our.Umbraco.InnerContent.Controllers.DocTy
}

$scope.sortableOptions = {
axis: 'y',
axis: "y",
cursor: "move",
handle: ".icon-navigation"
};
Expand Down Expand Up @@ -65,7 +65,7 @@ angular.module("umbraco").controller("Our.Umbraco.InnerContent.Controllers.DocTy
}

$scope.sortableOptions = {
axis: 'y',
axis: "y",
cursor: "move",
handle: ".icon-navigation"
};
Expand Down Expand Up @@ -99,7 +99,7 @@ angular.module("umbraco").controller("Our.Umbraco.InnerContent.Controllers.Inner
]);

// Directives
angular.module('umbraco.directives').directive('innerContentOverlay', [
angular.module("umbraco.directives").directive("innerContentOverlay", [

"$q",
"innerContentService",
Expand Down Expand Up @@ -146,6 +146,7 @@ angular.module('umbraco.directives').directive('innerContentOverlay', [
filter: false,
title: "Insert Content",
show: false,
closeButtonLabelKey: "general_cancel",
submit: function (model) {
var ct = getContentType(model.selectedItem.guid);
createEditorModel(ct).then(function (em) {
Expand All @@ -162,6 +163,8 @@ angular.module('umbraco.directives').directive('innerContentOverlay', [
scope.contentEditorOverlay = {
view: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + "/innercontent/views/innercontent.dialog.html",
show: false,
submitButtonLabelKey: "bulk_done",
closeButtonLabelKey: "general_cancel",
submit: function (model) {
if (scope.config.callback) {
// Convert model to basic model
Expand Down Expand Up @@ -202,7 +205,7 @@ angular.module('umbraco.directives').directive('innerContentOverlay', [
};

scope.openContentEditorOverlay = function () {
scope.contentEditorOverlay.title = "Edit item";
scope.contentEditorOverlay.title = "Edit " + scope.currentItem.contentTypeName;
scope.contentEditorOverlay.dialogData = { item: scope.currentItem };
scope.contentEditorOverlay.show = true;
};
Expand Down Expand Up @@ -264,9 +267,9 @@ angular.module('umbraco.directives').directive('innerContentOverlay', [
}

var directive = {
restrict: 'E',
restrict: "E",
replace: true,
templateUrl: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/innercontent/views/innercontent.overlay.html',
templateUrl: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + "/innercontent/views/innercontent.overlay.html",
scope: {
config: "="
},
Expand All @@ -278,7 +281,7 @@ angular.module('umbraco.directives').directive('innerContentOverlay', [
}
]);

angular.module('umbraco.directives').directive('innerContentUnsavedChanges', [
angular.module("umbraco.directives").directive("innerContentUnsavedChanges", [

"$rootScope",

Expand Down Expand Up @@ -326,9 +329,9 @@ angular.module('umbraco.directives').directive('innerContentUnsavedChanges', [
}

var directive = {
restrict: 'E',
restrict: "E",
replace: true,
templateUrl: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + '/innercontent/views/innercontent.unsavedchanges.html',
templateUrl: Umbraco.Sys.ServerVariables.umbracoSettings.appPluginsPath + "/innercontent/views/innercontent.unsavedchanges.html",
link: link
};

Expand All @@ -338,7 +341,7 @@ angular.module('umbraco.directives').directive('innerContentUnsavedChanges', [
]);

// Services
angular.module("umbraco").factory('innerContentService', [
angular.module("umbraco").factory("innerContentService", [

"$q",
"$interpolate",
Expand Down Expand Up @@ -491,8 +494,8 @@ angular.module("umbraco").factory('innerContentService', [

var lexicographical = options && options.lexicographical,
zeroExtend = options && options.zeroExtend,
v1parts = v1.split('.'),
v2parts = v2.split('.');
v1parts = v1.split("."),
v2parts = v2.split(".");

function isValidPart(x) {
return (lexicographical ? /^\d+[A-Za-z]*$/ : /^\d+$/).test(x);
Expand Down Expand Up @@ -539,15 +542,15 @@ angular.module("umbraco").factory('innerContentService', [
}

// Helpful methods
var lut = []; for (var i = 0; i < 256; i++) { lut[i] = (i < 16 ? '0' : '') + (i).toString(16); }
var lut = []; for (var i = 0; i < 256; i++) { lut[i] = (i < 16 ? "0" : "") + (i).toString(16); }
self.generateUid = function () {
var d0 = Math.random() * 0xffffffff | 0;
var d1 = Math.random() * 0xffffffff | 0;
var d2 = Math.random() * 0xffffffff | 0;
var d3 = Math.random() * 0xffffffff | 0;
return lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] + lut[d0 >> 24 & 0xff] + '-' +
lut[d1 & 0xff] + lut[d1 >> 8 & 0xff] + '-' + lut[d1 >> 16 & 0x0f | 0x40] + lut[d1 >> 24 & 0xff] + '-' +
lut[d2 & 0x3f | 0x80] + lut[d2 >> 8 & 0xff] + '-' + lut[d2 >> 16 & 0xff] + lut[d2 >> 24 & 0xff] +
return lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] + lut[d0 >> 24 & 0xff] + "-" +
lut[d1 & 0xff] + lut[d1 >> 8 & 0xff] + "-" + lut[d1 >> 16 & 0x0f | 0x40] + lut[d1 >> 24 & 0xff] + "-" +
lut[d2 & 0x3f | 0x80] + lut[d2 >> 8 & 0xff] + "-" + lut[d2 >> 16 & 0xff] + lut[d2 >> 24 & 0xff] +
lut[d3 & 0xff] + lut[d3 >> 8 & 0xff] + lut[d3 >> 16 & 0xff] + lut[d3 >> 24 & 0xff];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('umbraco.resources').factory('Our.Umbraco.InnerContent.Resources.InnerContentResources',
angular.module("umbraco.resources").factory("Our.Umbraco.InnerContent.Resources.InnerContentResources",
function ($q, $http, umbRequestHelper) {
return {
getAllContentTypes: function () {
Expand All @@ -7,7 +7,7 @@
url: "/umbraco/backoffice/InnerContent/InnerContentApi/GetAllContentTypes",
method: "GET"
}),
'Failed to retrieve content types'
"Failed to retrieve content types"
);
},
getContentTypesByGuid: function (guids) {
Expand All @@ -17,7 +17,7 @@
method: "GET",
params: { guids: guids }
}),
'Failed to retrieve content types'
"Failed to retrieve content types"
);
},
getContentTypesByAlias: function (aliases) {
Expand All @@ -27,7 +27,7 @@
method: "GET",
params: { aliases: aliases }
}),
'Failed to retrieve content types'
"Failed to retrieve content types"
);
},
getContentTypeIconsByGuid: function (guids) {
Expand All @@ -37,7 +37,7 @@
method: "GET",
params: { guids: guids }
}),
'Failed to retrieve content type icons'
"Failed to retrieve content type icons"
);
},
getContentTypeScaffoldByGuid: function (guid) {
Expand All @@ -47,7 +47,7 @@
method: "GET",
params: { guid: guid }
}),
'Failed to retrieve content type scaffold'
"Failed to retrieve content type scaffold by Guid"
);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<umb-tabs-content class="form-horizontal" view="true">
<umb-tab id="tab{{tab.id}}" ng-repeat="tab in item.tabs" rel="{{tab.id}}">

<umb-property ng-repeat="property in tab.properties" property="property">
<umb-property ng-repeat="property in tab.properties" property="property" data-element="property-{{property.alias}}">
<umb-property-editor model="property"></umb-property-editor>
</umb-property>

Expand Down

0 comments on commit 08b473e

Please sign in to comment.