diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.controller.js index c37c382dac..93d72d2a1b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.controller.js @@ -38,7 +38,6 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.MultiValuesControl $scope.add = function (evt) { evt.preventDefault(); - if ($scope.newItem) { if (!_.contains($scope.model.value, $scope.newItem)) { $scope.model.value.push({ value: $scope.newItem }); @@ -79,7 +78,7 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.MultiValuesControl if (event.keyCode == 13) { $scope.add(event); } - } + }; function getElementIndexByPrevalueText(value) { for (var i = 0; i < $scope.model.value.length; i++) { diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.html index 70681b4d84..43520b00da 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.html @@ -1,7 +1,7 @@
- +
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js index 79ed11aef8..398d01a64c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.controller.js @@ -33,17 +33,16 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.CropSizesControlle $scope.change = function () { // Listen to the change event and set focus 2 false - if($scope.setFocus){ + if ($scope.setFocus) { $scope.setFocus = false; return; } - } + }; $scope.add = function (evt) { evt.preventDefault(); $scope.editMode = false; - $scope.setFocus = true; if ($scope.newItem && $scope.newItem.alias && @@ -70,7 +69,17 @@ angular.module("umbraco").controller("Umbraco.PrevalueEditors.CropSizesControlle $scope.hasError = true; }; - $scope.sortableOptions = { - axis: 'y' - } + $scope.createNew = function (event) { + if (event.keyCode == 13) { + $scope.add(event); + } + }; + + $scope.sortableOptions = { + axis: 'y', + containment: 'parent', + cursor: 'move', + tolerance: 'pointer' + }; + }); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html index 742f5bafa4..9589909639 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.prevalues.html @@ -4,55 +4,55 @@
- +
- +
- +
- - + +
@@ -60,7 +60,7 @@
- +

{{item.alias}} ({{item.width}}px × {{item.height}}px)