From 9a6a7ffa8864161c34915140adbd6de4b83999ac Mon Sep 17 00:00:00 2001 From: Paul Seal Date: Sun, 17 Oct 2021 00:40:47 +0100 Subject: [PATCH] Added more detailed message when deleting items in the list view (#11375) * Added more detailed message when deleting items in the list view * Update FR language file (cherry picked from commit 14fe7d99a82c32f6510b9684279a84a4c2bbc040) # Conflicts: # src/Umbraco.Web.UI/Umbraco/config/lang/en.xml # src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml --- .../views/propertyeditors/listview/listview.controller.js | 6 ++++-- .../src/views/propertyeditors/listview/listview.html | 2 +- .../src/views/propertyeditors/listview/overlays/delete.html | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/en.xml | 2 +- src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml | 1 + src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml | 1 + 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index 76e6759a475e..c66ff1a46171 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -380,7 +380,7 @@ function listViewController($scope, $interpolate, $routeParams, $injector, $time }); } - $scope.delete = function () { + $scope.delete = function (numberOfItems, totalItems) { const dialog = { view: "views/propertyeditors/listview/overlays/delete.html", @@ -394,7 +394,9 @@ function listViewController($scope, $interpolate, $routeParams, $injector, $time }, close: function () { overlayService.close(); - } + }, + numberOfItems: numberOfItems, + totalItems: totalItems }; localizationService.localize("general_delete").then(value => { diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index 92ad56b045a7..7fad01fe6c2c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -190,7 +190,7 @@ button-style="white" label-key="actions_delete" icon="icon-trash" - action="delete()" + action="delete(selection.length, listViewResultSet.items.length)" disabled="actionInProgress" size="xs" add-ellipsis="true"> diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html index 1c99aa594e42..74b3cce7e52a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/overlays/delete.html @@ -1,7 +1,7 @@

- ? + ?

diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index a87910a40d5b..bf497885a20c 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -437,7 +437,7 @@ Manage hostnames Close this window Are you sure you want to delete - Are you sure you want to delete %0% based on %1% + %0% of %1% items]]> Are you sure you want to disable Are you sure you want to remove %0%]]> diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 9fe4dc528cda..36f0ee34855a 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -443,6 +443,7 @@ Name Close this window Are you sure you want to delete + %0% of %1% items]]> Are you sure you want to disable Are you sure you want to remove %0%]]> diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml index 9ac12607ed13..7be6abc04cfe 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml @@ -403,6 +403,7 @@ Nom Fermer cette fenêtre Êtes-vous certain(e) de vouloir supprimer + %0% des %1% éléments]]> Êtes-vous certain(e) de vouloir désactiver Êtes-vous certain(e)? Êtes-vous certain(e)?