Skip to content

Commit

Permalink
fixing clear errors button click
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Langley Jr committed Sep 24, 2013
1 parent cfb8027 commit 5243544
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion admin/templates/error-logs.html
Expand Up @@ -4,7 +4,7 @@
<h2>Recent Errors</h2>
</div>
<div class="col-1-2 textright">
<a href="<% meta.view_all_url %>" class="button-primary">View All Logs</a>
<a href="<%= meta.view_all_url %>" class="button-primary">View All Logs</a>
<input type="button" id="error_logs_clear" class="button" value="Clear Errors"/>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions js/admin.js
Expand Up @@ -375,7 +375,7 @@
this.collection.on('all', this.render, this).enablePolling();
},
events: {
'click #clear-logs': 'onClickClearLogs'
'click #error_logs_clear': 'onClickClearLogs'
},
render: function() {
var _this = this;
Expand All @@ -386,12 +386,12 @@
return;
});
}
$(this.el).html(this.template({errors: this.collection.toJSON(), meta: JSON.stringify(this.collection.meta)}));
$(this.el).html(this.template({errors: this.collection.toJSON(), meta: this.collection.meta}));
return this;
},
onClickClearLogs: function(e) {
e.preventDefault();

this.collection.fetch({type: 'POST'});
}
});

Expand Down

0 comments on commit 5243544

Please sign in to comment.