diff --git a/app/css/app.css b/app/css/app.css index 427c50cf..d5a85481 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -804,7 +804,7 @@ a.tg_radio_on:hover i.icon-radio { } -.im_dialogs_col .nano > .pane { +.im_dialogs_col .nano > .nano-pane { background : rgba(0,0,0,0.0); width : 12px; right: 0px; @@ -820,7 +820,7 @@ a.tg_radio_on:hover i.icon-radio { -o-transition : none; transition : none; } -.im_dialogs_col .nano > .pane > .slider { +.im_dialogs_col .nano > .nano-pane > .nano-slider { background: #A5B1B9; margin: 0 5px; -moz-border-radius : 0; @@ -1076,9 +1076,9 @@ a.im_dialog_selected .im_dialog_date { .im_history_col { } -.im_history_col .nano > .pane, -.contacts_modal_col .nano > .pane, -.im_dialogs_modal_col .nano > .pane { +.im_history_col .nano > .nano-pane, +.contacts_modal_col .nano > .nano-pane, +.im_dialogs_modal_col .nano > .nano-pane { background : rgba(3,36,64,0.08); width : 9px; right: 0; @@ -1097,12 +1097,12 @@ a.im_dialog_selected .im_dialog_date { transition : none; } -.contacts_modal_col .nano > .pane { +.contacts_modal_col .nano > .nano-pane { width: 6px; right: 7px; } -.im_dialogs_modal_col .nano > .pane { +.im_dialogs_modal_col .nano > .nano-pane { width: 6px; right: 2px; } @@ -1110,13 +1110,13 @@ a.im_dialog_selected .im_dialog_date { padding: 0 12px 0 12px; } -.im_history_col .nano > .pane { +.im_history_col .nano > .nano-pane { top: 10px; right: 8px; } -.im_history_col .nano > .pane > .slider, -.contacts_modal_col .nano > .pane > .slider, -.im_dialogs_modal_col .nano > .pane > .slider { +.im_history_col .nano > .nano-pane > .nano-slider, +.contacts_modal_col .nano > .nano-pane > .nano-slider, +.im_dialogs_modal_col .nano > .nano-pane > .nano-slider { background : rgba(3,46,79,0.22); margin: 0; -moz-border-radius : 2px; @@ -1219,7 +1219,7 @@ a.im_dialog_selected .im_dialog_date { .im_history_wrap { - overflow: hidden; + /*overflow: hidden;*/ /*overflow-y: scroll;*/ } .im_history_scrollable_wrap { @@ -1251,11 +1251,13 @@ a.im_dialog_selected .im_dialog_date { } .im_history_typing_wrap { - margin-top: 13px; - height: 18px; + /*margin-top: 13px;*/ + /*height: 18px;*/ line-height: 18px; width: 100%; - margin-bottom: 13px; + height: 49px; + /*margin-bottom: 13px;*/ + padding: 13px 0 18px; overflow: hidden; -webkit-user-select: none; } @@ -2447,11 +2449,11 @@ img.chat_modal_participant_photo { } -.emoji-menu .nano > .pane { +.emoji-menu .nano > .nano-pane { background : rgba(255,255,255,0.0); right: -2px; } -.emoji-menu .nano > .pane > .slider { +.emoji-menu .nano > .nano-pane > .nano-slider { background: #d1d1d1; margin: 0 3px 0 4px; } @@ -3261,7 +3263,7 @@ ce671b orange padding: 14px 0; } -.countries_modal_col .nano > .pane { +.countries_modal_col .nano > .nano-pane { background : rgba(3,36,64,0.08); width : 3px; right: 6px; @@ -3274,7 +3276,7 @@ ce671b orange -webkit-border-radius : 0; border-radius : 0; } -.countries_modal_col .nano > .pane > .slider { +.countries_modal_col .nano > .nano-pane > .nano-slider { background : rgba(3,46,79,0.22); margin: 0; -moz-border-radius : 0; diff --git a/app/css/app_mobile.css b/app/css/app_mobile.css index 00eefa37..d379610c 100644 --- a/app/css/app_mobile.css +++ b/app/css/app_mobile.css @@ -135,7 +135,9 @@ html { font-size: 14px; color: #FFF; white-space: nowrap; + max-width: 100px; overflow: hidden; + text-overflow: ellipsis; margin: 0; } .navbar-quick-media-back h4 { @@ -268,14 +270,14 @@ html { margin: 0 5px; padding-bottom: 18px; } -.im_history_col .nano > .pane { +.im_history_col .nano > .nano-pane { top: 3px; right: 3px; width: 6px; } -.im_history_col .nano > .pane > .slider, -.contacts_modal_col .nano > .pane > .slider, -.im_dialogs_modal_col .nano > .pane > .slider { +.im_history_col .nano > .nano-pane > .nano-slider, +.contacts_modal_col .nano > .nano-pane > .nano-slider, +.im_dialogs_modal_col .nano > .nano-pane > .nano-slider { background : rgba(3,46,79,0.22); border-radius: 3px; margin: 0; @@ -305,11 +307,11 @@ html { .im_dialogs_col { margin-right: 0; } -.im_page_peer_not_selected .im_dialogs_col_wrap .pane { +.im_page_peer_not_selected .im_dialogs_col_wrap .nano-pane { width: 6px; right: 3px; } -.im_page_peer_not_selected .im_dialogs_col_wrap .pane > .slider { +.im_page_peer_not_selected .im_dialogs_col_wrap .nano-pane > .nano-slider { background : rgba(3,46,79,0.22); border-radius: 3px; margin: 0; diff --git a/app/js/directives.js b/app/js/directives.js index 89365822..555efdf4 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -254,6 +254,7 @@ angular.module('myApp.directives', ['myApp.filters']) }); $(scrollableWrap).on('scroll', function (e) { + if (!element.is(':visible')) return; // console.log('scroll', moreNotified); if (!moreNotified && scrollableWrap.scrollTop >= scrollableWrap.scrollHeight - scrollableWrap.clientHeight - 300) { // console.log('emit need more'); @@ -421,13 +422,16 @@ angular.module('myApp.directives', ['myApp.filters']) if (!atBottom && !options.my) { return; } - var curAnimated = animated && !$rootScope.idle.isIDLE, + var curAnimated = animated && + !$rootScope.idle.isIDLE && + historyMessagesEl.clientHeight > 0, wasH; - if (!curAnimated) { + + if (curAnimated) { + wasH = scrollableWrap.scrollHeight; + } else { $(scrollable).css({bottom: 0}); $(scrollableWrap).addClass('im_history_to_bottom'); - } else { - wasH = scrollableWrap.scrollHeight; } onContentLoaded(function () { @@ -450,7 +454,6 @@ angular.module('myApp.directives', ['myApp.filters']) $(scrollable).css({bottom: ''}); scrollableWrap.scrollTop = scrollableWrap.scrollHeight; updateBottomizer(); - $(historyWrap).nanoScroller(); } }); }); @@ -501,15 +504,16 @@ angular.module('myApp.directives', ['myApp.filters']) $scope.$on('ui_history_prepend', function () { var sh = scrollableWrap.scrollHeight, st = scrollableWrap.scrollTop, + pr = parseInt($(scrollableWrap).css('paddingRight')), ch = scrollableWrap.clientHeight; $(scrollableWrap).addClass('im_history_to_bottom'); scrollableWrap.scrollHeight; // Some strange Chrome bug workaround - $(scrollable).css({bottom: -(sh - st - ch)}); + $(scrollable).css({bottom: -(sh - st - ch), marginLeft: -Math.ceil(pr / 2)}); onContentLoaded(function () { $(scrollableWrap).removeClass('im_history_to_bottom'); - $(scrollable).css({bottom: ''}); + $(scrollable).css({bottom: '', marginLeft: ''}); scrollableWrap.scrollTop = st + scrollableWrap.scrollHeight - sh; updateBottomizer(); @@ -569,10 +573,9 @@ angular.module('myApp.directives', ['myApp.filters']) var atBottom = true; $(scrollableWrap).on('scroll', function (e) { - if ($(scrollableWrap).hasClass('im_history_to_bottom')) { - return cancelEvent(e); - } - if (curAnimation) { + if (!element.is(':visible') || + $(scrollableWrap).hasClass('im_history_to_bottom') || + curAnimation) { return; } atBottom = scrollableWrap.scrollTop >= scrollableWrap.scrollHeight - scrollableWrap.clientHeight; @@ -607,9 +610,6 @@ angular.module('myApp.directives', ['myApp.filters']) $(historyWrap).css({ height: historyH }); - $(historyEl).css({ - minHeight: historyH - 44 - }); updateBottomizer(); @@ -626,8 +626,9 @@ angular.module('myApp.directives', ['myApp.filters']) function updateBottomizer () { $(historyMessagesEl).css({marginTop: 0}); - if (historyMessagesEl.offsetHeight > 0 && historyMessagesEl.offsetHeight <= scrollableWrap.offsetHeight) { - $(historyMessagesEl).css({marginTop: (scrollableWrap.offsetHeight - historyMessagesEl.offsetHeight - 20 - 44) + 'px'}); + var marginTop = scrollableWrap.offsetHeight - historyMessagesEl.offsetHeight - 20 - 49; + if (historyMessagesEl.offsetHeight > 0 && marginTop > 0) { + $(historyMessagesEl).css({marginTop: marginTop}); } $(historyWrap).nanoScroller(); } @@ -741,7 +742,8 @@ angular.module('myApp.directives', ['myApp.filters']) lastLength; $(editorElement).on('keyup', function (e) { var now = tsNow(), - length = (editorElement[richTextarea ? 'innerText' : 'value']).length; + length = (editorElement[richTextarea ? 'textContent' : 'value']).length; + if (now - lastTyping > 5000 && length != lastLength) { lastTyping = now; @@ -1405,6 +1407,7 @@ angular.module('myApp.directives', ['myApp.filters']) moreNotified = false; $(scrollableWrap).on('scroll', function (e) { + if (!element.is(':visible')) return; if (!moreNotified && scrollableWrap.scrollTop >= scrollableWrap.scrollHeight - scrollableWrap.clientHeight - 300) { moreNotified = true; diff --git a/app/partials/contacts_modal.html b/app/partials/contacts_modal.html index d6d147ab..f33bdaac 100644 --- a/app/partials/contacts_modal.html +++ b/app/partials/contacts_modal.html @@ -15,7 +15,7 @@
-
+