Browse Source

Exact dates for forwards

master
Igor Zhukov 7 years ago
parent
commit
c5fc5107ca
  1. 8
      app/js/filters.js
  2. 2
      app/partials/desktop/message.html

8
app/js/filters.js

@ -106,6 +106,14 @@ angular.module('myApp.filters', ['myApp.i18n'])
} }
}) })
.filter('dateMedium', function ($filter) {
var dateFilter = $filter('date')
return function (timestamp, extended) {
var ticks = timestamp * 1000
return dateFilter(ticks, 'medium')
}
})
.filter('time', function ($filter) { .filter('time', function ($filter) {
var cachedDates = {} var cachedDates = {}
var dateFilter = $filter('date') var dateFilter = $filter('date')

2
app/partials/desktop/message.html

@ -57,7 +57,7 @@
<span class="copyonly"><span my-i18n="message_forwarded_message"></span>:&nbsp;</span> <span class="copyonly"><span my-i18n="message_forwarded_message"></span>:&nbsp;</span>
<a class="im_message_fwd_photo pull-left" my-peer-photolink="::historyMessage.fwdFromID" img-class="im_message_fwd_photo"></a> <a class="im_message_fwd_photo pull-left" my-peer-photolink="::historyMessage.fwdFromID" img-class="im_message_fwd_photo"></a>
<div class="im_message_fwd_author_wrap"> <div class="im_message_fwd_author_wrap">
<a class="im_message_fwd_author" my-peer-link="historyMessage.fwdFromID" post-id="historyMessage.fwdPostID"></a><a ng-if="::historyMessage.viaBotID" class="im_message_fwd_via" ng-click="selectInlineBot(historyMessage.viaBotID, $event)"><span class="copyonly">&nbsp;</span><span my-i18n="message_via_bot"><my-i18n-param name="bot"><span class="im_message_fwd_author" my-peer-link="historyMessage.viaBotID" username="true" no-watch="true"></span></my-i18n-param></span></a><span class="copyonly">&nbsp;[</span><span class="im_message_fwd_date" ng-bind="::historyMessage.fwd_from.date | dateOrTime"></span><span class="copyonly">]&nbsp;</span> <a class="im_message_fwd_author" my-peer-link="historyMessage.fwdFromID" post-id="historyMessage.fwdPostID"></a><a ng-if="::historyMessage.viaBotID" class="im_message_fwd_via" ng-click="selectInlineBot(historyMessage.viaBotID, $event)"><span class="copyonly">&nbsp;</span><span my-i18n="message_via_bot"><my-i18n-param name="bot"><span class="im_message_fwd_author" my-peer-link="historyMessage.viaBotID" username="true" no-watch="true"></span></my-i18n-param></span></a><span class="copyonly">&nbsp;[</span><span class="im_message_fwd_date" ng-bind="::historyMessage.fwd_from.date | dateMedium"></span><span class="copyonly">]&nbsp;</span>
<span class="im_message_views_inline" ng-if="::historyMessage.views > 0"> <span class="im_message_views_inline" ng-if="::historyMessage.views > 0">
<i class="icon-message-views"></i><span class="im_message_views_cnt" my-message-views="historyMessage.mid"></span> <i class="icon-message-views"></i><span class="im_message_views_cnt" my-message-views="historyMessage.mid"></span>
</span> </span>

Loading…
Cancel
Save