Show More
@@ -76,7 +76,7 b' define([' | |||||
76 | e.preventDefault(); |
|
76 | e.preventDefault(); | |
77 | that.handle_click(); |
|
77 | that.handle_click(); | |
78 | })); |
|
78 | })); | |
79 |
|
79 | this.$el.attr("data-toggle", "tooltip"); | ||
80 | this.model.on('change:button_style', function(model, value) { |
|
80 | this.model.on('change:button_style', function(model, value) { | |
81 | this.update_button_style(); |
|
81 | this.update_button_style(); | |
82 | }, this); |
|
82 | }, this); | |
@@ -113,6 +113,7 b' define([' | |||||
113 | this.$el.prop('disabled', disabled); |
|
113 | this.$el.prop('disabled', disabled); | |
114 |
|
114 | |||
115 | var description = this.model.get('description'); |
|
115 | var description = this.model.get('description'); | |
|
116 | this.$el.attr("title", this.model.get("tooltip")); | |||
116 | if (description.trim().length === 0) { |
|
117 | if (description.trim().length === 0) { | |
117 | this.$el.html(" "); // Preserve button height |
|
118 | this.$el.html(" "); // Preserve button height | |
118 | } else { |
|
119 | } else { |
@@ -38,6 +38,7 b' class ToggleButton(_Bool):' | |||||
38 | """Displays a boolean `value`.""" |
|
38 | """Displays a boolean `value`.""" | |
39 |
|
39 | |||
40 | _view_name = Unicode('ToggleButtonView', sync=True) |
|
40 | _view_name = Unicode('ToggleButtonView', sync=True) | |
|
41 | tooltip = Unicode(help="Tooltip caption of the toggle button.", sync=True) | |||
41 |
|
42 | |||
42 | button_style = CaselessStrEnum( |
|
43 | button_style = CaselessStrEnum( | |
43 | values=['primary', 'success', 'info', 'warning', 'danger', ''], |
|
44 | values=['primary', 'success', 'info', 'warning', 'danger', ''], |
General Comments 0
You need to be logged in to leave comments.
Login now