Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
MOBILE-808 messages: Fixed message sent formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Dec 26, 2014
1 parent 5e9823b commit fb89545
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/messages/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,19 @@ define(requires, function (messagesTpl, recentTpl, conversationTpl, contactTpl,

$('#message-send-form').on('submit', function(e) {
e.preventDefault();
var message = $(this).find("#message-text").val();
var originalMessage = $(this).find("#message-text").val();

$("#message-text").val("");
conversationArea = $(".conversation-area");
messageId = hex_md5(message + MM.util.timestamp());

message = '<div id="' + messageId + '" class="bubble bubble-alt">' + MM.util.formatText(message, true);
var message = '<div id="' + messageId + '" class="bubble bubble-alt">' + MM.util.formatText(originalMessage, true);
message += '<span class="time"><span class="app-ico tick-gray"><img width="10" src="img/sent.png"></span></span></div>';
conversationArea.append(message);
// Scroll bottom.
conversationArea.scrollTop(conversationArea.prop("scrollHeight"));

MM.plugins.messages._sendMessage(userId, message,
MM.plugins.messages._sendMessage(userId, originalMessage,
function(m) {
$("#" + messageId).addClass("removeMessage");
$("#message-text").val("");
Expand All @@ -221,7 +221,7 @@ define(requires, function (messagesTpl, recentTpl, conversationTpl, contactTpl,
// Uggly hack.
var fixFactor = 115;
if (MM.deviceType == "tablet") {
fixFactor = 65;
fixFactor = 45;
} else if (MM.deviceOS == "ios") {
fixFactor = 20;
}
Expand Down

0 comments on commit fb89545

Please sign in to comment.