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*, ![images](url) 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, "$1") + .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 @@ - + + +
+ +
+ +
+ + + +
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.protect.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.protect.controller.js index fcd0294849..92efb24e63 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.protect.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.protect.controller.js @@ -92,7 +92,7 @@ function save() { vm.buttonState = "busy"; - var groups = _.map(vm.groups, function (group) { return group.name; }); + var groups = _.map(vm.groups, function (group) { return encodeURIComponent(group.name); }); var usernames = _.map(vm.members, function (member) { return member.username; }); contentResource.updatePublicAccess(id, groups, usernames, vm.loginPage.id, vm.errorPage.id).then( function () { diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js index 0d9341243b..5996ae105c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.controller.js @@ -19,7 +19,7 @@ serverErrorMessage: null }; - $scope.handleFiles = function (files, event) { + $scope.handleFiles = function (files, event, invalidFiles) { if (files) { for (var i = 0; i < files.length; i++) { upload(files[i]); diff --git a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html index 3ad15e15b9..4d44af7d6e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html +++ b/src/Umbraco.Web.UI.Client/src/views/packages/views/install-local.html @@ -10,14 +10,15 @@
+ ngf-max-size="{{maxFileSize}}" + ngf-pattern="'.zip'" + accept=".zip" + ng-class="{ 'is-small': compact !== 'false' || (done.length + queue.length) > 0 }">
@@ -31,10 +32,11 @@
+ ngf-max-size="{{maxFileSize}}" + ngf-pattern="'.zip'" + accept=".zip"> - or click here to choose files