click handlers

This commit is contained in:
Peter Cottle 2012-12-25 17:31:34 -08:00
parent 9ddfaf2f18
commit ee02aea414
6 changed files with 65 additions and 18 deletions

View file

@ -227,8 +227,9 @@ var CommandPromptView = Backbone.View.extend({
},
submitValue: function(value) {
// we should add if it's not a blank line and this is a new command...
// or if we edited the command
// we should add the command to our local storage history
// if it's not a blank line and this is a new command...
// or if we edited the command in place
var shouldAdd = (value.length && this.index == -1) ||
((value.length && this.index !== -1 &&
this.commands.toArray()[this.index].get('text') !== value));
@ -260,7 +261,6 @@ var CommandPromptView = Backbone.View.extend({
}
});
// This is the view for all commands -- it will represent
// their status (inqueue, processing, finished, error),
// their value ("git commit --amend"),
@ -390,4 +390,3 @@ var CommandLineHistoryView = Backbone.View.extend({
exports.CommandPromptView = CommandPromptView;
exports.CommandLineHistoryView = CommandLineHistoryView;