From 5d95f84bae533cee3474d121817ec54f1defab75 Mon Sep 17 00:00:00 2001 From: "d.buechler" <d.buechler@adito.de> Date: Fri, 25 Sep 2020 13:10:55 +0200 Subject: [PATCH] #1065853 Nutzung der neuen fluent favorites api --- .../jditorecordcontainer/contentProcess.js | 7 +++++-- .../recordcontainers/jditorecordcontainer/onDelete.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js b/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js index e9c4ffa902..44896b2fff 100644 --- a/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js +++ b/entity/Favorite_entity/recordcontainers/jditorecordcontainer/contentProcess.js @@ -14,7 +14,8 @@ if(vars.get("$local.idvalues") && vars.get("$local.idvalues").length != 0) var selectedFavos = []; for(h = 0; h < selected.length; h++) - selectedFavos.push(buildFavoriteForDeletion(favorite.getFavoriteById(selected[h]))); + selectedFavos.push(buildFavoriteForDeletion(favorite.getFavorites(favorite.createGetFavoriteByIdConfig() + .setId(selected[h])))); result.object(selectedFavos); } @@ -33,7 +34,9 @@ else var allContexts = getAllFavoriteEnabledContexts(); for(i = 0; i < allContexts.length; i++) { - var allFavorites = favorite.getAllFavorites(tools.getCurrentUser()["name"], allContexts[i]); + var allFavorites = favorite.getFavorites(favorite.createGetFavoritesConfig() + .setUserId(tools.getCurrentUser()["name"]) + .setObjectType(allContexts[i])); var builtFavos = buildFavorites(allFavorites, allContexts[i]); for(let x = 0; x < builtFavos.length; x++) diff --git a/entity/Favorite_entity/recordcontainers/jditorecordcontainer/onDelete.js b/entity/Favorite_entity/recordcontainers/jditorecordcontainer/onDelete.js index fc4c8d8f0b..5c5ab2b521 100644 --- a/entity/Favorite_entity/recordcontainers/jditorecordcontainer/onDelete.js +++ b/entity/Favorite_entity/recordcontainers/jditorecordcontainer/onDelete.js @@ -1,4 +1,4 @@ import("system.vars"); import("system.favorite"); -favorite.removeFavoriteById(vars.get("$local.uid")); \ No newline at end of file +favorite.remove(favorite.createRemoveByIdConfig().setFavoriteRecordId(vars.get("$local.uid"))); \ No newline at end of file -- GitLab