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

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

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

    onRegisterItems: function (e) {

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/data-load:job/delete"
        }));
        
        e.addSeparator();

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/data-load:job/download-input-file"
        }));

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/data-load:job/download-output-file"
        }));

    },

    onOpen: function (e) {

        var grid = this.get_context().viewGrid;

        PD.context.get_default().get_commands().setState({
            "pd/data-load/context-menu": {
                jobs: grid.getSelections().toArray()
            }
        });

    }

});