From 7c9eb82b7f662813b2c4e6f15a4ae24237efdb49 Mon Sep 17 00:00:00 2001 From: Sven Martinov Date: Sun, 14 Jan 2018 00:18:29 +0100 Subject: [PATCH] Make panels more configureable through attributes --- src/panels/model/Panel.js | 1 + src/panels/view/PanelView.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/panels/model/Panel.js b/src/panels/model/Panel.js index 1ac83c765..cb61f4b87 100644 --- a/src/panels/model/Panel.js +++ b/src/panels/model/Panel.js @@ -8,6 +8,7 @@ module.exports = Backbone.Model.extend({ content: '', visible: true, buttons: [], + attributes: {} }, initialize(options) { diff --git a/src/panels/view/PanelView.js b/src/panels/view/PanelView.js index dd6f689fa..bfb100ed8 100644 --- a/src/panels/view/PanelView.js +++ b/src/panels/view/PanelView.js @@ -29,6 +29,10 @@ module.exports = Backbone.View.extend({ this.$el.html(this.model.get('content')); }, + attributes() { + return this.model.get('attributes'); + }, + initResize() { const em = this.config.em; const editor = em ? em.get('Editor') : '';