summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/directives
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common/client/app/directives')
-rw-r--r--ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js18
-rw-r--r--ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html2
2 files changed, 19 insertions, 1 deletions
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 @@
-->
<div id="app-multilple-select" class="multiple-select">
<div class="selectBox"
- id="app-select-{{getTitle()}}"
+ id="app-select-{{getIdTitle()}}"
ng-click="isDisabled || showCheckboxes()"
title="{{getTitle()}}"
ng-bind="getTitle()"