Browse Source

notice, if there are no messages

master
Misha Peshekhonov 11 years ago
parent
commit
2dcaa17d85
  1. 13
      app/css/app.css
  2. 2
      app/js/controllers.js
  3. 1
      app/partials/im.html

13
app/css/app.css

@ -792,6 +792,19 @@ a.im_dialog:hover .im_dialog_date {
-webkit-user-select: text; -webkit-user-select: text;
} }
.im_history_messages_none.ng-hide {
display: none;
}
.im_history_messages_none {
display: block;
padding: 100px 50px 0;
text-align: center;
color: #999;
font-size: 1.5em;
}
.im_history_to_bottom { .im_history_to_bottom {
position: relative; position: relative;
} }

2
app/js/controllers.js

@ -449,6 +449,8 @@ angular.module('myApp.controllers', [])
getMessagesPromise.then(function (historyResult) { getMessagesPromise.then(function (historyResult) {
if (curJump != jump) return; if (curJump != jump) return;
historyResult.count === 0 ? $scope.mediaEmpty = true : $scope.mediaEmpty = false;
offset += startLimit; offset += startLimit;
hasMore = offset < historyResult.count; hasMore = offset < historyResult.count;
maxID = historyResult.history[historyResult.history.length - 1]; maxID = historyResult.history[historyResult.history.length - 1];

1
app/partials/im.html

@ -98,6 +98,7 @@
<div class="im_history_scrollable"> <div class="im_history_scrollable">
<div class="im_history" ng-class="{im_history_selectable: selectActions}"> <div class="im_history" ng-class="{im_history_selectable: selectActions}">
<div class="im_history_messages_none" ng-show="mediaEmpty">No messages to display</div>
<div class="im_history_message_wrap" my-message ng-repeat="historyMessage in history"></div> <div class="im_history_message_wrap" my-message ng-repeat="historyMessage in history"></div>
</div> </div>

Loading…
Cancel
Save