From 7b82955b50cd380cd6f79fe4506c84318733a5aa Mon Sep 17 00:00:00 2001 From: Hima Elisetty Date: Wed, 18 Apr 2018 16:45:41 -0400 Subject: Changes in Users page Issue-ID: PORTAL-256 Fix on Users page modal Change-Id: I44427259c0a6caa9623a884e5127e16de86cff8d Signed-off-by: Hima Elisetty --- .../multiple-select/multiple-select.directive.js | 18 ++++++++++++++++++ .../multiple-select/multiple-select.tpl.html | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'ecomp-portal-FE-common/client/app/directives/multiple-select') diff --git a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js index c9e5d17e..8ce8ec28 100644 --- a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js +++ b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js @@ -126,6 +126,24 @@ angular.module('ecompApp') } return disp; }; + + scope.getIdTitle = function(){ + var disp = ''; + if(!scope.ngModel || !scope.ngModel.length) { + return disp; + } + scope.ngModel.forEach(function(item){ + if(item[scope.valueAttr]){ + disp+=item[scope.nameAttr] + ','; + } + }); + if(disp!==''){ + disp = disp.slice(0,disp.length-1); + }else{ + disp = scope.placeholder; + } + return disp+attrs.uniqueData; + }; } }; }); diff --git a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html index 2db75903..a6a80524 100644 --- a/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html +++ b/ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html @@ -37,7 +37,7 @@ -->