now with demo supprot

This commit is contained in:
Peter Cottle 2012-10-13 01:53:39 -07:00
parent be2a5bf35b
commit 70e2165aea
2 changed files with 10 additions and 3 deletions

View file

@ -18,9 +18,8 @@ var CommandPromptView = Backbone.View.extend({
this.blur();
}, this));
events.on('processCommandFromEvent', _.bind(
this.addToCollection, this
));
events.on('processCommandFromEvent', this.addToCollection, this);
events.on('submitCommandValueFromEvent', this.submitValue, this);
// hacky timeout focus
setTimeout(_.bind(function() {
@ -157,7 +156,10 @@ var CommandPromptView = Backbone.View.extend({
submit: function() {
var value = this.$('#commandTextField').val().replace('\n', '');
this.clear();
this.submitValue(value);
},
submitValue: function(value) {
// if we are entering a real command, add it to our history
if (value.length) {
this.commands.unshift(value);

View file

@ -56,6 +56,11 @@ $(document).ready(function(){
$(window).resize(windowResize);
windowResize();
setTimeout(windowResize, 50);
setTimeout(function() {
events.trigger('submitCommandValueFromEvent', "gc; gc; gc; gc; gc; gc; git checkout master^^^^; git commit; git checkout -b another; gc; gc; git rebase master");
}, 500);
});
function windowResize() {