Commit 7b944575048330509c82005cfc9290bde400be5a

Authored by Daniela Feitosa
Committed by Antonio Terceiro
1 parent 72d99983

Time of chat now display the left zero of minutes

(ActionItem1679)
Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
public/javascripts/chat.js
@@ -70,7 +70,7 @@ jQuery(function($) { @@ -70,7 +70,7 @@ jQuery(function($) {
70 } 70 }
71 else { 71 else {
72 var time = new Date(); 72 var time = new Date();
73 - time = time.getHours() + ':' + time.getMinutes(); 73 + time = time.getHours() + ':' + checkTime(time.getMinutes());
74 name = $('#' + jid_id).html(); 74 name = $('#' + jid_id).html();
75 identifier = Strophe.getNodeFromJid(jid); 75 identifier = Strophe.getNodeFromJid(jid);
76 if (who === "self") { 76 if (who === "self") {
@@ -418,3 +418,10 @@ jQuery(function($) { @@ -418,3 +418,10 @@ jQuery(function($) {
418 }); 418 });
419 419
420 }); 420 });
  421 +
  422 +function checkTime(i) {
  423 + if (i<10) {
  424 + i="0" + i;
  425 + }
  426 + return i;
  427 +}