From afe051883ea3571b56e111bf12697dcf75529713 Mon Sep 17 00:00:00 2001 From: Joan Date: Thu, 21 Jun 2018 08:46:30 +0200 Subject: [PATCH] label-value component Enable/disable ellipsize #364 --- client/client/src/summary/index.html | 6 +++--- .../src/components/label-value/label-value.html | 2 +- .../core/src/components/label-value/label-value.js | 14 +++++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/client/client/src/summary/index.html b/client/client/src/summary/index.html index f7cc16508..5767f48c7 100644 --- a/client/client/src/summary/index.html +++ b/client/client/src/summary/index.html @@ -22,7 +22,7 @@ - - - +
{{$ctrl.label}}: {{$ctrl.value ? $ctrl.value : '-'}}
\ No newline at end of file diff --git a/client/core/src/components/label-value/label-value.js b/client/core/src/components/label-value/label-value.js index 60fcb4548..1c1b9ac28 100644 --- a/client/core/src/components/label-value/label-value.js +++ b/client/core/src/components/label-value/label-value.js @@ -1,12 +1,24 @@ import ngModule from '../../module'; import './style.scss'; +export default class Controller { + constructor() { + this.__ellipsize = true; + } + + set ellipsize(value) { + this.__ellipsize = value; + } +} + ngModule.component('vnLabelValue', { template: require('./label-value.html'), + controller: Controller, replace: true, transclude: true, bindings: { label: '@', - value: '@' + value: '@', + ellipsize: '