/// class PD.Manage.Modules.ViewDesignToolbar

PD.Manage.Modules.ViewDesignToolbar =
PD.Web.UI.Controls.ToolbarSegment.extend({

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

    get_viewGrid: function () {
        return this.get_context().viewGrid;
    },

    //===================================
    // EVENT HANDLERS
    //===================================

    onRegisterItems: function (e) {

        var contextId = this.get_viewGrid().get_id();

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/anchor-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/design-columns-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/design-filters-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/bounds-columns-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/bounds-filters-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/find-in-results-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            display: "icon",
            contextId: contextId,
            commandId: "pd/view-grid:view-grid/undo"
        }));

    }

});