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