[Common] Added tooltips to listview.
This commit is contained in:
parent
59ec3f7446
commit
b4abfccce0
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue