From 035d1da34fd899b5a9caf795558a1e608804c93d Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Tue, 19 Apr 2022 09:47:20 +0200 Subject: [PATCH] multiple selection --- .../resources/html/parts/org_results_page.html | 3 ++- .../resources/html/parts/select_org.modal.html | 15 ++++++++++----- .../static/resources/js/organizations.js | 10 +++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/org_results_page.html b/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/org_results_page.html index 01bfe0a5..1d34c035 100644 --- a/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/org_results_page.html +++ b/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/org_results_page.html @@ -49,7 +49,8 @@ - {{o.name}} + {{o.name}} + {{o.name}} (SELECTED) {{o.name}} {{o.status}} diff --git a/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/select_org.modal.html b/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/select_org.modal.html index 243eede8..57b78402 100644 --- a/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/select_org.modal.html +++ b/apps/dnet-orgs-database-application/src/main/resources/static/resources/html/parts/select_org.modal.html @@ -6,12 +6,14 @@ diff --git a/apps/dnet-orgs-database-application/src/main/resources/static/resources/js/organizations.js b/apps/dnet-orgs-database-application/src/main/resources/static/resources/js/organizations.js index cb1a8df0..8c2cfbe9 100644 --- a/apps/dnet-orgs-database-application/src/main/resources/static/resources/js/organizations.js +++ b/apps/dnet-orgs-database-application/src/main/resources/static/resources/js/organizations.js @@ -63,12 +63,6 @@ orgsModule.directive('selectOrgModal', function($http, $timeout) { } scope.selectOrg = function() { - $timeout(function() { - scope.searchText = ''; - scope.searchValue = ''; - scope.searchOrgs = {}; - }, 1000); - if (scope.onSelect) { scope.onSelect(); } @@ -219,6 +213,8 @@ orgsModule.directive('orgResultsPage', function($http, $location, $route) { templateUrl: 'resources/html/parts/org_results_page.html', link: function(scope, element, attrs, ctrl) { scope.selectOrg = function(o) { + o.selected = true; + scope.selectedOrg.id = o.id; scope.selectedOrg.name = o.name; scope.selectedOrg.type = o.type; @@ -555,7 +551,7 @@ orgsModule.controller('showEditCtrl', function ($scope, $http, $routeParams, $ro $scope.saveDuplicates = function() { call_http_post($http, 'api/organizations/duplicates', $scope.duplicates, function(res) { $scope.getInfo(); - alert('Events updated !!!'); + alert('Duplicates updated !!!'); $scope.duplicates = res.data; }); }