From 876f7c38b75f083ed4fc63bcd183572c381d81e3 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 24 Jul 2013 22:58:53 +0200 Subject: [PATCH] bugfix. Fixes #26. Only the first minute digit was shown. Conflicts: CHANGES.rst --- CHANGES.rst | 11 ++++++++++- converse.css | 23 ++++++----------------- converse.js | 3 ++- spec/MainSpec.js | 7 +++++-- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e1345b2e9..d1d2b9845 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,16 @@ Changelog ========= -0.4 (Unreleased) +0.5 (Unreleased) +---------------- + +- #22 Fixed compare operator in strophe.muc [sonata82] +- #23 Add Italian translations [ctrlaltca] +- #24 Add Spanish translations [macagua] +- #25 Using span with css instead of img [matheus-morfi] +- #26 Only the first minute digit shown in chatbox. [jcbrand] + +0.4 (2013-06-03) ---------------- - CSS tweaks: fixed overflowing text in status message and chatrooms list. [jcbrand] diff --git a/converse.css b/converse.css index 59b6e1931..497905b73 100644 --- a/converse.css +++ b/converse.css @@ -15,29 +15,18 @@ span.spinner { display: block; } -span.spinner.hor_centered { - left: 40%; - position: absolute; -} - - -img.spinner { - width: auto; - border: none; - box-shadow: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - margin: 0; - padding: 0 5px 0 5px; -} - -img.centered { +span.spinner.centered { position: absolute; top: 30%; left: 50%; margin: 0 0 0 -25%; } +span.spinner.hor_centered { + left: 40%; + position: absolute; +} + #chatpanel { z-index: 99; /*--Keeps the panel on top of all other elements--*/ position: fixed; diff --git a/converse.js b/converse.js index 18df1ea37..c80217f1f 100644 --- a/converse.js +++ b/converse.js @@ -313,6 +313,7 @@ match = text.match(/^\/(.*?)(?: (.*))?$/), sender = msg_dict.sender, template, username; + if ((match) && (match[1] === 'me')) { text = text.replace(/^\/me/, ''); template = this.action_template; @@ -325,7 +326,7 @@ $el.append( template({ 'sender': sender, - 'time': this_date.toLocaleTimeString().substring(0,4), + 'time': this_date.getHours()+':'+this_date.getMinutes(), 'message': text, 'username': username, 'extra_classes': msg_dict.delayed && 'delayed' || '' diff --git a/spec/MainSpec.js b/spec/MainSpec.js index cf7ed6303..ac282d3a6 100644 --- a/spec/MainSpec.js +++ b/spec/MainSpec.js @@ -498,8 +498,11 @@ expect(msg_obj.get('delayed')).toEqual(false); // Now check that the message appears inside the // chatbox in the DOM - var txt = chatboxview.$el.find('.chat-content').find('.chat-message').find('.chat-message-content').text(); - expect(txt).toEqual(message); + var $chat_content = chatboxview.$el.find('.chat-content'); + var msg_txt = $chat_content.find('.chat-message').find('.chat-message-content').text(); + expect(msg_txt).toEqual(message); + var sender_txt = $chat_content.find('span.chat-message-them').text(); + expect(sender_txt.match(/^[0-9][0-9]:[0-9][0-9] /)).toBeTruthy(); }, converse)); }, converse));