From: Jack Allnutt Date: Fri, 13 Sep 2013 09:26:01 +0000 (+0100) Subject: Sprite the emoticon images X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2766b08a9fe22149d794557eef80e81c8d370252;p=KiwiIRC.git Sprite the emoticon images --- diff --git a/client/assets/css/style.css b/client/assets/css/style.css index f223001..15f88f8 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -115,6 +115,9 @@ html, body { height:100%; } #kiwi .userbox a i { } +/* Emoticons */ +#kiwi .emoticon { display: inline-block; height: 15px; width: 17px; overflow: hidden; font-size: 0; background-repeat: no-repeat; } + /** * Control box diff --git a/client/assets/img/emoticons.png b/client/assets/img/emoticons.png new file mode 100755 index 0000000..7681437 Binary files /dev/null and b/client/assets/img/emoticons.png differ diff --git a/client/assets/img/emoticons/angel.png b/client/assets/img/emoticons/angel.png deleted file mode 100644 index 0cf707b..0000000 Binary files a/client/assets/img/emoticons/angel.png and /dev/null differ diff --git a/client/assets/img/emoticons/angry.png b/client/assets/img/emoticons/angry.png deleted file mode 100644 index 9ae5d18..0000000 Binary files a/client/assets/img/emoticons/angry.png and /dev/null differ diff --git a/client/assets/img/emoticons/aww.png b/client/assets/img/emoticons/aww.png deleted file mode 100644 index 60510bb..0000000 Binary files a/client/assets/img/emoticons/aww.png and /dev/null differ diff --git a/client/assets/img/emoticons/blushing.png b/client/assets/img/emoticons/blushing.png deleted file mode 100644 index ab03ee8..0000000 Binary files a/client/assets/img/emoticons/blushing.png and /dev/null differ diff --git a/client/assets/img/emoticons/confused.png b/client/assets/img/emoticons/confused.png deleted file mode 100644 index 08ba7d3..0000000 Binary files a/client/assets/img/emoticons/confused.png and /dev/null differ diff --git a/client/assets/img/emoticons/cool.png b/client/assets/img/emoticons/cool.png deleted file mode 100644 index cad8379..0000000 Binary files a/client/assets/img/emoticons/cool.png and /dev/null differ diff --git a/client/assets/img/emoticons/creepy.png b/client/assets/img/emoticons/creepy.png deleted file mode 100644 index 5615058..0000000 Binary files a/client/assets/img/emoticons/creepy.png and /dev/null differ diff --git a/client/assets/img/emoticons/crying.png b/client/assets/img/emoticons/crying.png deleted file mode 100644 index 2532976..0000000 Binary files a/client/assets/img/emoticons/crying.png and /dev/null differ diff --git a/client/assets/img/emoticons/cthulhu.png b/client/assets/img/emoticons/cthulhu.png deleted file mode 100644 index fafc4b3..0000000 Binary files a/client/assets/img/emoticons/cthulhu.png and /dev/null differ diff --git a/client/assets/img/emoticons/cute.png b/client/assets/img/emoticons/cute.png deleted file mode 100644 index a883ac3..0000000 Binary files a/client/assets/img/emoticons/cute.png and /dev/null differ diff --git a/client/assets/img/emoticons/cute_winking.png b/client/assets/img/emoticons/cute_winking.png deleted file mode 100644 index ad3383d..0000000 Binary files a/client/assets/img/emoticons/cute_winking.png and /dev/null differ diff --git a/client/assets/img/emoticons/devil.png b/client/assets/img/emoticons/devil.png deleted file mode 100644 index afc5c2c..0000000 Binary files a/client/assets/img/emoticons/devil.png and /dev/null differ diff --git a/client/assets/img/emoticons/frowning.png b/client/assets/img/emoticons/frowning.png deleted file mode 100644 index 79fc0c0..0000000 Binary files a/client/assets/img/emoticons/frowning.png and /dev/null differ diff --git a/client/assets/img/emoticons/gasping.png b/client/assets/img/emoticons/gasping.png deleted file mode 100644 index b6655ce..0000000 Binary files a/client/assets/img/emoticons/gasping.png and /dev/null differ diff --git a/client/assets/img/emoticons/greedy.png b/client/assets/img/emoticons/greedy.png deleted file mode 100644 index a179638..0000000 Binary files a/client/assets/img/emoticons/greedy.png and /dev/null differ diff --git a/client/assets/img/emoticons/grinning.png b/client/assets/img/emoticons/grinning.png deleted file mode 100644 index 85ff915..0000000 Binary files a/client/assets/img/emoticons/grinning.png and /dev/null differ diff --git a/client/assets/img/emoticons/happy.png b/client/assets/img/emoticons/happy.png deleted file mode 100644 index 51cf1a2..0000000 Binary files a/client/assets/img/emoticons/happy.png and /dev/null differ diff --git a/client/assets/img/emoticons/happy_smiling.png b/client/assets/img/emoticons/happy_smiling.png deleted file mode 100644 index 1332686..0000000 Binary files a/client/assets/img/emoticons/happy_smiling.png and /dev/null differ diff --git a/client/assets/img/emoticons/heart.png b/client/assets/img/emoticons/heart.png deleted file mode 100644 index dcd28b9..0000000 Binary files a/client/assets/img/emoticons/heart.png and /dev/null differ diff --git a/client/assets/img/emoticons/irritated.png b/client/assets/img/emoticons/irritated.png deleted file mode 100644 index b03ee1b..0000000 Binary files a/client/assets/img/emoticons/irritated.png and /dev/null differ diff --git a/client/assets/img/emoticons/irritated_2.png b/client/assets/img/emoticons/irritated_2.png deleted file mode 100644 index b682458..0000000 Binary files a/client/assets/img/emoticons/irritated_2.png and /dev/null differ diff --git a/client/assets/img/emoticons/kissing.png b/client/assets/img/emoticons/kissing.png deleted file mode 100644 index 05509de..0000000 Binary files a/client/assets/img/emoticons/kissing.png and /dev/null differ diff --git a/client/assets/img/emoticons/laughing.png b/client/assets/img/emoticons/laughing.png deleted file mode 100644 index edefc95..0000000 Binary files a/client/assets/img/emoticons/laughing.png and /dev/null differ diff --git a/client/assets/img/emoticons/lips_sealed.png b/client/assets/img/emoticons/lips_sealed.png deleted file mode 100644 index 46e4701..0000000 Binary files a/client/assets/img/emoticons/lips_sealed.png and /dev/null differ diff --git a/client/assets/img/emoticons/madness.png b/client/assets/img/emoticons/madness.png deleted file mode 100644 index 1c0946c..0000000 Binary files a/client/assets/img/emoticons/madness.png and /dev/null differ diff --git a/client/assets/img/emoticons/malicious.png b/client/assets/img/emoticons/malicious.png deleted file mode 100644 index 23f2579..0000000 Binary files a/client/assets/img/emoticons/malicious.png and /dev/null differ diff --git a/client/assets/img/emoticons/naww.png b/client/assets/img/emoticons/naww.png deleted file mode 100644 index 3512863..0000000 Binary files a/client/assets/img/emoticons/naww.png and /dev/null differ diff --git a/client/assets/img/emoticons/pouting.png b/client/assets/img/emoticons/pouting.png deleted file mode 100644 index 1a31c50..0000000 Binary files a/client/assets/img/emoticons/pouting.png and /dev/null differ diff --git a/client/assets/img/emoticons/shy.png b/client/assets/img/emoticons/shy.png deleted file mode 100644 index be79df0..0000000 Binary files a/client/assets/img/emoticons/shy.png and /dev/null differ diff --git a/client/assets/img/emoticons/sick.png b/client/assets/img/emoticons/sick.png deleted file mode 100644 index 6f73e2f..0000000 Binary files a/client/assets/img/emoticons/sick.png and /dev/null differ diff --git a/client/assets/img/emoticons/smiling.png b/client/assets/img/emoticons/smiling.png deleted file mode 100644 index 725eef5..0000000 Binary files a/client/assets/img/emoticons/smiling.png and /dev/null differ diff --git a/client/assets/img/emoticons/speechless.png b/client/assets/img/emoticons/speechless.png deleted file mode 100644 index 4fc4246..0000000 Binary files a/client/assets/img/emoticons/speechless.png and /dev/null differ diff --git a/client/assets/img/emoticons/spiteful.png b/client/assets/img/emoticons/spiteful.png deleted file mode 100644 index 195ced8..0000000 Binary files a/client/assets/img/emoticons/spiteful.png and /dev/null differ diff --git a/client/assets/img/emoticons/stupid.png b/client/assets/img/emoticons/stupid.png deleted file mode 100644 index 3fcea49..0000000 Binary files a/client/assets/img/emoticons/stupid.png and /dev/null differ diff --git a/client/assets/img/emoticons/surprised.png b/client/assets/img/emoticons/surprised.png deleted file mode 100644 index 241f50f..0000000 Binary files a/client/assets/img/emoticons/surprised.png and /dev/null differ diff --git a/client/assets/img/emoticons/surprised_2.png b/client/assets/img/emoticons/surprised_2.png deleted file mode 100644 index a1a54e4..0000000 Binary files a/client/assets/img/emoticons/surprised_2.png and /dev/null differ diff --git a/client/assets/img/emoticons/terrified.png b/client/assets/img/emoticons/terrified.png deleted file mode 100644 index fad2e06..0000000 Binary files a/client/assets/img/emoticons/terrified.png and /dev/null differ diff --git a/client/assets/img/emoticons/thumbs_down.png b/client/assets/img/emoticons/thumbs_down.png deleted file mode 100644 index 4f70696..0000000 Binary files a/client/assets/img/emoticons/thumbs_down.png and /dev/null differ diff --git a/client/assets/img/emoticons/thumbs_up.png b/client/assets/img/emoticons/thumbs_up.png deleted file mode 100644 index 2ca0e0d..0000000 Binary files a/client/assets/img/emoticons/thumbs_up.png and /dev/null differ diff --git a/client/assets/img/emoticons/tired.png b/client/assets/img/emoticons/tired.png deleted file mode 100644 index 13f7d12..0000000 Binary files a/client/assets/img/emoticons/tired.png and /dev/null differ diff --git a/client/assets/img/emoticons/tongue_out.png b/client/assets/img/emoticons/tongue_out.png deleted file mode 100644 index 3d154f9..0000000 Binary files a/client/assets/img/emoticons/tongue_out.png and /dev/null differ diff --git a/client/assets/img/emoticons/tongue_out_laughing.png b/client/assets/img/emoticons/tongue_out_laughing.png deleted file mode 100644 index fba5d75..0000000 Binary files a/client/assets/img/emoticons/tongue_out_laughing.png and /dev/null differ diff --git a/client/assets/img/emoticons/tongue_out_left.png b/client/assets/img/emoticons/tongue_out_left.png deleted file mode 100644 index 8015de7..0000000 Binary files a/client/assets/img/emoticons/tongue_out_left.png and /dev/null differ diff --git a/client/assets/img/emoticons/tongue_out_up.png b/client/assets/img/emoticons/tongue_out_up.png deleted file mode 100644 index 46328fb..0000000 Binary files a/client/assets/img/emoticons/tongue_out_up.png and /dev/null differ diff --git a/client/assets/img/emoticons/tongue_out_up_left.png b/client/assets/img/emoticons/tongue_out_up_left.png deleted file mode 100644 index b67b69f..0000000 Binary files a/client/assets/img/emoticons/tongue_out_up_left.png and /dev/null differ diff --git a/client/assets/img/emoticons/unsure.png b/client/assets/img/emoticons/unsure.png deleted file mode 100644 index 7176856..0000000 Binary files a/client/assets/img/emoticons/unsure.png and /dev/null differ diff --git a/client/assets/img/emoticons/unsure_2.png b/client/assets/img/emoticons/unsure_2.png deleted file mode 100644 index a7f5370..0000000 Binary files a/client/assets/img/emoticons/unsure_2.png and /dev/null differ diff --git a/client/assets/img/emoticons/winking.png b/client/assets/img/emoticons/winking.png deleted file mode 100644 index 1e01f94..0000000 Binary files a/client/assets/img/emoticons/winking.png and /dev/null differ diff --git a/client/assets/img/emoticons/winking_grinning.png b/client/assets/img/emoticons/winking_grinning.png deleted file mode 100644 index 5b1d5b7..0000000 Binary files a/client/assets/img/emoticons/winking_grinning.png and /dev/null differ diff --git a/client/assets/img/emoticons/winking_tongue_out.png b/client/assets/img/emoticons/winking_tongue_out.png deleted file mode 100644 index 2a22cf6..0000000 Binary files a/client/assets/img/emoticons/winking_tongue_out.png and /dev/null differ diff --git a/client/assets/src/helpers/utils.js b/client/assets/src/helpers/utils.js index 99378bc..7590785 100644 --- a/client/assets/src/helpers/utils.js +++ b/client/assets/src/helpers/utils.js @@ -367,78 +367,77 @@ function emoticonFromText(str) { var words_in = str.split(' '), words_out = [], i, - pushEmoticon = function (alt, img) { - words_out.push('' + alt + ' '); + emoticon_location = _kiwi.app.get('base_path') + '/assets/img/emoticons.png', + pushEmoticon = function (alt, offset) { + words_out.push('' + alt + ''); }; for (i = 0; i < words_in.length; i++) { switch(words_in[i]) { case ':)': - pushEmoticon(':)', 'smiling.png'); + pushEmoticon(':)', 0); break; case ':(': - pushEmoticon(':(', 'frowning.png'); + pushEmoticon(':(', 25); break; case ':3': - pushEmoticon(':3', 'cute.png'); + pushEmoticon(':3', 50); break; case ';3': - pushEmoticon(';3', 'cute_winking.png'); + pushEmoticon(';3', 75); break; case ':s': - pushEmoticon(':s', 'confused.png'); + pushEmoticon(':s', 100); break; case ';(': - pushEmoticon(';(', 'crying.png'); + pushEmoticon(';(', 125); break; case ';)': - pushEmoticon(';)', 'winking.png'); + pushEmoticon(';)', 150); break; case ';D': - pushEmoticon(';D"', 'winking_grinning.png'); + pushEmoticon(';D"', 175); break; case ':P': - pushEmoticon(':P', 'tongue_out.png'); + pushEmoticon(':P', 200); break; case 'xP': - pushEmoticon('xP', 'tongue_out_laughing.png'); + pushEmoticon('xP', 225); break; case ':o': case ':O': - pushEmoticon(':o', 'gasping.png'); + pushEmoticon(':o', 250); break; case ':D': - pushEmoticon(':D', 'grinning.png'); + pushEmoticon(':D', 275); break; case '^^,': - pushEmoticon('^^,', 'happy.png'); + pushEmoticon('^^,', 300); break; case '<3': - pushEmoticon('<3', 'heart.png'); + pushEmoticon('<3', 325); break; case '>.<': - pushEmoticon('>.<', 'irritated_2.png'); + pushEmoticon('>.<', 348); break; case '>_<': - pushEmoticon('>_<', 'irritated.png'); + pushEmoticon('>_<', 373); break; case 'XD': case 'xD': - pushEmoticon('xD', 'laughing.png'); + pushEmoticon('xD', 398); break; case 'o.0': - pushEmoticon('o.0', 'surprised.png'); + pushEmoticon('o.0', 423); break; case '0.o': - pushEmoticon('0.o', 'surprised_2.png'); + pushEmoticon('0.o', 448); break; case ':\\': case '=\\': - pushEmoticon(':\\', 'unsure.png'); - break; case ':/': case '=/': - pushEmoticon(':/', 'unsure_2.png'); + pushEmoticon(':\\', 473); break; default: words_out.push(words_in[i]);