Fix avatar chooser alignment

This commit is contained in:
Guangcong Luo
2016-04-04 22:59:04 -04:00
parent 621f4e9c9b
commit 53fe975beb

View File

@@ -589,8 +589,8 @@
buf += '<div class="avatarlist">';
for (var i = 1; i <= 293; i++) {
var offset = '-' + (((i - 1) % 16) * 80) + 'px -' + (Math.floor((i - 1) / 16) * 80) + 'px';
buf += '<button name="setAvatar" value="' + i + '" style="background-position:' + offset + '"' + (i === cur ? ' class="cur"' : '') + '></button>';
var offset = '-' + (((i - 1) % 16) * 80 + 1) + 'px -' + (Math.floor((i - 1) / 16) * 80 + 1) + 'px';
buf += '<button name="setAvatar" value="' + i + '" style="background-position:' + offset + '"' + (i === cur ? ' class="cur"' : '') + ' title="/avatar ' + i + '"></button>';
}
buf += '</div><div style="clear:left"></div>';