mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-24 04:34:34 +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;
|
this.listening = true;
|
||||||
Main.getEventBaton().stealBaton('docKeydown', this.keydown, this);
|
Main.getEventBaton().stealBaton('docKeydown', this.keydown, this);
|
||||||
|
Main.getEventBaton().stealBaton('onCloseButtonClick', this.onCloseButtonClick, this);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
KeyboardListener.prototype.mute = function() {
|
KeyboardListener.prototype.mute = function() {
|
||||||
this.listening = false;
|
this.listening = false;
|
||||||
Main.getEventBaton().releaseBaton('docKeydown', this.keydown, this);
|
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) {
|
KeyboardListener.prototype.keydown = function(e) {
|
||||||
|
@ -59,4 +66,3 @@ KeyboardListener.prototype.passEventBack = function(e) {
|
||||||
|
|
||||||
exports.KeyboardListener = KeyboardListener;
|
exports.KeyboardListener = KeyboardListener;
|
||||||
exports.mapKeycodeToKey = mapKeycodeToKey;
|
exports.mapKeycodeToKey = mapKeycodeToKey;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
this.navEvents = Object.assign({}, Backbone.Events);
|
this.navEvents = Object.assign({}, Backbone.Events);
|
||||||
this.navEvents.on('positive', this.positive, this);
|
this.navEvents.on('positive', this.positive, this);
|
||||||
this.navEvents.on('negative', this.negative, this);
|
this.navEvents.on('negative', this.negative, this);
|
||||||
|
this.navEvents.on('exit', this.exit, this);
|
||||||
this.navEvents.on('onResetButtonClick', this.onResetButtonClick, this);
|
this.navEvents.on('onResetButtonClick', this.onResetButtonClick, this);
|
||||||
this.keyboardListener = new KeyboardListener({
|
this.keyboardListener = new KeyboardListener({
|
||||||
events: this.navEvents,
|
events: this.navEvents,
|
||||||
|
@ -79,9 +80,14 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
alert('exittt');
|
||||||
|
},
|
||||||
|
|
||||||
receiveMetaNav: function(navView, metaContainerView) {
|
receiveMetaNav: function(navView, metaContainerView) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
navView.navEvents.on('positive', this.positive, this);
|
navView.navEvents.on('positive', this.positive, this);
|
||||||
|
navView.navEvents.on('exit', this.exit, this);
|
||||||
this.metaContainerView = metaContainerView;
|
this.metaContainerView = metaContainerView;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,8 @@ var ModalTerminal = ContainedBase.extend({
|
||||||
className: 'modalTerminal box flex1',
|
className: 'modalTerminal box flex1',
|
||||||
template: _.template($('#terminal-window-template').html()),
|
template: _.template($('#terminal-window-template').html()),
|
||||||
events: {
|
events: {
|
||||||
'click div.inside': 'onClick'
|
'click div.inside': 'onClick',
|
||||||
|
'click div.controls div.close': 'onCloseButtonClick'
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
|
@ -333,6 +334,10 @@ var ModalTerminal = ContainedBase.extend({
|
||||||
this.$('.modal-title').text(title);
|
this.$('.modal-title').text(title);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onCloseButtonClick: function() {
|
||||||
|
Main.getEventBaton().trigger('onCloseButtonClick');
|
||||||
|
},
|
||||||
|
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
this.navEvents.trigger('click');
|
this.navEvents.trigger('click');
|
||||||
},
|
},
|
||||||
|
|
|
@ -480,6 +480,10 @@ div.ui-draggable div.controls div.box.flex1 div {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.modalTerminal div.close {
|
||||||
|
cursor: pointer !important;
|
||||||
|
}
|
||||||
|
|
||||||
div.controls div.box.flex1 div.close {
|
div.controls div.box.flex1 div.close {
|
||||||
background-color: #fb625f;
|
background-color: #fb625f;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue