Our pure JavaScript Scheduler component


Post by Highnoon »

Hi,

how to remove TimeRage context menu completely.

contextMenuTime.png
contextMenuTime.png (6.13 KiB) Viewed 671 times

i use already these configs but it is not completely removed.

            enableHeaderContextMenu: false,
            headerContextMenu: false,

The 2 first entries still appear?

Thanks


Post by mats »

This guide shows how: https://bryntum.com/docs/scheduler/#Scheduler/guides/customization/contextmenu.md

const scheduler = new Scheduler({
    features : {
        // Turn the Event menu off completely, will not be created
        eventMenu : false,
        // Turn the Schedule menu off completely, will not be created
        scheduleMenu : false,
        // Turn the TimeAxis Header menu off completely, will not be created
        timeAxisHeaderMenu : false
    }
});

Post by Highnoon »

Thanks mats,

timeAxisHeaderMenu : false would do the job. But i am using still using Scheduler Version 2.2.5. Is there a solution for this version?

contextMenuTime2.png
contextMenuTime2.png (3.63 KiB) Viewed 658 times

This is my 'context menu' section.

            scheduleContextMenu: {
                items: {
                    addEvent: false
                },
                // Process items before context menu is shown, add or remove or prevent it
                processItems: function (_ref3) {
                    processContextMenuItems(_ref3);
                }
            },
            eventContextMenu: {
                items: {
                    deleteEvent: false,
                    unassignEvent: false
                },
                // Process items before context menu is shown, add or remove or prevent it
                processItems: function (_ref3) {
                    processContextMenuItems(_ref3);
                }
            }, //eventContextMenu
            enableHeaderContextMenu: false,
            headerContextMenu: false,
            // Turn the TimeAxis Header menu off completely, will not be created
            timeAxisHeaderMenu: false,

Thanks


Post by mats »

The best would be to update to the latest version, as 2.x is pretty outdated at this point. Are you considering upgrading?


Post by Highnoon »

Hi,

yes upgrading will be one of the next steps.

Can you please check if its possible anyhow to get timeAxisHeaderMenu functionality in 2.2.5.

            timeAxisHeaderMenu: false,
            // Feature "timeAxisHeaderMenu" not available, make sure you have imported it
            //timeAxisHeaderMenu: {
            //    items: {
            //        currentTimeLine: false
            //    }
            //},

CurrentTimeLine is the last element appearing. Or maybe its possible to change the onToggle method from currentTimeLine in contextmenu?


Post by alex.l »

This config is working for me. Please try yourself.

    features: {
        timeRanges : {
            getHeaderMenuItems() {}
        },
        headerContextMenu : false,
        eventFilter : false
    }

But we suggest to keep your application is up to date to have all bug fixes and improves available. It's much easier to do in version 4.x.x.

All the best,
Alex


Post Reply