summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/views/accounts/accountView.js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/static/js/views/accounts/accountView.js')
-rw-r--r--module/web/static/js/views/accounts/accountView.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/module/web/static/js/views/accounts/accountView.js b/module/web/static/js/views/accounts/accountView.js
index f310e4cc2..7d6306523 100644
--- a/module/web/static/js/views/accounts/accountView.js
+++ b/module/web/static/js/views/accounts/accountView.js
@@ -1,18 +1,23 @@
-define(['jquery', 'underscore', 'backbone', 'app'],
- function($, _, Backbone, App) {
+define(['jquery', 'underscore', 'backbone', 'app', '../abstract/itemView'],
+ function($, _, Backbone, App, itemView) {
// Renders settings over view page
- return Backbone.View.extend({
+ return itemView.extend({
- el: "li",
+ el: "tr",
+ template: _.compile($('#template-account').html()),
events: {
+ 'click .btn-danger': 'deleteItem'
},
initialize: function() {
+ this.listenTo(this.model, 'remove', this.unrender);
+ this.listenTo(App.vent, 'accounts:destroyContent', this.destroy);
},
render: function() {
+ this.$el.html(this.template(this.model.toJSON()));
return this;
}
});