TaskMenu Display Trigger?

Our Kanban Task Board for easy management of tasks and agile workflows
Post Reply
User avatar
mlmcconnell
Posts: 9
Joined: Sat Mar 04, 2017 12:48 am

TaskMenu Display Trigger?

Post by mlmcconnell »

Is there a configuration setting somewhere that would prevent the TaskMenu from showing when a Task is in a "Done" state? What controls whether or not the gear icon is shown in a Task? I have a Taskboard where the gear icon renders for "NotStarted" and "InProcess" Tasks, but not for those in "Done" status. Is this the default configuration? How would I override this?

Thank You,
M. McConnell


User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2997
Joined: Fri Apr 01, 2016 11:08 am

Re: TaskMenu Display Trigger?

Post by pmiklashevich »

Hello,

If you want to leave the gear icon and only to prevent Task Menu from being shown, please override showForTask method.

Code: Select all

Ext.define(null, {
    override: 'Kanban.menu.TaskMenu',
    showForTask : function(task) {
        if (task.getState() !== 'Done') {
            this.callParent(arguments);
        }
    }
});

Or if you want to hide the gear icon, please solve it on css level:

Code: Select all

.sch-taskcolumn-state-Done .sch-task-menu-handle:before {
    display : none;
}
.sch-taskcolumn-state-Done .task-user {
    margin-right : 0;
}

You can try it out in "uitemplates" demo.

Best,
Pavel

Pavel Miklashevich - Core Developer

User avatar
mlmcconnell
Posts: 9
Joined: Sat Mar 04, 2017 12:48 am

Re: TaskMenu Display Trigger?

Post by mlmcconnell »

Hi, pmilashevich. Thank you for the quick reply. I don't think I explained myself very well. I WANT the gear icon to display (and the menu to be functional) for Tasks in a 'Done' state. For whatever reason, the TaskMenu will not display for Done items. The menu displays as it should for NotStarted and InProcess items. Is the TaskBoard supposed to behave like this, or am I seeing a bug?

Thank You,
M. McConnell


User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2997
Joined: Fri Apr 01, 2016 11:08 am

Re: TaskMenu Display Trigger?

Post by pmiklashevich »

For whatever reason, the TaskMenu will not display for Done items.

Could you please submit a runnable testcase or reproduce the issue with one of our demos? We need to have clear steps to catch the moment when you click on a gear icon and menu is not shown.

Pavel Miklashevich - Core Developer

User avatar
mlmcconnell
Posts: 9
Joined: Sat Mar 04, 2017 12:48 am

Re: TaskMenu Display Trigger?

Post by mlmcconnell »

I can try. But the point is, the gear icon is not there for Tasks in a 'Done' state. I have nothing to click on. Something is hiding or removing the the gear icon for completed tasks.


User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2997
Joined: Fri Apr 01, 2016 11:08 am

Re: TaskMenu Display Trigger?

Post by pmiklashevich »

Then need a testcase for this. Please try to inspect the element. You can check out here https://bryntum.com/examples/taskboard-for-extjs/kitchensink/#examples/uitemplates The element should have sch-task-menu-handle and x-fa fa-gear.

Attachments
Снимок экрана 2020-09-01 в 19.12.10.png
Снимок экрана 2020-09-01 в 19.12.10.png (537.18 KiB) Viewed 57 times
Pavel Miklashevich - Core Developer

User avatar
mlmcconnell
Posts: 9
Joined: Sat Mar 04, 2017 12:48 am

Re: TaskMenu Display Trigger?

Post by mlmcconnell »

My sincere apologies. This was entirely my fault. I had modified my TaskBodyTpl in TaskBoardPanel.js and it was evidently overwriting the DIV where the gear icon should appear for Done tasks only (I was using a <tplif> block to do some additional processing). I just need to tidy up my code and I should be able to fix it. Thank you for looking into this.

M. McConnell


Post Reply