add powertips to friends
This commit is contained in:
parent
042a68d2cb
commit
99ec5e2d86
|
@ -394,8 +394,9 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
|
|||
});
|
||||
|
||||
function userPowertips() {
|
||||
$('a.ulpt').removeClass('ulpt').powerTip({
|
||||
placement: 's',
|
||||
$('a.ulpt').removeClass('ulpt').each(function() {
|
||||
$(this).powerTip({
|
||||
placement: $(this).data('placement') || 's',
|
||||
smartPlacement: true,
|
||||
mouseOnToPopup: true,
|
||||
closeDelay: 200
|
||||
|
@ -409,6 +410,7 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
|
|||
});
|
||||
}
|
||||
}).data('powertip', ' ');
|
||||
});
|
||||
}
|
||||
setTimeout(userPowertips, 600);
|
||||
$('body').on('lichess.content_loaded', userPowertips);
|
||||
|
@ -1397,6 +1399,7 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
|
|||
this.$nbTotal.text(this.nb);
|
||||
this.$nobody.toggle(this.users.length == 0);
|
||||
this.$list.html(_.map(this.users, this._renderUser).join(""));
|
||||
$('body').trigger('lichess.content_loaded');
|
||||
},
|
||||
set: function(data) {
|
||||
this.nb = data['nb'];
|
||||
|
@ -1412,7 +1415,7 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
|
|||
this.repaint();
|
||||
},
|
||||
_renderUser: function(user) {
|
||||
return '<a href="/@/' + user + '">' + user + '</a>';
|
||||
return '<a class="ulpt" data-placement="nw" href="/@/' + user + '">' + user + '</a>';
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1795,6 +1798,7 @@ var lichess_sri = Math.random().toString(36).substring(5); // 8 chars
|
|||
} else {
|
||||
var values = [min, max];
|
||||
}
|
||||
|
||||
function isInvalid(values) {
|
||||
var vmin = parseInt(values[0]);
|
||||
var vmax = parseInt(values[1]);
|
||||
|
|
Loading…
Reference in a new issue