bug fix in time-slice
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: msg.py
|
||||
# Date: Mon Dec 22 21:56:45 2014 +0800
|
||||
# Date: Mon Dec 22 23:04:02 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
+5
-2
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: msgslice.py
|
||||
# Date: Mon Dec 22 22:24:32 2014 +0800
|
||||
# Date: Mon Dec 22 23:07:02 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
class MessageSlicer(object):
|
||||
@@ -25,7 +25,10 @@ class MessageSlicer(object):
|
||||
continue
|
||||
|
||||
ret.append(now)
|
||||
now = []
|
||||
now = [m]
|
||||
ret.append(now)
|
||||
|
||||
assert len(msgs) == sum([len(k) for k in ret])
|
||||
return ret
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: UTF-8 -*-
|
||||
# File: render.py
|
||||
# Date: Mon Dec 22 22:48:32 2014 +0800
|
||||
# Date: Mon Dec 22 23:07:05 2014 +0800
|
||||
# Author: Yuxin Wu <[email protected]>
|
||||
|
||||
import os
|
||||
@@ -138,7 +138,7 @@ class HTMLRender(object):
|
||||
nowtime = slice[0].createTime
|
||||
if idx == 0 or \
|
||||
slices[idx - 1][0].createTime.date() != nowtime.date():
|
||||
timestr = nowtime
|
||||
timestr = nowtime.strftime("%m/%d %H:%M:%S")
|
||||
else:
|
||||
timestr = nowtime.strftime("%H:%M:%S")
|
||||
blocks.append(self.time_html.format(time=timestr))
|
||||
|
||||
+3
-70
@@ -1081,12 +1081,6 @@ a.btnSecondary:active {
|
||||
.hasSysScroll.chatPanel .chatListColumn .desc {
|
||||
width: 135px;
|
||||
}
|
||||
.chatPanel .chatListColumn .time {
|
||||
font-size: 12px;
|
||||
color: #47778D;
|
||||
margin-top: 3px;
|
||||
text-shadow: none;
|
||||
}
|
||||
.chatPanel .chatListColumn .mute {
|
||||
height: 19px;
|
||||
width: 17px;
|
||||
@@ -1217,9 +1211,6 @@ a.btnSecondary:active {
|
||||
.chatPanel .listContent div.activeColumn .desc {
|
||||
color: #FFF;
|
||||
}
|
||||
.chatPanel .listContent div.activeColumn .time {
|
||||
color: #FFF;
|
||||
}
|
||||
.chatPanel .listContent .desc img {
|
||||
margin-bottom: -7px;
|
||||
margin-top: -2px;
|
||||
@@ -1232,12 +1223,6 @@ a.btnSecondary:active {
|
||||
height: 73px;
|
||||
background: url(../images/bg_chat_listclick_blue1844c2.png) 0px 0px;
|
||||
}
|
||||
.chatPanel .activeColumn .nickName,
|
||||
.chatPanel .activeColumn .desc,
|
||||
.chatPanel .activeColumn .time,
|
||||
.chatPanel .activeColumn .lightText {
|
||||
/*color:#fff; text-shadow:0 -1px 0 #3e627e; */
|
||||
}
|
||||
.chatPanel .activeColumn .edited {
|
||||
display: none;
|
||||
}
|
||||
@@ -1318,17 +1303,17 @@ a.btnSecondary:active {
|
||||
position: relative;
|
||||
_position: static;
|
||||
}
|
||||
.chatItem .time {
|
||||
.time {
|
||||
font-size: 12px;
|
||||
padding: 2px 0;
|
||||
margin: 0px auto 10px;
|
||||
width: 100px;
|
||||
width: 145px;
|
||||
border-radius: 20px;
|
||||
color: #7f7f7f;
|
||||
/*background-color:#EEE;*/
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
.chatItem .time .timeBg {
|
||||
.time .timeBg {
|
||||
height: 1px;
|
||||
width: 27px;
|
||||
margin-top: 8px;
|
||||
@@ -1572,9 +1557,6 @@ a.btnSecondary:active {
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
.cloudVoice .replyVoice {
|
||||
position: absolute;
|
||||
}
|
||||
.systemTip {
|
||||
display: block;
|
||||
width: 300px;
|
||||
@@ -5124,14 +5106,6 @@ a.btnBlue:active .btnBluePanel {
|
||||
-o-text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.popupPhotoAlbumPanel .friendCirRPanel .comments .commentPanel .reply {
|
||||
color: #5E749B;
|
||||
font-size: 12px;
|
||||
}
|
||||
.popupPhotoAlbumPanel .friendCirRPanel .comments .commentPanel .time {
|
||||
color: #A6A6A6;
|
||||
font-size: 12px;
|
||||
}
|
||||
/*friendCircle end*/
|
||||
/*feedback*/
|
||||
.feedbackWin {
|
||||
@@ -5169,9 +5143,6 @@ a.btnBlue:active .btnBluePanel {
|
||||
.cloudVoice {
|
||||
cursor: pointer;
|
||||
}
|
||||
.cloudVoice .replyVoice {
|
||||
position: absolute;
|
||||
}
|
||||
.cloudText img {
|
||||
vertical-align: text-bottom;
|
||||
margin-bottom: -5px;
|
||||
@@ -5321,10 +5292,6 @@ a.btnBlue:active .btnBluePanel {
|
||||
.you .cloudVoice {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.you .cloudVoice .replyVoice {
|
||||
left: 35px;
|
||||
top: 15px;
|
||||
}
|
||||
.you .cloudVoice .cloudBody {
|
||||
position: relative;
|
||||
margin: 0 17px;
|
||||
@@ -5332,14 +5299,6 @@ a.btnBlue:active .btnBluePanel {
|
||||
padding-left: 18px\9;
|
||||
margin: 0px 8px 9px 7px;
|
||||
}
|
||||
.you .cloudVoice .cloudArrow {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 25px;
|
||||
left: 0px;
|
||||
top: 11px;
|
||||
background: url(../images/cloud/bubble_white_guid1dbc46.png) no-repeat 0 0;
|
||||
}
|
||||
.you .cloudVoice .cloudContent {
|
||||
display: block;
|
||||
padding: 7px 7px;
|
||||
@@ -5355,21 +5314,6 @@ a.btnBlue:active .btnBluePanel {
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAYAAACinX6EAAAAGXRFWHRTb2Z0d2FyZ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DwVU59HDfDzDTktCX6vUxJNvfBrtwFxyVxnRHOS/9YNaGIUz5e1xKg3tFUkbVtpz17D7u7wN4GpTTXxHz6zyvB5gJ7dDnLX8QzUGcV32hC+Rssy/k/tmFCJxvZOrH6XySR2Lb9wHN6t6hzJRf+V9uhEKsx2UXzntIkJunMThfCDgc/p2gT4BPgE+AT4BPgE+AT4BPgE/AAR1/BBgA8iNe2jzu2vcAAAAASUVORK5CYII=) no-repeat 9px -1px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.you .cloudVoice .cloudContent .icoVoicePlaying {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
.you .cloudText .sendStatus {
|
||||
margin-top: -8px;
|
||||
}
|
||||
.you .cloudText .cloudArrow {
|
||||
position: absolute;
|
||||
left: -7px;
|
||||
top: 11px;
|
||||
width: 13px;
|
||||
height: 24px;
|
||||
background: url(../images/cloud/bubble_white_guid1dbc46.png) no-repeat;
|
||||
}
|
||||
.you .cloudImg .cloudContent {
|
||||
padding: 5px 13px\9;
|
||||
padding: 6px;
|
||||
@@ -5602,17 +5546,6 @@ a.btnBlue:active .btnBluePanel {
|
||||
border: 5px solid #E5E5E5\9;
|
||||
border-radius: 0px\9;
|
||||
}
|
||||
.me .cloudImg .sendStatus {
|
||||
margin-top: -10px;
|
||||
}
|
||||
.me .cloudImg .cloudArrow {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 25px;
|
||||
right: -17px;
|
||||
top: 8px;
|
||||
background: url(../images/cloud/bubble_green_guid1dbc46.png) no-repeat 0 0;
|
||||
}
|
||||
.me .cloudVideo .imageBorder {
|
||||
border: 1px solid #a4a4a4\9;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user