[Common] Added tooltips to listview.

This commit is contained in:
Julia Radzhabova 2017-07-12 15:12:41 +03:00
parent 59ec3f7446
commit b4abfccce0

View file

@ -64,6 +64,7 @@ define([
onResetItems : function() {
this.innerEl = null;
Common.UI.DataView.prototype.onResetItems.call(this);
this.trigger('items:reset', this);
},
onAddItem: function(record, index) {
@ -97,6 +98,16 @@ define([
this.listenTo(view, 'dblclick',this.onDblClickItem);
this.listenTo(view, 'select', this.onSelectItem);
if (record.get('tip')) {
var view_el = $(view.el);
view_el.attr('data-toggle', 'tooltip');
view_el.tooltip({
title : record.get('tip'),
placement : 'cursor',
zIndex : this.tipZIndex
});
}
if (!this.isSuspendEvents)
this.trigger('item:add', this, view, record);
}