mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-23 12:15:50 +02:00
merge main
This commit is contained in:
commit
3bb4eb86a8
4 changed files with 23 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ var GitDemonstrationView = ContainedBase.extend({
|
|||
this.navEvents = Object.assign({}, Backbone.Events);
|
||||
this.navEvents.on('positive', this.positive, this);
|
||||
this.navEvents.on('negative', this.negative, this);
|
||||
this.navEvents.on('exit', this.exit, this);
|
||||
this.navEvents.on('onResetButtonClick', this.onResetButtonClick, this);
|
||||
this.keyboardListener = new KeyboardListener({
|
||||
events: this.navEvents,
|
||||
|
@ -79,9 +80,14 @@ var GitDemonstrationView = ContainedBase.extend({
|
|||
}
|
||||
},
|
||||
|
||||
exit: function() {
|
||||
alert('exittt');
|
||||
},
|
||||
|
||||
receiveMetaNav: function(navView, metaContainerView) {
|
||||
var _this = this;
|
||||
navView.navEvents.on('positive', this.positive, this);
|
||||
navView.navEvents.on('exit', this.exit, this);
|
||||
this.metaContainerView = metaContainerView;
|
||||
},
|
||||
|
||||
|
|
|
@ -314,7 +314,8 @@ var ModalTerminal = ContainedBase.extend({
|
|||
className: 'modalTerminal box flex1',
|
||||
template: _.template($('#terminal-window-template').html()),
|
||||
events: {
|
||||
'click div.inside': 'onClick'
|
||||
'click div.inside': 'onClick',
|
||||
'click div.controls div.close': 'onCloseButtonClick'
|
||||
},
|
||||
|
||||
initialize: function(options) {
|
||||
|
@ -333,6 +334,10 @@ var ModalTerminal = ContainedBase.extend({
|
|||
this.$('.modal-title').text(title);
|
||||
},
|
||||
|
||||
onCloseButtonClick: function() {
|
||||
Main.getEventBaton().trigger('onCloseButtonClick');
|
||||
},
|
||||
|
||||
onClick: function() {
|
||||
this.navEvents.trigger('click');
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue