Browse Source

Custom tag for buttons in Panels module. Closes #1787

pull/1800/head
Artur Arseniev 7 years ago
parent
commit
2972a32890
  1. 1
      src/panels/model/Button.js
  2. 4
      src/panels/view/ButtonView.js

1
src/panels/model/Button.js

@ -4,6 +4,7 @@ module.exports = Backbone.Model.extend({
defaults: {
id: '',
label: '',
tagName: 'span',
className: '',
command: '',
context: '',

4
src/panels/view/ButtonView.js

@ -3,7 +3,9 @@ import { isString, isObject, isFunction } from 'underscore';
const $ = Backbone.$;
module.exports = Backbone.View.extend({
tagName: 'span',
tagName() {
return this.model.get('tagName');
},
events: {
click: 'clicked'

Loading…
Cancel
Save