diff --git a/client/core/src/components/check/check.html b/client/core/src/components/check/check.html index b261a53a7..b2f5558b2 100644 --- a/client/core/src/components/check/check.html +++ b/client/core/src/components/check/check.html @@ -2,3 +2,8 @@ {{::$ctrl.label}} + + info_outline + \ No newline at end of file diff --git a/client/core/src/components/check/check.js b/client/core/src/components/check/check.js index 1f8aa7969..af2c11347 100644 --- a/client/core/src/components/check/check.js +++ b/client/core/src/components/check/check.js @@ -3,11 +3,14 @@ import Input from '../../lib/input'; import './style.scss'; export default class Controller extends Input { - constructor($element, $scope) { + constructor($element, $scope, $attrs, vnTemplate) { super($element, $scope); + vnTemplate.normalizeInputAttrs($attrs); componentHandler.upgradeElement(this.element.firstChild); this.mdlElement = this.element.firstChild.MaterialCheckbox; this.input.addEventListener('change', () => this.onChange()); + this.hasInfo = Boolean($attrs.info); + this.info = $attrs.info || null; } set field(value) { this._field = value; @@ -35,7 +38,7 @@ export default class Controller extends Input { this.$.$applyAsync(); } } -Controller.$inject = ['$element', '$scope', '$injector']; +Controller.$inject = ['$element', '$scope', '$attrs', 'vnTemplate']; ngModule.component('vnCheck', { template: require('./check.html'), diff --git a/client/core/src/components/check/style.scss b/client/core/src/components/check/style.scss index 3ff40e1e7..c9348d9b7 100644 --- a/client/core/src/components/check/style.scss +++ b/client/core/src/components/check/style.scss @@ -1,5 +1,16 @@ +@import 'colors'; + vn-check { + position: relative; & > .mdl-checkbox { width: initial; } + + & > i { + padding-left: 5px; + position: absolute; + bottom: 3px; + color: $secondary-font-color; + font-size: 20px !important + } } \ No newline at end of file