Fixed #286
This commit is contained in:
parent
5caf0d8165
commit
fae8e2ae5a
@ -1818,15 +1818,6 @@ img.im_message_document_thumb {
|
|||||||
padding: 0 0 20px 10px;
|
padding: 0 0 20px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.im_message_date_seconds {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
position: absolute;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.im_message_meta:hover .im_message_date_seconds {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
|
|
||||||
@ -3255,6 +3246,7 @@ ce671b orange
|
|||||||
filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='2');
|
filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='2');
|
||||||
margin: -1px;
|
margin: -1px;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img_gif_image {
|
.img_gif_image {
|
||||||
|
@ -86,6 +86,18 @@ angular.module('myApp.filters', [])
|
|||||||
}
|
}
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
.filter('timeSecs', ['$filter', function($filter) {
|
||||||
|
var cachedDates = {};
|
||||||
|
|
||||||
|
return function (timestamp) {
|
||||||
|
if (cachedDates[timestamp]) {
|
||||||
|
return cachedDates[timestamp];
|
||||||
|
}
|
||||||
|
|
||||||
|
return cachedDates[timestamp] = $filter('date')(timestamp * 1000, 'HH:mm:ss');
|
||||||
|
}
|
||||||
|
}])
|
||||||
|
|
||||||
.filter('myDate', ['$filter', function($filter) {
|
.filter('myDate', ['$filter', function($filter) {
|
||||||
var cachedDates = {};
|
var cachedDates = {};
|
||||||
|
|
||||||
|
@ -1797,12 +1797,14 @@ angular.module('myApp.services', [])
|
|||||||
|
|
||||||
for (i = start; i < end; i++) {
|
for (i = start; i < end; i++) {
|
||||||
curMessage = history[i];
|
curMessage = history[i];
|
||||||
curDay = Math.floor((curMessage.date - midnightOffset) / 86400);
|
curDay = Math.floor((curMessage.date + midnightOffset) / 86400);
|
||||||
if (curDay !== prevDay) {
|
|
||||||
curMessage.needDate = true;
|
if (curDay === prevDay) {
|
||||||
} else if (prevMessage) {
|
|
||||||
delete curMessage.needDate;
|
delete curMessage.needDate;
|
||||||
|
} else if (!i || prevMessage) {
|
||||||
|
curMessage.needDate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevMessage &&
|
if (prevMessage &&
|
||||||
curMessage.from_id == prevMessage.from_id &&
|
curMessage.from_id == prevMessage.from_id &&
|
||||||
!prevMessage.fwd_from_id == !curMessage.fwd_from_id &&
|
!prevMessage.fwd_from_id == !curMessage.fwd_from_id &&
|
||||||
@ -2559,9 +2561,9 @@ angular.module('myApp.services', [])
|
|||||||
doc.thumb = thumb;
|
doc.thumb = thumb;
|
||||||
|
|
||||||
doc.canDownload = !(window.chrome && chrome.fileSystem && chrome.fileSystem.chooseEntry);
|
doc.canDownload = !(window.chrome && chrome.fileSystem && chrome.fileSystem.chooseEntry);
|
||||||
doc.withPreview = doc.canDownload && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0;
|
doc.withPreview = doc.canDownload && doc.thumb && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0;
|
||||||
|
|
||||||
if (isGif) {
|
if (doc.withPreview && isGif) {
|
||||||
doc.isSpecial = 'gif';
|
doc.isSpecial = 'gif';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<div class="im_message_meta pull-right text-right">
|
<div class="im_message_meta pull-right text-right">
|
||||||
<i class="icon-message-status-tick"></i>
|
<i class="icon-message-status-tick"></i>
|
||||||
<span class="im_message_date" ng-bind="historyMessage.date | time"></span><span class="im_message_date im_message_date_seconds">:<span ng-bind="historyMessage.date | seconds"></span></span>
|
<span class="im_message_date" ng-bind="historyMessage.date | timeSecs"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="im_message_body">
|
<div class="im_message_body">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user