/// class ProspectDirector.Web.UI.Queries.Commands.ClearConstraints
/// using ProspectDirector.Web.UI.Command

/**
@class ClearConstraints
@constructor
@namespace Web.UI.Queries.Commands
**/
ProspectDirector.Web.UI.Queries.Commands.ClearConstraints = ProspectDirector.Web.UI.Command.extend({

    //================================
    // PROPERTIES
    //================================

    get_editor: function () {
        return this.get_options().editor;
    },

    get_filter: function () {
        return this.get_options().filter;
    },

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

    execute: function () {

        var that = this;

        ProspectDirector.Web.UI.MessageDialog.warn({
            message: "Remove all constraints?",
            buttons: {
                ok: {
                    label: "OK",
                    callback: function () {
                        that.get_editor().clear();
                    }
                },
                cancel: "Cancel"
            }
        });

    }

});