Commit fd467c93 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Fix click event handling

parent 41203686
......@@ -15,12 +15,21 @@ export default {
},
},
methods: {
toggleSubGroups(e) {
if (e.target.tagName === 'A' || !this.group.hasSubgroups) {
return false;
onClickRowGroup(e) {
// e.stopPropagation();
// Skip for buttons
if (e.target.tagName === 'A' ||
(e.target.tagName === 'I' && e.target.parentElement.tagName === 'A')) {
} else {
if (this.group.hasSubgroups) {
eventHub.$emit('toggleSubGroups', this.group);
} else {
window.location.href = this.group.webUrl;
}
}
return eventHub.$emit('toggleSubGroups', this.group);
return false;
},
onLeaveGroup(e) {
e.preventDefault();
......@@ -28,6 +37,8 @@ export default {
if (confirm(`Are you sure you want to leave the "${this.group.fullName}" group?`)) {
this.leaveGroup();
}
return false;
},
leaveGroup() {
eventHub.$emit('leaveGroup', this.group.leavePath);
......@@ -76,7 +87,7 @@ export default {
<template>
<li
@click.stop="toggleSubGroups"
@click.stop="onClickRowGroup"
:id="groupDomId"
:class="rowClass"
>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment