mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
show ungrouped emojis in tab, remove a few aliases
(I dislike 💩 and :squirrel: made no sense)
TODO: stop using symlinks for aliases
This commit is contained in:
parent
8c6cb734b1
commit
ccdae40913
5 changed files with 33 additions and 3 deletions
|
@ -40,7 +40,32 @@ var closeSelector = function(){
|
|||
$('body, textarea').off('keydown.emoji');
|
||||
};
|
||||
|
||||
var ungroupedIcons;
|
||||
|
||||
var toolbar = function(selected){
|
||||
|
||||
if(!ungroupedIcons){
|
||||
ungroupedIcons = [];
|
||||
var groupedIcons = {};
|
||||
|
||||
_.each(groups, function(group){
|
||||
_.each(group.icons, function(icon){
|
||||
groupedIcons[icon] = true;
|
||||
});
|
||||
});
|
||||
|
||||
var emojis = Discourse.Emoji.list();
|
||||
_.each(emojis,function(emoji){
|
||||
if(groupedIcons[emoji] !== true){
|
||||
ungroupedIcons.push(emoji);
|
||||
}
|
||||
});
|
||||
|
||||
if(ungroupedIcons.length > 0){
|
||||
groups.push({name: 'ungrouped', icons: ungroupedIcons});
|
||||
}
|
||||
}
|
||||
|
||||
return _.map(groups, function(g, i){
|
||||
var row = {src: Discourse.Emoji.urlFor(g.icons[0]), groupId: i};
|
||||
if(i===selected){
|
||||
|
@ -84,7 +109,6 @@ var bindEvents = function(page,offset){
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
var render = function(page, offset){
|
||||
var rows = [];
|
||||
var row = [];
|
||||
|
|
|
@ -10,6 +10,14 @@ Discourse.Dialect.registerEmoji = function(code, url) {
|
|||
_extendedEmoji[code] = url;
|
||||
};
|
||||
|
||||
Discourse.Emoji.list = function(){
|
||||
var copy = emoji.slice(0);
|
||||
_.each(_extendedEmoji, function(v,k){
|
||||
copy.push(k);
|
||||
});
|
||||
return copy;
|
||||
};
|
||||
|
||||
var toSearch;
|
||||
|
||||
var search = function(term, options) {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
unicode/1f4a9.png
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
|
@ -1 +0,0 @@
|
|||
unicode/1f1ec-1f1e7.png
|
Loading…
Reference in a new issue