Commit 4c0d4f2a authored by JC Brand's avatar JC Brand

bugfix. Fixes #26. Only the first minute digit was shown.

parent a2b819b9
...@@ -7,6 +7,7 @@ Changelog ...@@ -7,6 +7,7 @@ Changelog
- #23 Add Italian translations [ctrlaltca] - #23 Add Italian translations [ctrlaltca]
- #24 Add Spanish translations [macagua] - #24 Add Spanish translations [macagua]
- #25 Using span with css instead of img [matheus-morfi] - #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) 0.4 (2013-06-03)
---------------- ----------------
......
...@@ -15,29 +15,18 @@ span.spinner { ...@@ -15,29 +15,18 @@ span.spinner {
display: block; display: block;
} }
span.spinner.hor_centered { span.spinner.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 {
position: absolute; position: absolute;
top: 30%; top: 30%;
left: 50%; left: 50%;
margin: 0 0 0 -25%; margin: 0 0 0 -25%;
} }
span.spinner.hor_centered {
left: 40%;
position: absolute;
}
#chatpanel { #chatpanel {
z-index: 99; /*--Keeps the panel on top of all other elements--*/ z-index: 99; /*--Keeps the panel on top of all other elements--*/
position: fixed; position: fixed;
......
...@@ -313,6 +313,7 @@ ...@@ -313,6 +313,7 @@
match = text.match(/^\/(.*?)(?: (.*))?$/), match = text.match(/^\/(.*?)(?: (.*))?$/),
sender = msg_dict.sender, sender = msg_dict.sender,
template, username; template, username;
if ((match) && (match[1] === 'me')) { if ((match) && (match[1] === 'me')) {
text = text.replace(/^\/me/, ''); text = text.replace(/^\/me/, '');
template = this.action_template; template = this.action_template;
...@@ -325,7 +326,7 @@ ...@@ -325,7 +326,7 @@
$el.append( $el.append(
template({ template({
'sender': sender, 'sender': sender,
'time': this_date.toLocaleTimeString().substring(0,4), 'time': this_date.getHours()+':'+this_date.getMinutes(),
'message': text, 'message': text,
'username': username, 'username': username,
'extra_classes': msg_dict.delayed && 'delayed' || '' 'extra_classes': msg_dict.delayed && 'delayed' || ''
......
...@@ -498,8 +498,11 @@ ...@@ -498,8 +498,11 @@
expect(msg_obj.get('delayed')).toEqual(false); expect(msg_obj.get('delayed')).toEqual(false);
// Now check that the message appears inside the // Now check that the message appears inside the
// chatbox in the DOM // chatbox in the DOM
var txt = chatboxview.$el.find('.chat-content').find('.chat-message').find('.chat-message-content').text(); var $chat_content = chatboxview.$el.find('.chat-content');
expect(txt).toEqual(message); 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));
}, converse)); }, converse));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment