|
|
|
|
@ -12,7 +12,7 @@ define([
|
|
|
|
|
// Called when view is rendered.
|
|
|
|
|
this.setElement($("<button />")
|
|
|
|
|
.addClass('btn btn-default'));
|
|
|
|
|
|
|
|
|
|
this.$el.attr("data-toggle", "tooltip");
|
|
|
|
|
this.model.on('change:button_style', function(model, value) {
|
|
|
|
|
this.update_button_style();
|
|
|
|
|
}, this);
|
|
|
|
|
@ -27,6 +27,7 @@ define([
|
|
|
|
|
// Called when the model is changed. The model may have been
|
|
|
|
|
// changed by another view or by a state update from the back-end.
|
|
|
|
|
var description = this.model.get('description');
|
|
|
|
|
this.$el.attr("title", this.model.get("tooltip"));
|
|
|
|
|
if (description.length === 0) {
|
|
|
|
|
this.$el.html(" "); // Preserve button height
|
|
|
|
|
} else {
|
|
|
|
|
|