mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 01:10:04 +02:00
removed easy background view
This commit is contained in:
parent
ce5fc82ca9
commit
b5cf7f9343
2 changed files with 5 additions and 17 deletions
|
@ -58,6 +58,8 @@ var vcsModeRefresh = function(eventData) {
|
||||||
if (!window.$) { return; }
|
if (!window.$) { return; }
|
||||||
|
|
||||||
var mode = eventData.mode;
|
var mode = eventData.mode;
|
||||||
|
var isGit = eventData.mode === 'git';
|
||||||
|
|
||||||
var displayMode = mode.slice(0, 1).toUpperCase() + mode.slice(1);
|
var displayMode = mode.slice(0, 1).toUpperCase() + mode.slice(1);
|
||||||
var otherMode = (displayMode === 'Git') ? 'Hg' : 'Git';
|
var otherMode = (displayMode === 'Git') ? 'Hg' : 'Git';
|
||||||
var regex = new RegExp(otherMode, 'g');
|
var regex = new RegExp(otherMode, 'g');
|
||||||
|
@ -67,6 +69,9 @@ var vcsModeRefresh = function(eventData) {
|
||||||
var text = $(el).text().replace(regex, displayMode);
|
var text = $(el).text().replace(regex, displayMode);
|
||||||
$(el).text(text);
|
$(el).text(text);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('body').toggleClass('gitMode', isGit);
|
||||||
|
$('body').toggleClass('hgMode', !isGit);
|
||||||
};
|
};
|
||||||
|
|
||||||
var intlRefresh = function() {
|
var intlRefresh = function() {
|
||||||
|
@ -280,8 +285,6 @@ function CommandUI() {
|
||||||
var CommandHistoryView = require('../react_views/CommandHistoryView.jsx');
|
var CommandHistoryView = require('../react_views/CommandHistoryView.jsx');
|
||||||
var MainHelperBarView = require('../react_views/MainHelperBarView.jsx');
|
var MainHelperBarView = require('../react_views/MainHelperBarView.jsx');
|
||||||
|
|
||||||
var backgroundView = new Views.BackgroundView();
|
|
||||||
|
|
||||||
this.commandCollection = new Collections.CommandCollection();
|
this.commandCollection = new Collections.CommandCollection();
|
||||||
this.commandBuffer = new Collections.CommandBuffer({
|
this.commandBuffer = new Collections.CommandBuffer({
|
||||||
collection: this.commandCollection
|
collection: this.commandCollection
|
||||||
|
|
|
@ -481,20 +481,6 @@ 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({
|
var ViewportAlert = Backbone.View.extend({
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
this.grabBatons();
|
this.grabBatons();
|
||||||
|
@ -695,7 +681,6 @@ var CanvasTerminalHolder = BaseView.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.BaseView = BaseView;
|
exports.BaseView = BaseView;
|
||||||
exports.BackgroundView = BackgroundView;
|
|
||||||
exports.GeneralButton = GeneralButton;
|
exports.GeneralButton = GeneralButton;
|
||||||
exports.ModalView = ModalView;
|
exports.ModalView = ModalView;
|
||||||
exports.ModalTerminal = ModalTerminal;
|
exports.ModalTerminal = ModalTerminal;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue