From 53ca5eec88694f5c062357717b428e429a91f11b Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 11 Feb 2020 20:36:42 +0100 Subject: [PATCH] Adjust child selector sorting (#7582) * Only add move cursor to sortable child elements * Don't sort add button * Add missing docs for onSort * Change add button to use button element * Use button element for remove button and add aria-hidden to icons * Reset styling of button element * Ensure add button is full width * Remove unnecessary cursor styles since these now inherit from button element --- .../components/umbchildselector.directive.js | 17 ++++++++----- .../less/components/umb-child-selector.less | 24 ++++++++++--------- .../views/components/umb-child-selector.html | 12 ++++++---- 3 files changed, 31 insertions(+), 22 deletions(-) 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:

-@param {callback} onAdd (binding): Callback when the add button is clicked. +@param {callback} onAdd (binding): Callback when adding an item. +

The callback returns:

+ +@param {callback} onSort (binding): Callback when sorting an item.

The callback returns: