Skip to content

Commit

Permalink
Merge pull request 'Update hints in listview (change field name in pi…
Browse files Browse the repository at this point in the history
…vot table)' (#10) from fix/bugfix into release/v8.2.0

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/web-apps/pulls/10
  • Loading branch information
Julia Radzhabova committed Sep 5, 2024
2 parents 11fed99 + 3480e0f commit 2fe5d33
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions apps/common/main/lib/component/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ define([
this.listenTo(view, 'click', this.onClickItem);
this.listenTo(view, 'dblclick',this.onDblClickItem);
this.listenTo(view, 'select', this.onSelectItem);
this.listenTo(view, 'tipchange', this.onChangeTip);

if (record.get('tip')) {
var view_el = $(view.el);
Expand Down Expand Up @@ -313,6 +314,22 @@ define([
innerEl.scrollTop(newpos);
}
}
},

onChangeTip: function(item) {
var el = item.$el || $(item.el),
tip = el.data('bs.tooltip'),
record = item.model;
if (tip)
tip.updateTitle(record.get('tip') || '');
else if (record.get('tip')) {
el.attr('data-toggle', 'tooltip');
el.tooltip({
title : record.get('tip'),
placement : 'cursor',
zIndex : this.tipZIndex
});
}
}
}
})());
Expand Down

0 comments on commit 2fe5d33

Please sign in to comment.