mirror of https://github.com/keeweb/keeweb.git
21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
const Backbone = require('backbone');
|
|
|
|
const ListWrapView = Backbone.View.extend({
|
|
events: {},
|
|
|
|
initialize: function() {
|
|
this.listenTo(this.model.settings, 'change:tableView', this.setListLayout);
|
|
},
|
|
|
|
render: function() {
|
|
this.setListLayout();
|
|
},
|
|
|
|
setListLayout: function() {
|
|
const tableView = this.model.settings.get('tableView');
|
|
this.$el.toggleClass('app__list-wrap--table', tableView);
|
|
}
|
|
});
|
|
|
|
module.exports = ListWrapView;
|