salix/modules/ticket/front/picture/index.js

35 lines
829 B
JavaScript
Raw Normal View History

2018-08-03 05:52:37 +00:00
import ngModule from '../module';
class Controller {
constructor($scope, $stateParams, $http) {
this.$scope = $scope;
this.$stateParams = $stateParams;
this.$http = $http;
this.filter = {
include: {
relation: 'item',
scope: {
field: ['name', 'image']
}
}
};
}
showDescriptor(event, itemFk) {
this.$scope.descriptor.itemFk = itemFk;
this.$scope.descriptor.parent = event.target;
this.$scope.descriptor.show();
}
onDescriptorLoad() {
this.$scope.popover.relocate();
}
}
Controller.$inject = ['$scope', '$stateParams', '$http'];
ngModule.component('vnTicketPicture', {
template: require('./index.html'),
controller: Controller
});