mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-12 15:44:25 +02:00
Resolves #1152 -- close level window on close button click
This commit is contained in:
parent
ad95c98ef2
commit
a3cfd3bb88
2 changed files with 14 additions and 1 deletions
|
@ -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,16 @@ var GitDemonstrationView = ContainedBase.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
alert('exittt');
|
||||||
|
},
|
||||||
|
|
||||||
receiveMetaNav: function(navView, metaContainerView) {
|
receiveMetaNav: function(navView, metaContainerView) {
|
||||||
|
console.log('receive meta nav');
|
||||||
|
debugger;
|
||||||
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() {
|
||||||
|
console.log('triggering stuff');
|
||||||
|
},
|
||||||
|
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
this.navEvents.trigger('click');
|
this.navEvents.trigger('click');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue