/// class PD.Manage.Modules.EventLogContextMenu
// using PD.Web.UI.Controls.ContextMenuSegment

PD.Manage.Modules.EventLogContextMenu =
PD.Web.UI.Controls.ContextMenuSegment.extend({

    //===================================
    // EVENT HANDLERS
    //===================================

    onRegisterItems: function (e) {

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/eventlog/context-menu:event/view-dialog"
        }));
        
    },

    onOpen: function (e) {

        var grid = this.get_context().viewGrid;

        PD.context.get_default().get_commands().setState({
            "pd/eventlog/context-menu": {
                event: _.first(grid.getSelections().toArray())
            }
        });

    }

});