mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FEATURE: remember last emoji group used
This commit is contained in:
parent
386b0a2587
commit
7bcecb54fd
1 changed files with 6 additions and 2 deletions
|
@ -43,7 +43,6 @@ var closeSelector = function(){
|
|||
var ungroupedIcons;
|
||||
|
||||
var toolbar = function(selected){
|
||||
|
||||
if(!ungroupedIcons){
|
||||
ungroupedIcons = [];
|
||||
var groupedIcons = {};
|
||||
|
@ -108,6 +107,9 @@ var bindEvents = function(page,offset){
|
|||
};
|
||||
|
||||
var render = function(page, offset){
|
||||
localStorage.emojiPage = page;
|
||||
localStorage.emojiOffset = offset;
|
||||
|
||||
var rows = [];
|
||||
var row = [];
|
||||
var icons = groups[page].icons;
|
||||
|
@ -144,7 +146,9 @@ var showSelector = function(){
|
|||
closeSelector();
|
||||
});
|
||||
|
||||
render(0,0);
|
||||
var page = parseInt(localStorage.emojiPage) || 0;
|
||||
var offset = parseInt(localStorage.emojiOffset) || 0;
|
||||
render(page, offset);
|
||||
|
||||
$('body, textarea').on('keydown.emoji', function(e){
|
||||
if(e.which === 27){
|
||||
|
|
Loading…
Reference in a new issue