2018-02-10 15:18:01 +00:00
|
|
|
import ngModule from '../../module';
|
2017-05-31 07:46:05 +00:00
|
|
|
import Dialog from '../dialog/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 {
|
|
|
|
constructor($element, $scope, $compile) {
|
|
|
|
super($element);
|
|
|
|
let cTemplate = $compile(template)($scope)[0];
|
|
|
|
this.body = cTemplate.querySelector('tpl-body');
|
|
|
|
this.buttons = cTemplate.querySelector('tpl-buttons');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Confirm.$inject = ['$element', '$scope', '$compile'];
|
2017-02-06 17:01:04 +00:00
|
|
|
|
2018-02-10 15:18:01 +00:00
|
|
|
ngModule.component('vnConfirm', {
|
2018-02-20 09:00:19 +00:00
|
|
|
template: require('../dialog/dialog.html'),
|
2017-02-06 17:01:04 +00:00
|
|
|
bindings: {
|
2018-02-20 09:00:19 +00:00
|
|
|
onOpen: '&?',
|
2017-02-06 17:01:04 +00:00
|
|
|
onResponse: '&',
|
2017-02-07 16:38:30 +00:00
|
|
|
question: '@',
|
2018-02-12 12:16:49 +00:00
|
|
|
message: '@?'
|
2017-02-06 17:01:04 +00:00
|
|
|
},
|
|
|
|
controller: Confirm
|
|
|
|
});
|