Skip to content

Commit

Permalink
Merge pull request maximilianh#181 from mxposed/fix-selection
Browse files Browse the repository at this point in the history
Fix tooltip update on select changes
  • Loading branch information
maximilianh committed Jun 15, 2020
2 parents e854919 + 25ca657 commit f16fe15
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/cbPyLib/cellbrowser/cbWeb/js/cellBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5181,19 +5181,21 @@ var cellbrowser = function() {
gLegend.selectionDirection = "none";
checkbox.html("☒");
// from https://stackoverflow.com/questions/9501921/change-twitter-bootstrap-tooltip-content-on-click
checkbox.attr('title', "unselect all checkboxes below")
.bsTooltip('fixTitle')
.data('bs.tooltip')
.$tip.find('.tooltip-inner')
checkbox.attr('title', "unselect all checkboxes below");
var tip = checkbox.bsTooltip('fixTitle').data('bs.tooltip').$tip;
if (tip) {
tip.find('.tooltip-inner')
.text("unselect all checkboxes below");
}
} else if (gLegend.selectionDirection == "none" && selected === 0) {
gLegend.selectionDirection = "all";
checkbox.html("☑");
checkbox.attr('title', "select all checkboxes below")
.bsTooltip('fixTitle')
.data('bs.tooltip')
.$tip.find('.tooltip-inner')
checkbox.attr('title', "select all checkboxes below");
var tip = checkbox.bsTooltip('fixTitle').data('bs.tooltip').$tip;
if (tip) {
tip.find('.tooltip-inner')
.text("select all checkboxes below");
}
}
}

Expand Down

0 comments on commit f16fe15

Please sign in to comment.