commit
e650c31b11
|
@ -73,7 +73,7 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// Initialize values.
|
// Initialize values.
|
||||||
this.priority = this.priority || 1;
|
this.priority = this.priority || 1;
|
||||||
this.hasAction = !!this.action && this.action.observers.length > 0;
|
this.hasAction = !!this.action && this.action.observed;
|
||||||
this.ariaAction = this.ariaAction || this.content;
|
this.ariaAction = this.ariaAction || this.content;
|
||||||
|
|
||||||
if (this.hasAction) {
|
if (this.hasAction) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ export class CoreContextMenuPopoverComponent {
|
||||||
item.toggle = !item.toggle;
|
item.toggle = !item.toggle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!item.action && item.action.observers.length > 0) {
|
if (!!item.action && item.action.observed) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ export class CoreContextMenuPopoverComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
item.action.emit(() => this.closeMenu(item));
|
item.action.emit(() => this.closeMenu(item));
|
||||||
} else if (item.closeOnClick && (item.href || (!!item.onClosed && item.onClosed.observers.length > 0))) {
|
} else if (item.closeOnClick && (item.href || (!!item.onClosed && item.onClosed.observed))) {
|
||||||
this.closeMenu(item);
|
this.closeMenu(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ export class CoreLocalFileComponent implements OnInit {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
if (!isOpenButton && CoreUtils.isTrueOrOne(this.overrideClick) && this.onClick.observers.length) {
|
if (!isOpenButton && CoreUtils.isTrueOrOne(this.overrideClick) && this.onClick.observed) {
|
||||||
this.onClick.emit();
|
this.onClick.emit();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -306,7 +306,7 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.onClick.observers.length > 0) {
|
if (this.onClick.observed) {
|
||||||
this.onClick.emit();
|
this.onClick.emit();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -54,7 +54,7 @@ export class CoreSupressEventsDirective implements OnInit {
|
||||||
* Initialize event listeners.
|
* Initialize event listeners.
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.onClick.observers.length == 0) {
|
if (!this.onClick.observed) {
|
||||||
CoreLogger.getInstance('CoreSupressEventsDirective')
|
CoreLogger.getInstance('CoreSupressEventsDirective')
|
||||||
.error('No onClick output was defined causing this directive to fail', this.element);
|
.error('No onClick output was defined causing this directive to fail', this.element);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue