/*globals define*/

define([
    'widgets/EasyDAG/SelectionManager',
    'widgets/EasyDAG/Buttons',
    'underscore'
], function(
    EasyDAGSelectionManager,
    Buttons,
    _
) {
    'use strict';

    var SelectionManager = function(widget) {
        EasyDAGSelectionManager.call(this, widget);
    };

    _.extend(SelectionManager.prototype, EasyDAGSelectionManager.prototype);

    SelectionManager.prototype.createActionButtons = function(width/*, height*/) {
        // Add 'watch' and 'jumpToDef' buttons
        // TODO
        new Buttons.Enter({
            context: this._widget,
            $pEl: this.$selection,
            item: this.selectedItem,
            icon: 'monitor',
            x: width,
            y: 0
        });
    };

    return SelectionManager;
});

/*globals define*/

define([
    'widgets/EasyDAG/SelectionManager',
    'widgets/EasyDAG/Buttons',
    'deepforge/Constants',
    'underscore'
], function(
    EasyDAGSelectionManager,
    Buttons,
    CONSTANTS,
    _
) {
    'use strict';

    var SelectionManager = function(widget) {
        EasyDAGSelectionManager.call(this, widget);
    };

    _.extend(SelectionManager.prototype, EasyDAGSelectionManager.prototype);

    SelectionManager.prototype.createActionButtons = function(width/*, height*/) {
        var jobName = this.selectedItem.desc.name;

        // Check if it is an Input or Output job
        if (jobName !== CONSTANTS.OP.INPUT && jobName !== CONSTANTS.OP.OUTPUT) {
            new Buttons.Enter({
                context: this._widget,
                $pEl: this.$selection,
                item: this.selectedItem,
                icon: 'monitor',
                x: width,
                y: 0
            });
        }
    };

    return SelectionManager;
});

Hide "monitor" button for Input/Outputs. Fixes #810 (#811)