|
@@ -62,6 +62,7 @@ export class DOMConsole {
|
|
this.setup();
|
|
this.setup();
|
|
this.inputListeners = [];
|
|
this.inputListeners = [];
|
|
this.hideInput();
|
|
this.hideInput();
|
|
|
|
+ this.was_waiting_input = false;
|
|
}
|
|
}
|
|
|
|
|
|
setup () {
|
|
setup () {
|
|
@@ -120,14 +121,14 @@ export class DOMConsole {
|
|
this.showBtn = bashNode.querySelector('#ivprog-console-showbtn');
|
|
this.showBtn = bashNode.querySelector('#ivprog-console-showbtn');
|
|
this._setupCursor();
|
|
this._setupCursor();
|
|
//Jquery tooltips....
|
|
//Jquery tooltips....
|
|
- $(this.clearBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_clear")});
|
|
|
|
- $(this.showBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_show")});
|
|
|
|
- $(this.hideBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_hide")});
|
|
|
|
|
|
+ window.$(this.clearBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_clear")});
|
|
|
|
+ window.$(this.showBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_show")});
|
|
|
|
+ window.$(this.hideBtn).popup({content:LocalizedStrings.getUI("tooltip_terminal_hide")});
|
|
}
|
|
}
|
|
|
|
|
|
_setupCursor () {
|
|
_setupCursor () {
|
|
this.inputCMD.addEventListener('click', this.blinkCaretAndFocus.bind(this));
|
|
this.inputCMD.addEventListener('click', this.blinkCaretAndFocus.bind(this));
|
|
- this.inputCMD.click();
|
|
|
|
|
|
+ //this.inputCMD.click();
|
|
|
|
|
|
this.input.addEventListener('keyup', this.updateSpanText.bind(this));
|
|
this.input.addEventListener('keyup', this.updateSpanText.bind(this));
|
|
this.input.addEventListener('blur', this.stopBlinkCaret.bind(this));
|
|
this.input.addEventListener('blur', this.stopBlinkCaret.bind(this));
|
|
@@ -138,12 +139,12 @@ export class DOMConsole {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.input.focus();
|
|
this.input.focus();
|
|
- const outerRef = this;
|
|
|
|
|
|
+ const that = this;
|
|
this.cursorInterval = window.setInterval(function() {
|
|
this.cursorInterval = window.setInterval(function() {
|
|
- if (outerRef.cursorRef.style.visibility === 'visible') {
|
|
|
|
- outerRef.cursorRef.style.visibility = 'hidden';
|
|
|
|
|
|
+ if (that.cursorRef.style.visibility === 'visible') {
|
|
|
|
+ that.cursorRef.style.visibility = 'hidden';
|
|
} else {
|
|
} else {
|
|
- outerRef.cursorRef.style.visibility = 'visible';
|
|
|
|
|
|
+ that.cursorRef.style.visibility = 'visible';
|
|
}
|
|
}
|
|
}, 500);
|
|
}, 500);
|
|
}
|
|
}
|
|
@@ -223,18 +224,26 @@ export class DOMConsole {
|
|
if(!this.disableMarginTop && this.parent.style.top.length == 0) {
|
|
if(!this.disableMarginTop && this.parent.style.top.length == 0) {
|
|
this.parent.style.marginTop = "-160px";
|
|
this.parent.style.marginTop = "-160px";
|
|
}
|
|
}
|
|
|
|
+ if(this.needInput) {
|
|
|
|
+ this.showInput();
|
|
|
|
+ this.scheduleNotify();
|
|
|
|
+ }
|
|
if(!isElementInViewport(this.termDiv))
|
|
if(!isElementInViewport(this.termDiv))
|
|
this.termDiv.scrollIntoView(false);
|
|
this.termDiv.scrollIntoView(false);
|
|
this.scrollTerm();
|
|
this.scrollTerm();
|
|
}
|
|
}
|
|
|
|
|
|
hide () {
|
|
hide () {
|
|
|
|
+ if(this.needInput) {
|
|
|
|
+ clearInterval(this.idleInterval);
|
|
|
|
+ this.hideInput();
|
|
|
|
+ this.needInput = true;
|
|
|
|
+ }
|
|
// Is in draggable mode?
|
|
// Is in draggable mode?
|
|
if(!this.disableMarginTop && this.parent.style.top.length == 0) {
|
|
if(!this.disableMarginTop && this.parent.style.top.length == 0) {
|
|
this.parent.style.marginTop = "0";
|
|
this.parent.style.marginTop = "0";
|
|
}
|
|
}
|
|
this.termDiv.style.display = 'none';
|
|
this.termDiv.style.display = 'none';
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
getClassForType (type) {
|
|
getClassForType (type) {
|