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

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

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

    onRegisterItems: function (e) {

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/document-type/context-menu:document-type/edit-dialog"
        }));

        e.addSeparator();

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/document-type/context-menu:document-type/delete"
        }));

    },

    onOpen: function (e) {

        var grid = this.get_context().viewGrid;
        var item = grid.getSelection();

        PD.context.get_default().get_commands().setState({
            "pd/document-type/context-menu": {
                documentType: item
            }
        });
        
    }

});