FullCalendar中的两个上下文菜单

时间:2018-08-16 11:24:49

标签: fullcalendar contextmenu

如何在fullcalendar中实现两个不同的上下文菜单?单击带有.fc-event的元素后,第一次启动,而单击.fc-day元素,则第二次启动。 来源

                $('.full-calendar').contextmenu({

                delegate: '.fc-event',
                selector: '.fc-event',
                menu: 
                //Menu 1
                [
                    {
                        title: "Test1", action: function (event, ui) {
                            some location..
                        }
                    },
                    {
                        title: "Test2", action: function (event, ui) {
                            some location..
                        }
                    },
                    { title: "Cancel" },
                ]},
                {

                delegate: '.fc-day',
                selector: '.fc-day',
                menu: 
                //Menu 2
                [
                    {
                        title: "Test3", action: function (event, ui) {
                            some location..
                        }
                    },
                    {
                        title: "Test4", action: function (event, ui) {
                            some location..
                        }
                    },
                    { title: "Cancel" },
                ]},

            );

0 个答案:

没有答案