From 9a6123579f8b416120150f0e8da71f951b5c309c Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Fri, 29 Dec 2017 22:47:29 +0100 Subject: [PATCH 1/3] Fix collapsed columns in row when sorting --- .../includeproperties.prevalues.controller.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js index bde9cac30d..879a53917a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js @@ -77,14 +77,14 @@ function includePropsPreValsController($rootScope, $scope, localizationService, // Return a helper with preserved width of cells var fixHelper = function (e, ui) { - var h = ui.clone(); - - h.children().each(function () { - $(this).width($(this).width()); + ui.children().each(function () { + $(this).width($(this).width()); }); - h.css("background-color", "lightgray"); - return h; + var row = ui.clone(); + row.css("background-color", "lightgray"); + + return row; }; $scope.sortableOptions = { From e849d2d0d0a4f093e35d7b31bdaa7088eb7bd19e Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Fri, 29 Dec 2017 22:48:14 +0100 Subject: [PATCH 2/3] Add required ng-model to ui-sortable --- .../propertyeditors/listview/includeproperties.prevalues.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.html index 5cf7de7de6..2e210e635f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.html @@ -20,7 +20,7 @@ - + From fef9e3fde077dd636909f7562f3078f5ed1307d5 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Fri, 29 Dec 2017 22:49:06 +0100 Subject: [PATCH 3/3] Ensure placeholder is same height as original rows --- .../listview/includeproperties.prevalues.controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js index 879a53917a..0cd199ae4d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/includeproperties.prevalues.controller.js @@ -96,6 +96,10 @@ function includePropsPreValsController($rootScope, $scope, localizationService, cursor: 'move', items: '> tr', tolerance: 'pointer', + forcePlaceholderSize: true, + start: function(e, ui){ + ui.placeholder.height(ui.item.height()); + }, update: function (e, ui) { // Get the new and old index for the moved element (using the text as the identifier)