How to use the hint.Level.Error function in hint

To help you get started, we’ve selected a few hint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / bespinclient / plugins / supported / CommandLine / views / cli.js View on Github external
if (hint.level > level) {
                level = hint.level;
            }

            this.$().setClass("error", level == Level.Error);
        }.bind(this);

        hints.forEach(function(hint) {
            var hintNode = document.createElement("span");
            hintEle.appendChild(hintNode);
            hintEle.appendChild(document.createTextNode(" \u00a0 "));
            addHint(hintNode, hint);
        }.bind(this));

        this.$().setClass("error", level == Level.Error);
    }.observes("CommandLine:controller#cliController.hints.[]"),
github mozilla / bespinclient / plugins / supported / CommandLine / views / cli.js View on Github external
} else {
                    SC.$("#" + outputId).removeClass("cmd_error");
                }
            });

            this.link(content, "completed", function(completed) {
                SC.$("#" + throbId).css({
                    "display": completed ? "none" : "block"
                });
            });
        }
    }
});

var hintClass = {};
hintClass[Level.Error] = "cmd_error";
hintClass[Level.Incomplete] = "cmd_incom";
hintClass[Level.Warning] = "cmd_warn";
hintClass[Level.Info] = "cmd_info";

/**
 * A view designed to dock in the bottom of the editor, holding the command
 * line input.
 * <p>
 * TODO: We need to generalize the way views attach to the editor, but now isn't
 * the right time to work on this. We're locked to the bottom.
 */
exports.CliInputView = SC.View.design({
    dock: dock.DOCK_BOTTOM,
    classNames: [ "cmd_line" ],
    layout: { height: 300, bottom: 0, left: 0, right: 0 },
    childViews: [ "contentView" ],</p>