We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Hi,

    I want to learn more about this piece of code

    ,getMenu: function() {
            var m = [{
                text: _('survey.questions')
                ,handler: this.viewQuestions
            },'-',{
                text: _('survey.survey_update')
                ,handler: this.updateSurvey
            },{
                text: _('survey.survey_remove')
                ,handler: this.removeSurvey
            }];
            this.addContextMenuItem(m);
            return true;
        }


    I there a file I can look at. I searched ext.js docs but no results

    Thank You
      • 28215
      • 4,149 Posts
      It’s a custom method in MODx.grid.Grid: See: manager/assets/modext/widgets/core/modx.grid.js

      It lets you set custom menus on your ExtJS components. MODx.grid.LocalGrid behaves a bit differently (expects you to return m). This will be addressed in a later version, as MODx.grid.Grid::getMenu should behave like MODx.grid.LocalGrid::getMenu.

        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com