mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
git log now done, fixed up result rendering
This commit is contained in:
parent
543f5986ae
commit
9c7ec69e2f
10 changed files with 189 additions and 35 deletions
|
@ -139,11 +139,11 @@ var CommandView = Backbone.View.extend({
|
|||
var json = _.extend(
|
||||
{
|
||||
resultType: '',
|
||||
result: ''
|
||||
result: '',
|
||||
warnings: ''
|
||||
},
|
||||
this.model.toJSON()
|
||||
);
|
||||
console.log('rendering', this.model.toJSON());
|
||||
|
||||
this.$el.html(this.template(json));
|
||||
return this;
|
||||
|
@ -164,6 +164,22 @@ var CommandLineHistoryView = Backbone.View.extend({
|
|||
this.collection.on('all', this.render, this);
|
||||
|
||||
this.collection.on('change', this.scrollDown, this);
|
||||
|
||||
events.on('issueWarning', this.addWarning, this);
|
||||
},
|
||||
|
||||
addWarning: function(msg) {
|
||||
console.log('here', arguments);
|
||||
var err = new Warning({
|
||||
msg: msg
|
||||
});
|
||||
|
||||
var command = new Command({
|
||||
error: err,
|
||||
rawStr: 'Warning:'
|
||||
});
|
||||
|
||||
this.collection.add(command);
|
||||
},
|
||||
|
||||
scrollDown: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue