2018-02-10 15:18:01 +00:00
|
|
|
import ngModule from '../../module';
|
2019-10-26 23:30:01 +00:00
|
|
|
import Dialog from '../dialog';
|
2018-02-20 09:00:19 +00:00
|
|
|
import template from './confirm.html';
|
2017-02-06 17:01:04 +00:00
|
|
|
|
2018-02-20 09:00:19 +00:00
|
|
|
export default class Confirm extends Dialog {
|
2019-10-26 23:30:01 +00:00
|
|
|
constructor($element, $, $transclude) {
|
|
|
|
super($element, $, $transclude);
|
|
|
|
|
|
|
|
let $template = angular.element(template);
|
|
|
|
let slots = $transclude.$$boundTransclude.$$slots;
|
|
|
|
|
|
|
|
let bodyLinkFn = this.$compile($template.find('tpl-body'));
|
|
|
|
slots.body = this.createBoundTranscludeFn(bodyLinkFn);
|
|
|
|
|
|
|
|
let buttonsLinkFn = this.$compile($template.find('tpl-buttons'));
|
|
|
|
slots.buttons = this.createBoundTranscludeFn(buttonsLinkFn);
|
2018-02-20 09:00:19 +00:00
|
|
|
}
|
|
|
|
}
|
2017-02-06 17:01:04 +00:00
|
|
|
|
2019-10-26 23:30:01 +00:00
|
|
|
ngModule.vnComponent('vnConfirm', {
|
|
|
|
controller: Confirm,
|
|
|
|
transclude: true,
|
2017-02-06 17:01:04 +00:00
|
|
|
bindings: {
|
2017-02-07 16:38:30 +00:00
|
|
|
question: '@',
|
2018-02-12 12:16:49 +00:00
|
|
|
message: '@?'
|
2019-10-26 23:30:01 +00:00
|
|
|
}
|
2017-02-06 17:01:04 +00:00
|
|
|
});
|