/// class ProspectDirector.Web.UI.Canvas.Charts.ClearFields
/// using ProspectDirector.Web.UI.Canvas.Charts.FieldListCommand

/**
@class AddField
@constructor
@namespace Web.UI.Canvas.Charts
@extends Web.UI.Canvas.Charts.FieldListCommand
**/
ProspectDirector.Web.UI.Canvas.Charts.ClearFields = ProspectDirector.Web.UI.Canvas.Charts.FieldListCommand.extend({

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

    execute: function () {

        var that = this;

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

    }

});