35 lines
829 B
JavaScript
35 lines
829 B
JavaScript
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
|
|
});
|