mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +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.blur();
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
events.on('processCommandFromEvent', _.bind(
|
events.on('processCommandFromEvent', this.addToCollection, this);
|
||||||
this.addToCollection, this
|
events.on('submitCommandValueFromEvent', this.submitValue, this);
|
||||||
));
|
|
||||||
|
|
||||||
// hacky timeout focus
|
// hacky timeout focus
|
||||||
setTimeout(_.bind(function() {
|
setTimeout(_.bind(function() {
|
||||||
|
@ -157,7 +156,10 @@ var CommandPromptView = Backbone.View.extend({
|
||||||
submit: function() {
|
submit: function() {
|
||||||
var value = this.$('#commandTextField').val().replace('\n', '');
|
var value = this.$('#commandTextField').val().replace('\n', '');
|
||||||
this.clear();
|
this.clear();
|
||||||
|
this.submitValue(value);
|
||||||
|
},
|
||||||
|
|
||||||
|
submitValue: function(value) {
|
||||||
// if we are entering a real command, add it to our history
|
// if we are entering a real command, add it to our history
|
||||||
if (value.length) {
|
if (value.length) {
|
||||||
this.commands.unshift(value);
|
this.commands.unshift(value);
|
||||||
|
|
|
@ -56,6 +56,11 @@ $(document).ready(function(){
|
||||||
$(window).resize(windowResize);
|
$(window).resize(windowResize);
|
||||||
windowResize();
|
windowResize();
|
||||||
setTimeout(windowResize, 50);
|
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() {
|
function windowResize() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue