Browse Source

added shortname emoji support

Akira Laine 9 years ago
parent
commit
9790088f14
5 changed files with 7 additions and 2 deletions
  1. 1 0
      app/.meteor/packages
  2. 1 0
      app/.meteor/versions
  3. 1 1
      app/client/client.js
  4. 3 1
      app/client/templates/room.html
  5. 1 0
      app/server/server.js

+ 1 - 0
app/.meteor/packages

@@ -30,3 +30,4 @@ http
 zimme:iron-router-active
 zimme:iron-router-active
 momentjs:moment
 momentjs:moment
 copleykj:livestamp
 copleykj:livestamp
+emojione:emojione

+ 1 - 0
app/.meteor/versions

@@ -30,6 +30,7 @@ ecmascript@0.1.6
 ecmascript-runtime@0.2.6
 ecmascript-runtime@0.2.6
 ejson@1.0.7
 ejson@1.0.7
 email@1.0.8
 email@1.0.8
+emojione:emojione@1.5.2
 es5-shim@4.1.14
 es5-shim@4.1.14
 facebook@1.2.2
 facebook@1.2.2
 fastclick@1.0.7
 fastclick@1.0.7

+ 1 - 1
app/client/client.js

@@ -327,7 +327,7 @@ Template.room.events({
     "keyup #chat-input": function(e) {
     "keyup #chat-input": function(e) {
         if (e.type == "keyup" && e.which == 13) {
         if (e.type == "keyup" && e.which == 13) {
             e.preventDefault();
             e.preventDefault();
-            sendMessage();
+            sendMessage()
         }
         }
     },
     },
     "click #like": function(e) {
     "click #like": function(e) {

+ 3 - 1
app/client/templates/room.html

@@ -113,7 +113,9 @@
                         <div class="tab-pane" id="chat">
                         <div class="tab-pane" id="chat">
                             <ul id="chat-ul">
                             <ul id="chat-ul">
                                 {{#each chat}}
                                 {{#each chat}}
-                                    <li class="chat-message"><small class="rank-{{this.rawrank}}">{{this.rank}}</small> <a style="text-decoration: none" href="/u/{{this.username}}" target="_blank"><b class="bold">{{this.username}}</b></a> <span data-livestamp="{{time}}" title="{{time}}" style="float: right;"></span> <br/>{{this.message}}</li>
+                                    {{#emojione}}
+                                        <li class="chat-message"><small class="rank-{{this.rawrank}}">{{this.rank}}</small> <a style="text-decoration: none" href="/u/{{this.username}}" target="_blank"><b class="bold">{{this.username}}</b></a> <span data-livestamp="{{time}}" title="{{time}}" style="float: right;"></span> <br/>{{this.message}}</li>
+                                    {{/emojione}}
                                     <hr>
                                     <hr>
                                 {{/each}}
                                 {{/each}}
                             </ul>
                             </ul>

+ 1 - 0
app/server/server.js

@@ -8,6 +8,7 @@ Meteor.startup(function() {
             createRoom(stations[i].display, stations[i].tag);
             createRoom(stations[i].display, stations[i].tag);
         }
         }
     }
     }
+    emojione.ascii = true;
 });
 });
 
 
 Alerts.update({active: true}, {$set: {active: false}}, { multi: true });
 Alerts.update({active: true}, {$set: {active: false}}, { multi: true });