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

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

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

    get_direction: function () {
        return this.get_options().direction;
    },

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

    execute: function () {

        var direction = this.get_direction().toLowerCase();

        switch (direction) {
            case "up":
                this.get_editor().shiftUp();
                break;
            case "down":
                this.get_editor().shiftDown();
                break;
        }

    }

});