diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbchildselector.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbchildselector.directive.js
index a33fd4be53..96ce8735eb 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbchildselector.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbchildselector.directive.js
@@ -99,13 +99,18 @@ Use this directive to render a ui component for selecting child items to a paren
@param {string} parentName (binding): The parent name.
@param {string} parentIcon (binding): The parent icon.
@param {number} parentId (binding): The parent id.
-@param {callback} onRemove (binding): Callback when the remove button is clicked on an item.
+@param {callback} onRemove (binding): Callback when removing an item.
The callback returns:
child: The selected item.
$index: The selected item index.
-@param {callback} onAdd (binding): Callback when the add button is clicked.
+@param {callback} onAdd (binding): Callback when adding an item.
+
The callback returns:
+
+
$event: The select event.
+
+@param {callback} onSort (binding): Callback when sorting an item.
The callback returns:
$event: The select event.
@@ -174,16 +179,15 @@ Use this directive to render a ui component for selecting child items to a paren
eventBindings.push(scope.$watch('parentName', function(newValue, oldValue){
if (newValue === oldValue) { return; }
- if ( oldValue === undefined || newValue === undefined) { return; }
+ if (oldValue === undefined || newValue === undefined) { return; }
syncParentName();
-
}));
eventBindings.push(scope.$watch('parentIcon', function(newValue, oldValue){
if (newValue === oldValue) { return; }
- if ( oldValue === undefined || newValue === undefined) { return; }
+ if (oldValue === undefined || newValue === undefined) { return; }
syncParentIcon();
}));
@@ -191,6 +195,7 @@ Use this directive to render a ui component for selecting child items to a paren
// sortable options for allowed child content types
scope.sortableOptions = {
axis: "y",
+ cancel: ".unsortable",
containment: "parent",
distance: 10,
opacity: 0.7,
@@ -199,7 +204,7 @@ Use this directive to render a ui component for selecting child items to a paren
zIndex: 6000,
update: function (e, ui) {
if(scope.onSort) {
- scope.onSort();
+ scope.onSort();
}
}
};
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less
index da690663d0..937f746c56 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-child-selector.less
@@ -16,23 +16,24 @@
.umb-child-selector__child.-placeholder {
border: 1px dashed @gray-8;
background: none;
- cursor: pointer;
text-align: center;
justify-content: center;
-
- color:@ui-action-type;
+ width: 100%;
+ color: @ui-action-type;
+
&:hover {
- color:@ui-action-type-hover;
- border-color:@ui-action-type-hover;
- text-decoration:none;
+ color: @ui-action-type-hover;
+ border-color: @ui-action-type-hover;
+ text-decoration: none;
}
}
.umb-child-selector__children-container {
- margin-left: 30px;
- .umb-child-selector__child {
- cursor: move;
- }
+ margin-left: 30px;
+
+ .umb-child-selector__child.ui-sortable-handle {
+ cursor: move;
+ }
}
.umb-child-selector__child-description {
@@ -65,5 +66,6 @@
}
.umb-child-selector__child-remove {
- cursor: pointer;
+ background: none;
+ border: none;
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-child-selector.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-child-selector.html
index 0866e1bdf7..1d88c0eb96 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/umb-child-selector.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-child-selector.html
@@ -19,18 +19,20 @@