diff options
Diffstat (limited to 'module/web/static/js/views/accounts/accountView.js')
-rw-r--r-- | module/web/static/js/views/accounts/accountView.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/module/web/static/js/views/accounts/accountView.js b/module/web/static/js/views/accounts/accountView.js new file mode 100644 index 000000000..7c3d492c3 --- /dev/null +++ b/module/web/static/js/views/accounts/accountView.js @@ -0,0 +1,24 @@ +define(['jquery', 'underscore', 'backbone', 'app', '../abstract/itemView'], + function($, _, Backbone, App, itemView) { + + // Renders settings over view page + return itemView.extend({ + + tagName: "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; + } + }); + });
\ No newline at end of file |