#1566 ticket.sales state autocomplete

This commit is contained in:
Carlos Jimenez Ruiz 2019-06-27 09:44:19 +02:00
parent d94ca9c538
commit a7c5a9e598
3 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,10 @@ export default class ButtonMenu extends Input {
super($element, $scope); super($element, $scope);
this.$transclude = $transclude; this.$transclude = $transclude;
this.input = this.element.querySelector('.mdl-button'); this.input = this.element.querySelector('.mdl-button');
$element.on('click', e => this.onClick(e)); $element.on('click', e => {
if (!this.disabled)
this.onClick(e);
});
} }
get model() { get model() {

View File

@ -17,6 +17,7 @@
<vn-button-menu <vn-button-menu
disabled="!$ctrl.isEditable" disabled="!$ctrl.isEditable"
label="State" label="State"
value-field="id"
url="/ticket/api/States/alertLevelIs0" url="/ticket/api/States/alertLevelIs0"
on-change="$ctrl.onStateChange(value)"> on-change="$ctrl.onStateChange(value)">
</vn-button-menu> </vn-button-menu>

View File

@ -1,6 +1,5 @@
import ngModule from '../module'; import ngModule from '../module';
import './style.scss'; import './style.scss';
import {throws} from 'assert';
class Controller { class Controller {
constructor($scope, $state, $http, vnApp, $translate) { constructor($scope, $state, $http, vnApp, $translate) {