mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
now with demo supprot
This commit is contained in:
parent
be2a5bf35b
commit
70e2165aea
2 changed files with 10 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue