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