This commit is contained in:
Peter Cottle 2024-06-18 16:24:57 +09:00
parent a3cfd3bb88
commit 21fbde2c31
4 changed files with 12 additions and 4 deletions

View file

@ -30,11 +30,18 @@ KeyboardListener.prototype.listen = function() {
}
this.listening = true;
Main.getEventBaton().stealBaton('docKeydown', this.keydown, this);
Main.getEventBaton().stealBaton('onCloseButtonClick', this.onCloseButtonClick, this);
};
KeyboardListener.prototype.mute = function() {
this.listening = false;
Main.getEventBaton().releaseBaton('docKeydown', this.keydown, this);
Main.getEventBaton().releaseBaton('onCloseButtonClick', this.onCloseButtonClick, this);
};
KeyboardListener.prototype.onCloseButtonClick = function(e) {
this.fireEvent('esc', e);
};
KeyboardListener.prototype.keydown = function(e) {
@ -59,4 +66,3 @@ KeyboardListener.prototype.passEventBack = function(e) {
exports.KeyboardListener = KeyboardListener;
exports.mapKeycodeToKey = mapKeycodeToKey;

View file

@ -85,8 +85,6 @@ var GitDemonstrationView = ContainedBase.extend({
},
receiveMetaNav: function(navView, metaContainerView) {
console.log('receive meta nav');
debugger;
var _this = this;
navView.navEvents.on('positive', this.positive, this);
navView.navEvents.on('exit', this.exit, this);

View file

@ -335,7 +335,7 @@ var ModalTerminal = ContainedBase.extend({
},
onCloseButtonClick: function() {
console.log('triggering stuff');
Main.getEventBaton().trigger('onCloseButtonClick');
},
onClick: function() {

View file

@ -480,6 +480,10 @@ div.ui-draggable div.controls div.box.flex1 div {
cursor: pointer;
}
div.modalTerminal div.close {
cursor: pointer !important;
}
div.controls div.box.flex1 div.close {
background-color: #fb625f;
}