FIX: make sure there are meaningful titles on the picker
This commit is contained in:
parent
8ef4d6d812
commit
e2e0221dd7
|
@ -139,16 +139,18 @@ export default Ember.Component.extend({
|
|||
this._bindEvents();
|
||||
|
||||
Ember.run.scheduleOnce("afterRender", this, function() {
|
||||
this._loadCategoriesEmojis();
|
||||
this._setDiversity();
|
||||
this._positionPicker();
|
||||
this._scrollTo();
|
||||
this._loadCategoriesEmojis();
|
||||
});
|
||||
},
|
||||
|
||||
_loadCategoriesEmojis() {
|
||||
$.each($picker.find(".categories-column button.emoji"), (_, button) => {
|
||||
this._setButtonBackground(button, false);
|
||||
const $button = $(button);
|
||||
const code = this._codeWithDiversity($button.data("tabicon"), false);
|
||||
$button.css("background-image", `url("${emojiUrlFor(code)}")`);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<div class='categories-column'>
|
||||
<div class='category-icon'>
|
||||
<button type="button" class="emoji" tabindex="-1" title="star" data-section="recent"></button>
|
||||
<button type="button" class="emoji" tabindex="-1" title="{{i18n 'emoji_picker.recent'}}" data-section="recent" data-tabicon="star"></button>
|
||||
</div>
|
||||
|
||||
<% JSON.parse(File.read("lib/emoji/groups.json")).each.with_index do |group, group_index| %>
|
||||
<div class='category-icon'>
|
||||
<button type="button" class="emoji" tabindex="-1" data-section="<%= group["name"] %>" title="<%= group["tabicon"] %>"></button>
|
||||
<button type="button" class="emoji" tabindex="-1" data-tabicon="<%= group["tabicon"] %>" data-section="<%= group["name"] %>" title="<%= group["fullname"] %>"></button>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if !Emoji.custom.blank? %>
|
||||
<div class='category-icon'>
|
||||
<button data-section="ungrouped" type="button" class="emoji" tabindex="-1" title="<%= Emoji.custom.first.name %>"></button>
|
||||
<button data-tabicon="<%= Emoji.custom.first.name %>" type="button" class="emoji" tabindex="-1" data-section="ungrouped" title="{{i18n 'emoji_picker.custom'}}"></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<div class='info'></div>
|
||||
<div class='diversity-picker'>
|
||||
<% ['default', 'light', 'medium-light', 'medium', 'medium-dark', 'dark'].each.with_index do |diversity, index| %>
|
||||
<a href='#' class='diversity-scale <%= diversity %>' data-level="<%= index + 1 %>">
|
||||
<a href='#' title="{{i18n 'emoji_picker.<%= diversity.gsub('-', '_') %>_tone'}}" class='diversity-scale <%= diversity %>' data-level="<%= index + 1 %>">
|
||||
{{fa-icon "check"}}
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
|
@ -1145,6 +1145,12 @@ en:
|
|||
celebration: Celebration
|
||||
custom: Custom emojis
|
||||
recent: Recently used
|
||||
default_tone: No skin tone
|
||||
light_tone: Light skin tone
|
||||
medium_light_tone: Medium light skin tone
|
||||
medium_tone: Medium skin tone
|
||||
medium_dark_tone: Medium dark skin tone
|
||||
dark_tone: Dark skin tone
|
||||
|
||||
composer:
|
||||
emoji: "Emoji :)"
|
||||
|
|
Loading…
Reference in New Issue