UX: emoji toolbar improvements
This commit is contained in:
parent
7518918b8f
commit
a45e87746e
|
@ -141,8 +141,16 @@ var toolbar = function(selected){
|
|||
if (!recentlyUsedIcons) { initializeRecentlyUsedIcons(); }
|
||||
|
||||
return _.map(groups, function(g, i){
|
||||
var icon = g.name === "recent" ? "star2" : g.icons[0];
|
||||
var row = {src: Discourse.Emoji.urlFor(icon), groupId: i};
|
||||
var icon = g.tabicon;
|
||||
var title = g.fullname;
|
||||
if (g.name === "recent") {
|
||||
icon = "star2";
|
||||
title = "Recent"
|
||||
} else if (g.name === "ungrouped") {
|
||||
icon = g.icons[0];
|
||||
title = "Custom"
|
||||
}
|
||||
var row = {src: Discourse.Emoji.urlFor(icon), title: title, groupId: i};
|
||||
if(i === selected){
|
||||
row.selected = true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class='emoji-modal'>
|
||||
<ul class='toolbar'>
|
||||
{{#each item in toolbarItems}}<li><a {{#if item.selected}}class='selected'{{/if}} data-group-id='{{item.groupId}}'><img src='{{item.src}}' class='emoji'></a></li>{{/each}}
|
||||
{{#each item in toolbarItems}}<li><a title='{{item.title}}' {{#if item.selected}}class='selected'{{/if}} data-group-id='{{item.groupId}}'><img src='{{item.src}}' class='emoji'></a></li>{{/each}}
|
||||
</ul>
|
||||
<div class='emoji-table-wrapper'>
|
||||
<table class='emoji-page'>
|
||||
|
|
Loading…
Reference in New Issue