mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 17:27:22 +02:00
really basic option parsing
This commit is contained in:
parent
908b403c4b
commit
513315af3c
2 changed files with 32 additions and 10 deletions
16
src/views.js
16
src/views.js
|
@ -69,6 +69,10 @@ var CommandLineHistoryView = Backbone.View.extend({
|
|||
this.commandError, this
|
||||
));
|
||||
|
||||
events.on('commandProcessWarn', _.bind(
|
||||
this.commandWarn, this
|
||||
));
|
||||
|
||||
events.on('commandResultPrint', _.bind(
|
||||
this.commandResultPrint, this
|
||||
));
|
||||
|
@ -111,6 +115,18 @@ var CommandLineHistoryView = Backbone.View.extend({
|
|||
);
|
||||
},
|
||||
|
||||
commandWarn: function(msg) {
|
||||
this.$('#commandDisplay').append(
|
||||
_.template(
|
||||
this.resultTemplate,
|
||||
{
|
||||
className: 'commandWarn',
|
||||
result: msg
|
||||
}
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
commandResultPrint: function(err) {
|
||||
if (!err.msg.length) {
|
||||
// blank lines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue