Show More
@@ -12,7 +12,7 b' define([' | |||
|
12 | 12 | // Called when view is rendered. |
|
13 | 13 | this.setElement($("<button />") |
|
14 | 14 | .addClass('btn btn-default')); |
|
15 | ||
|
15 | this.$el.attr("data-toggle", "tooltip"); | |
|
16 | 16 | this.model.on('change:button_style', function(model, value) { |
|
17 | 17 | this.update_button_style(); |
|
18 | 18 | }, this); |
@@ -27,6 +27,7 b' define([' | |||
|
27 | 27 | // Called when the model is changed. The model may have been |
|
28 | 28 | // changed by another view or by a state update from the back-end. |
|
29 | 29 | var description = this.model.get('description'); |
|
30 | this.$el.attr("title", this.model.get("tooltip")); | |
|
30 | 31 | if (description.length === 0) { |
|
31 | 32 | this.$el.html(" "); // Preserve button height |
|
32 | 33 | } else { |
@@ -29,7 +29,8 b' class Button(DOMWidget):' | |||
|
29 | 29 | _view_name = Unicode('ButtonView', sync=True) |
|
30 | 30 | |
|
31 | 31 | # Keys |
|
32 |
description = Unicode('', help=" |
|
|
32 | description = Unicode('', help="Button label.", sync=True) | |
|
33 | tooltip = Unicode(help="Tooltip caption of the button.", sync=True) | |
|
33 | 34 | disabled = Bool(False, help="Enable or disable user changes.", sync=True) |
|
34 | 35 | |
|
35 | 36 | button_style = CaselessStrEnum( |
General Comments 0
You need to be logged in to leave comments.
Login now