/// class PD.Web.UI.Controls.ViewGridExportUnformattedCommand

PD.Web.UI.Controls.ViewGridExportUnformattedCommand =
PD.Web.UI.Controls.ViewGridCommand.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    setDefaults: function () {
        this._super();
        this.props("id", "view-grid/export-unformatted");
        this.props("enabled", true);
        this.props("icon", "upload-alt.14px.font");
        this.props("label", "Export");
        this.props("tooltip", "Export");
    },

    execute: function (e) {
        this._super(e);

        PD.Web.Utilities.DownloadManager.download("~/view/export", {
            viewStateId: this.get_viewStateId(),
            format: false,
            contextualFilters: JSON.stringify(this.get_viewGrid().getContextualFilters())
        });

    }

});