Merge branch 'no-spritesheet' into 'master'

The spritesheet should only load when an award emoji picker is opened.

This makes sure that the emoji spritesheet is loaded **only** when the emoji picker is opened. This saves 250-650KB on every page load.

Prevents !3785 from reverting the fix from !3449.

cc: @jschatz1 @zj @fatihacet 

See merge request !4469
This commit is contained in:
Jacob Schatz 2016-06-03 19:46:03 +00:00
commit 9aca0a1f96

View file

@ -2,7 +2,7 @@
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: url_for([:toggle_award_emoji, @project.namespace.becomes(Namespace), @project, awardable]) } }
- awards_sort(grouped_emojis).each do |emoji, awards|
%button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", class: (award_active_class(awards, current_user)), data: { placement: "bottom", title: award_user_list(awards, current_user) } }
= emoji_icon(emoji)
= emoji_icon(emoji, sprite: false)
%span.award-control-text.js-counter
= awards.count