mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +03:00
Fix bug with auto start chat chat window resizer
This commit is contained in:
parent
2a3a9dec9d
commit
e7f8779ba8
@ -1,2 +1,2 @@
|
||||
(function(j,b){var e=!1,f,h=function(){if(0!=b("#messages-region").size()){var a=b("#messages-region"),c=b("#avatar-region");if(!1===e){var d=0;b("body > *").each(function(){var a=b(this),c=a.offset(),a=a.height();d<c.top+a&&(d=c.top+a)});e=d-a.height()}var g=b(window).height()-e;g<parseInt(a.css("minHeight"))||(a.height(g),0<c.size()&&c.height(a.innerHeight()))}},k=function(){f&&clearTimeout(f);f=setTimeout(h,0)};j.Application.addInitializer(function(){var a=b("img").size(),c=0,d=function(){c++;
|
||||
(function(j,b){var e=!1,f,h=function(){if(0!=b("#messages-region").size()){var a=b("#messages-region"),c=b("#avatar-region");if(!1===e){var d=0;b("body > *").each(function(){var a=b(this),c=a.offset(),a=a.height();d<c.top+a&&(d=c.top+a)});e=d-a.height()}var g=b(window).height()-e;g<parseInt(a.css("minHeight"))||(a.height(g),0<c.size()&&c.height(a.innerHeight()))}},k=function(){f&&clearTimeout(f);f=setTimeout(h,0)};j.Application.Chat.addInitializer(function(){var a=b("img").size(),c=0,d=function(){c++;
|
||||
a==c&&(h(),b("#messages-region").scrollTop(b("#messages-region").prop("scrollHeight")),b(window).resize(k))};b("img").each(function(){var a=b(this);0<a.height()?d():a.load(d)})})})(Mibew,$);
|
||||
|
@ -65,7 +65,7 @@
|
||||
}
|
||||
|
||||
// Stretch messages region after chat page initialize
|
||||
Mibew.Application.addInitializer(function() {
|
||||
Mibew.Application.Chat.addInitializer(function() {
|
||||
/**
|
||||
* Contains total count of images on the page
|
||||
* @type Number
|
||||
|
Loading…
Reference in New Issue
Block a user