Skip to content

Commit

Permalink
Merge pull request #910 from hplato/ia7
Browse files Browse the repository at this point in the history
v2.0.202
  • Loading branch information
hplato authored Sep 24, 2024
2 parents 35f44fa + d809b8a commit b43e0c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions web/ia7/include/javascript.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

var ia7_ver = "v2.2.200";
var ia7_ver = "v2.2.202";
var coll_ver = "";
var entity_store = {}; //global storage of entities
var json_store = {};
Expand Down Expand Up @@ -1269,13 +1269,17 @@ var loadList = function() {
var generateTooltips = function () {
if ((show_tooltips) && (mobile_device() == "no") ){ //no sense in having tooltips on a touch device
$(".btn").each(function( index ) {
//console.log($(this).text()+' >0 1='+$(this)[0].scrollWidth+' > 2='+$(this).outerWidth());
if ($(this)[0].scrollWidth > 0) {
//if scrollWidth is greater than outerWidth then bootstrap has truncated the button text
if ($(this)[0].scrollWidth > $(this).outerWidth()) {
$(this).attr('data-toggle', 'tooltip');
$(this).attr('data-placement', 'auto bottom');
$(this).attr('data-original-title', $(this).text());
$(this).attr('title', $(this).text());
var lngth = $(this).find('.object-state').text().length;
var txt = $(this).text().slice(0,(-1 * lngth));
//console.log("text="+$(this).text()+' objectstate='+$(this).find('.object-state').text()+' txt='+txt+' length='+lngth);
$(this).attr('data-original-title', txt);
$(this).attr('title', txt);
} else {
$(this).attr('data-original-title', '');
$(this).attr('title', '');
Expand Down

0 comments on commit b43e0c5

Please sign in to comment.