diff --git a/circle/bower.json b/circle/bower.json index 7be9709..993b0cd 100644 --- a/circle/bower.json +++ b/circle/bower.json @@ -19,6 +19,7 @@ "jquery-simple-slider": "https://github.com/BME-IK/jquery-simple-slider.git", "bootbox": "~4.3.0", "intro.js": "0.9.0", + "emojify": "~0.9.5", "favico.js": "~0.3.5" } } diff --git a/circle/circle/settings/base.py b/circle/circle/settings/base.py index 3a11fef..bf85b8e 100644 --- a/circle/circle/settings/base.py +++ b/circle/circle/settings/base.py @@ -185,6 +185,7 @@ PIPELINE_CSS = { "dashboard/dashboard.less", "network/network.less", "autocomplete_light/style.css", + "emojify/emojify.css", ), "output_filename": "all.css", } @@ -198,6 +199,7 @@ PIPELINE_JS = { "jquery-knob/dist/jquery.knob.min.js", "jquery-simple-slider/js/simple-slider.js", "favico.js/favico.js", + "emojify/emojify.js", "dashboard/dashboard.js", "dashboard/activity.js", "dashboard/group-details.js", diff --git a/circle/dashboard/static/dashboard/dashboard.js b/circle/dashboard/static/dashboard/dashboard.js index fbfcf2e..7b3dad4 100644 --- a/circle/dashboard/static/dashboard/dashboard.js +++ b/circle/dashboard/static/dashboard/dashboard.js @@ -362,6 +362,20 @@ $(function () { li.addClass('panel-primary').find('input').prop("checked", true); return true; }); + + emojify.setConfig({ + 'img_dir': "/static/emojify/images/emoji", + 'ignored_tags': { + 'script': 1, + 'textarea': 1, + 'a': 0, + 'pre': 0, + 'code': 0, + }, + 'ignore_emoticons': true, + }); + + emojify.run(); }); function generateVmHTML(pk, name, host, icon, _status, fav, is_last) { diff --git a/circle/dashboard/static/dashboard/dashboard.less b/circle/dashboard/static/dashboard/dashboard.less index 0aec3d2..40ae2b8 100644 --- a/circle/dashboard/static/dashboard/dashboard.less +++ b/circle/dashboard/static/dashboard/dashboard.less @@ -1217,3 +1217,7 @@ textarea[name="new_members"] { padding: 25px; } } + +.emoji { + max-width: 20px; +}