Tarea #315 dialog refactor needed CR JUAN
This commit is contained in:
parent
c6a8b4cea9
commit
fc67fdd6af
|
@ -9,18 +9,18 @@ import './style.scss';
|
|||
* @property {HTMLElement} buttons The dialog HTML buttons
|
||||
*/
|
||||
export default class Dialog extends Component {
|
||||
constructor($element, $transclude) {
|
||||
super($element);
|
||||
constructor($element, $scope, $transclude) {
|
||||
super($element, $scope);
|
||||
this.shown = false;
|
||||
this.$element.addClass('vn-dialog');
|
||||
this.element.addEventListener('mousedown',
|
||||
e => this.onBackgroundMouseDown(e));
|
||||
|
||||
if ($transclude) {
|
||||
$transclude(tClone => {
|
||||
$transclude($scope.$parent, tClone => {
|
||||
this.body = tClone[0];
|
||||
}, null, 'body');
|
||||
$transclude(tClone => {
|
||||
$transclude($scope.$parent, tClone => {
|
||||
this.buttons = tClone[0];
|
||||
}, null, 'buttons');
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ export default class Dialog extends Component {
|
|||
clearTimeout(this.transitionTimeout);
|
||||
}
|
||||
}
|
||||
Dialog.$inject = ['$element', '$transclude'];
|
||||
Dialog.$inject = ['$element', '$scope', '$transclude'];
|
||||
|
||||
ngModule.component('vnDialog', {
|
||||
template: require('./dialog.html'),
|
||||
|
|
Loading…
Reference in New Issue