PMCORE-3956:Tasks > Many options are displaying in the Cases List when columns are hiding or showing

CR
This commit is contained in:
Fabio Guachalla
2022-09-05 11:04:44 -04:00
parent e4d49b0844
commit ea7af90f01
7 changed files with 57 additions and 164 deletions

View File

@@ -3,7 +3,7 @@
<div
class="ellipsis-button align-middle"
v-show="!showActions"
@mouseover="showActionButtons"
@mouseenter="showActionButtons"
>
<span>
<i class="fas fa-ellipsis-v"></i>
@@ -34,6 +34,7 @@
</template>
<script>
import eventBus from "./../../home/EventBus/eventBus"
export default {
name: "Ellipsis",
props: {
@@ -44,7 +45,16 @@ export default {
showActions: false
}
},
mounted () {},
mounted () {
eventBus.$on('closeEllipsis', this.hideActionButtons);
},
deactivated () {
eventBus.$off('closeEllipsis', this.hideActionButtons);
},
destroyed () {
eventBus.$off('closeEllipsis', this.hideActionButtons);
},
methods: {
/**
* Callback function from parent
@@ -63,6 +73,7 @@ export default {
this.showActions = true;
if (this.showActions) {
if (this.$parent.Row !== undefined) {
eventBus.$emit('closeEllipsis', this.data);
for (i = 0; i < this.$parent.$parent.$parent.$children.length -1 ; i++){
this.$parent.$parent.$parent.$children[i].$el.style.opacity = 0.15
}
@@ -82,16 +93,20 @@ export default {
},
/**
* Hide action buttons
* @param {object} dataE
*/
hideActionButtons() {
hideActionButtons(dataE) {
var i,
elelemts;
this.showActions = false;
if (this.$parent.Row !== undefined) {
for (i = 0; i < this.$parent.$parent.$parent.$children.length -1 ; i++){
this.$parent.$parent.$parent.$children[i].$el.style.opacity = 1
if (this.data.APP_UID !== dataE.APP_UID) {
this.showActions = false;
for (i = 0; i < this.$parent.$parent.$parent.$children.length -1 ; i++){
this.$parent.$parent.$parent.$children[i].$el.style.opacity = 1
}
}
} else if (this.$parent.item !== undefined) {
this.showActions = false;
if (this.$parent.$parent.$parent.$refs.vueListView !== undefined) {
elelemts = this.$parent.$el.getElementsByClassName('col-sm-5');
elelemts[0].style.opacity = 1;