level toolbar thing

This commit is contained in:
Peter Cottle 2013-01-05 13:22:14 -08:00
parent 6ee05c1f0a
commit 5d981a1268
5 changed files with 132 additions and 4 deletions

View file

@ -9648,6 +9648,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',
@ -9700,6 +9736,7 @@ exports.ZoomAlertWindow = ZoomAlertWindow;
exports.ConfirmCancelTerminal = ConfirmCancelTerminal;
exports.CanvasTerminalHolder = CanvasTerminalHolder;
exports.LevelToolbar = LevelToolbar;
});
@ -15123,7 +15160,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);
@ -19332,7 +19368,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);
@ -19721,6 +19756,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',
@ -19773,6 +19844,7 @@ exports.ZoomAlertWindow = ZoomAlertWindow;
exports.ConfirmCancelTerminal = ConfirmCancelTerminal;
exports.CanvasTerminalHolder = CanvasTerminalHolder;
exports.LevelToolbar = LevelToolbar;
});