diff --git a/templates/channeloptions.pug b/templates/channeloptions.pug index 3527dd87..dfff94e1 100644 --- a/templates/channeloptions.pug +++ b/templates/channeloptions.pug @@ -179,12 +179,22 @@ mixin emotes .form-group .col-sm-8.col-sm-offset-4 button#cs-emotes-newsubmit.btn.btn-primary Create Emote - table.table.table-striped.table-condensed + form.form-inline + .form-group + input.emotelist-search.form-control(type="text", placeholder="Search") + .form-group + .checkbox + label + input.emotelist-alphabetical(type="checkbox") + | Sort alphabetically + .emotelist-paginator-container + table.emotelist-table.table.table-striped.table-condensed thead tr th Delete th Name th Image + tbody button#cs-emotes-export.btn.btn-default Export emote list button#cs-emotes-import.btn.btn-default Import emote list diff --git a/www/js/callbacks.js b/www/js/callbacks.js index 30223e80..c732e1ce 100644 --- a/www/js/callbacks.js +++ b/www/js/callbacks.js @@ -969,10 +969,8 @@ Callbacks = { emoteList: function (data) { loadEmotes(data); - var tbl = $("#cs-emotes table"); - tbl.data("entries", data); - formatCSEmoteList(); EMOTELIST.handleChange(); + CSEMOTELIST.handleChange(); }, updateEmote: function (data) { @@ -982,15 +980,16 @@ Callbacks = { if (CHANNEL.emotes[i].name === data.name) { found = true; CHANNEL.emotes[i] = data; - formatCSEmoteList(); break; } } if (!found) { CHANNEL.emotes.push(data); - formatCSEmoteList(); } + + EMOTELIST.handleChange(); + CSEMOTELIST.handleChange(); }, removeEmote: function (data) { diff --git a/www/js/util.js b/www/js/util.js index d2564c40..11ca1072 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -2477,58 +2477,6 @@ function formatCSChatFilterList() { }); } -function formatCSEmoteList() { - var tbl = $("#cs-emotes table"); - tbl.find("tbody").remove(); - var entries = CHANNEL.emotes || []; - entries.forEach(function (f) { - var tr = $("").appendTo(tbl); - var del = $("