diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js
index f4cfacbf70..25e55455db 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js
@@ -75,7 +75,21 @@
// inheritance is (i.e.infinite editing)
var found = angularHelper.traverseScopeChain($scope, s => s && s.vm && s.vm.constructor.name === "UmbPropertyController");
vm.parentUmbProperty = found ? found.vm : null;
+ }
+
+ if (vm.property.description) {
+ // split by lines containing only '--'
+ var descriptionParts = vm.property.description.split(/^--$/gim);
+ if (descriptionParts.length > 1) {
+ // if more than one part, we have an extended description,
+ // combine to one extended description, and remove leading linebreak
+ vm.property.extendedDescription = descriptionParts.splice(1).join("--").substring(1);
+ vm.property.extendedDescriptionVisible = false;
+
+ // set propertydescription to first part, and remove trailing linebreak
+ vm.property.description = descriptionParts[0].slice(0, -1);
}
+ }
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js b/src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js
new file mode 100644
index 0000000000..58d5b0ed91
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js
@@ -0,0 +1,20 @@
+/**
+* @ngdoc filter
+* @name umbraco.filters.simpleMarkdown
+* @description
+* Used when rendering a string as Markdown as HTML (i.e. with ng-bind-html). Allows use of **bold**, *italics*,  and [links](url)
+**/
+angular.module("umbraco.filters").filter('simpleMarkdown', function () {
+ return function (text) {
+ if (!text) {
+ return '';
+ }
+
+ return text
+ .replace(/\*\*(.*)\*\*/gim, '$1')
+ .replace(/\*(.*)\*/gim, '$1')
+ .replace(/!\[(.*?)\]\((.*?)\)/gim, "")
+ .replace(/\[(.*?)\]\((.*?)\)/gim, "$1")
+ .replace(/\n/g, '
').trim();
+ };
+});
diff --git a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
index 22baed8472..168abfaa6a 100644
--- a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
+++ b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
@@ -30,9 +30,8 @@
for (var p = 0; p < tab.properties.length; p++) {
var prop = tab.properties[p];
- if (dataModel[prop.alias]) {
- prop.value = dataModel[prop.alias];
- }
+
+ prop.value = dataModel[prop.alias];
}
}
@@ -53,9 +52,8 @@
for (var p = 0; p < tab.properties.length; p++) {
var prop = tab.properties[p];
- if (prop.value) {
- dataModel[prop.alias] = prop.value;
- }
+
+ dataModel[prop.alias] = prop.value;
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less
index ead54ac49f..43f3c5e353 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-package-local-install.less
@@ -9,44 +9,51 @@
color: @gray-5;
}
-.umb-upload-local__dropzone {
- position: relative;
- width: 500px;
- height: 300px;
- border: 2px dashed @ui-action-border;
- border-radius: 3px;
- background: @white;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-bottom: 30px;
- transition: 100ms box-shadow ease, 100ms border ease;
+.umb-upload-local {
- &.drag-over {
- border-color: @ui-action-border-hover;
- border-style: solid;
- box-shadow: 0 3px 8px rgba(0,0,0, .1);
+ &__dropzone {
+ position: relative;
+ width: 500px;
+ height: 300px;
+ border: 2px dashed @ui-action-border;
+ border-radius: 3px;
+ background: @white;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ margin-bottom: 30px;
transition: 100ms box-shadow ease, 100ms border ease;
+
+ &.drag-over {
+ border-color: @ui-action-border-hover;
+ border-style: solid;
+ box-shadow: 0 3px 8px rgba(0,0,0, .1);
+ transition: 100ms box-shadow ease, 100ms border ease;
+ }
+
+ .umb-icon {
+ display: block;
+ color: @ui-action-type;
+ font-size: 6.75rem;
+ line-height: 1;
+ margin: 0 auto;
+ }
+
+ .umb-info-local-item {
+ margin: 20px;
+ }
}
- .umb-icon {
- display: block;
+ &__select-file {
+ font-weight: bold;
color: @ui-action-type;
- font-size: 6.75rem;
- line-height: 1;
- margin: 0 auto;
- }
-}
+ cursor: pointer;
-.umb-upload-local__select-file {
- font-weight: bold;
- color: @ui-action-type;
- cursor: pointer;
-
- &:hover {
- text-decoration: underline;
- color: @ui-action-type-hover;
+ &:hover {
+ text-decoration: underline;
+ color: @ui-action-type-hover;
+ }
}
}
@@ -117,7 +124,3 @@
.umb-info-local-item {
margin-bottom: 20px;
}
-
-.umb-upload-local__dropzone .umb-info-local-item {
- margin:20px;
-}
diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less
index 66afbfd73f..43911fccb1 100644
--- a/src/Umbraco.Web.UI.Client/src/less/main.less
+++ b/src/Umbraco.Web.UI.Client/src/less/main.less
@@ -237,7 +237,6 @@ umb-property:last-of-type .umb-control-group {
}
.control-description {
- max-width:480px;// avoiding description becoming too wide when its placed on top of property.
margin-bottom: 5px;
}
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html
index 650fd143c1..a037feaca2 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html
@@ -24,7 +24,20 @@