mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 01:10:04 +02:00
[Hackathon] Hg mode initial
This commit is contained in:
parent
52c6579fae
commit
0f1c9c4e7a
15 changed files with 443 additions and 26 deletions
|
@ -472,6 +472,20 @@ var NextLevelConfirm = ConfirmCancelTerminal.extend({
|
|||
}
|
||||
});
|
||||
|
||||
var BackgroundView = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.$body = $('body');
|
||||
Main.getEvents().on('vcsModeChange', this.updateMode, this);
|
||||
},
|
||||
|
||||
updateMode: function(eventData) {
|
||||
eventData = eventData || {};
|
||||
var isGit = eventData.mode === 'git';
|
||||
this.$body.toggleClass('gitMode', isGit);
|
||||
this.$body.toggleClass('hgMode', !isGit);
|
||||
}
|
||||
});
|
||||
|
||||
var ViewportAlert = Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
this.grabBatons();
|
||||
|
@ -845,6 +859,7 @@ var CanvasTerminalHolder = BaseView.extend({
|
|||
});
|
||||
|
||||
exports.BaseView = BaseView;
|
||||
exports.BackgroundView = BackgroundView;
|
||||
exports.GeneralButton = GeneralButton;
|
||||
exports.ModalView = ModalView;
|
||||
exports.ModalTerminal = ModalTerminal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue