/// class PD.Web.UI.Controls.ViewGridShowDesignFiltersDialogCommand
/// using PD.Web.UI.Controls.ViewGridCommand

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

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

    setDefaults: function () {
        this._super();
        this.props("id", "view-grid/design-filters-dialog");
        this.props("enabled", true);
        this.props("icon", PD.Path.resolve("~/application/icons/misc/filter.png"));
        this.props("label", "Filters...");
        this.props("tooltip", "Filters...");
    },

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

        var that = this;

        ProspectDirector.Modules.Views.ViewDesignFiltersDialog.Dialog.show({
            params: {
                viewStateId: this.get_viewStateId()
            },
            callbacks: {
                ok: function (sender, e) {
                    that.get_viewGrid().build();
                }
            }
        });

    }

});