salix/front/core/components/icon-menu/icon-menu.js

42 lines
1.0 KiB
JavaScript
Raw Normal View History

2018-02-10 15:18:01 +00:00
import ngModule from '../../module';
import ButtonMenu from '../button-menu/button-menu';
import './style.scss';
export default class IconMenu extends ButtonMenu {
constructor($element, $scope, $transclude) {
super($element, $scope);
this.$transclude = $transclude;
this.input = this.element.querySelector('.button');
}
}
IconMenu.$inject = ['$element', '$scope', '$transclude'];
2018-02-10 15:18:01 +00:00
ngModule.component('vnIconMenu', {
template: require('./icon-menu.html'),
bindings: {
2018-10-18 07:24:20 +00:00
label: '@',
showField: '@?',
2018-10-18 07:24:20 +00:00
selection: '<?',
valueField: '@?',
selectFields: '<?',
disabled: '<?',
initialData: '<?',
2018-10-18 07:24:20 +00:00
showFilter: '<?',
field: '=?',
2018-10-18 07:24:20 +00:00
url: '@?',
data: '<?',
where: '@?',
order: '@?',
limit: '<?',
multiple: '<?',
onChange: '&?',
icon: '@?',
translateFields: '<?',
onOpen: '&?'
},
transclude: {
tplItem: '?tplItem'
},
controller: IconMenu
});