From 355e62eb498de90f91ac129af94d4a0f2ec6b129 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Thu, 24 Dec 2015 16:35:45 +0200 Subject: [PATCH] added default for frequently used emojis --- CHANGELOG | 5 ++--- app/assets/javascripts/awards_handler.coffee | 16 +++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 41e09f8b992..207b2bb1ba1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,12 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.4.0 (unreleased) - - Add "Frequently used" category to emoji picker - -v 8.3.0 (unreleased) - Fix Error 500 when doing a search in dashboard before visiting any project (Stan Hu) - Implement new UI for group page - Implement search inside emoji picker - Add project permissions to all project API endpoints (Stan Hu) + - Add "Frequently used" category to emoji picker + v 8.3.0 - Add CAS support (tduehr) diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index bb17427852d..04bf5cc7bb5 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -127,19 +127,21 @@ class @AwardsHandler getFrequentlyUsedEmojis: -> frequently_used_emojis = ($.cookie('frequently_used_emojis') || "").split(",") + + frequently_used_emojis = ["thumbsup", "thumbsdown"].concat(frequently_used_emojis) + _.compact(_.uniq(frequently_used_emojis)) renderFrequentlyUsedBlock: -> - if $.cookie('frequently_used_emojis') - frequently_used_emojis = @getFrequentlyUsedEmojis() + frequently_used_emojis = @getFrequentlyUsedEmojis() - ul = $("