mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 09:20:03 +02:00
level toolbar thing
This commit is contained in:
parent
6ee05c1f0a
commit
5d981a1268
5 changed files with 132 additions and 4 deletions
|
@ -331,7 +331,6 @@ var CommandLineHistoryView = Backbone.View.extend({
|
|||
var toDestroy = [];
|
||||
|
||||
this.collection.each(function(command) {
|
||||
console.log('this command', command, command.get('status'));
|
||||
if (command.get('status') !== 'inqueue' &&
|
||||
command.get('status') !== 'processing') {
|
||||
toDestroy.push(command);
|
||||
|
|
|
@ -341,6 +341,42 @@ var ZoomAlertWindow = Backbone.View.extend({
|
|||
}
|
||||
});
|
||||
|
||||
var LevelToolbar = BaseView.extend({
|
||||
tagName: 'div',
|
||||
template: _.template($('#level-toolbar-template').html()),
|
||||
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
this.JSON = {
|
||||
levelName: options.levelName || 'Some level! (unknown name)'
|
||||
};
|
||||
|
||||
this.beforeDestination = $($('#commandLineHistory div.toolbar')[0]);
|
||||
this.render();
|
||||
|
||||
if (!options.wait) {
|
||||
process.nextTick(_.bind(function() {
|
||||
this.show();
|
||||
}, this));
|
||||
}
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var HTML = this.template(this.JSON);
|
||||
|
||||
this.$el.html(HTML);
|
||||
this.beforeDestination.after(this.el);
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
this.$('div.toolbar').toggleClass('hidden', true);
|
||||
},
|
||||
|
||||
show: function() {
|
||||
this.$('div.toolbar').toggleClass('hidden', false);
|
||||
}
|
||||
});
|
||||
|
||||
var CanvasTerminalHolder = BaseView.extend({
|
||||
tagName: 'div',
|
||||
className: 'canvasTerminalHolder box flex1',
|
||||
|
@ -393,4 +429,5 @@ exports.ZoomAlertWindow = ZoomAlertWindow;
|
|||
exports.ConfirmCancelTerminal = ConfirmCancelTerminal;
|
||||
|
||||
exports.CanvasTerminalHolder = CanvasTerminalHolder;
|
||||
exports.LevelToolbar = LevelToolbar;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue