Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hintUpdated: function() {
var hints = cliController.get("hints");
var hintEle = this.getPath("contentView.display.hint.layer");
while (hintEle.firstChild) {
hintEle.removeChild(hintEle.firstChild);
}
var level = Level.Info;
this.set("_completion", "");
/**
* Find a way to populate a DOM node with this hint
*/
var addHint = function(hintNode, hint) {
if (!hint) {
return;
}
// Defer promises
if (typeof hint.then == "function") {
hint.then(function(hint) {
addHint(hintNode, hint);
}.bind(this));
return;
});
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" ],
hasFocus: false,
table: null,
_contentHeight: -1,</p>