diff options
Diffstat (limited to 'web/templates')
-rw-r--r-- | web/templates/channel.html | 10 | ||||
-rw-r--r-- | web/templates/head.html | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/web/templates/channel.html b/web/templates/channel.html index 7b8f6a243..8abbe36df 100644 --- a/web/templates/channel.html +++ b/web/templates/channel.html @@ -26,13 +26,13 @@ <script> window.setup_channel_page({{ .Props }}, {{ .Team }}, {{ .Channel }}, {{ .User }}); $('body').tooltip( {selector: '[data-toggle=tooltip]'} ); + var modals = $('.modal-body').not('.edit-modal-body'); if($(window).height() > 1200){ - $('.modal-body').css('max-height', 1000); + modals.css('max-height', 1000); + } else { + modals.css('max-height', $(window).height() - 200); } - else { - $('.modal-body').css('max-height', $(window).height() - 200); - } - $('.modal-body').perfectScrollbar(); + modals.perfectScrollbar(); </script> </body> </html> diff --git a/web/templates/head.html b/web/templates/head.html index c425ef0b0..be4ed2b25 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -38,6 +38,7 @@ <script src="/static/js/react-bootstrap-0.28.1.js"></script> <script src="/static/js/perfect-scrollbar-0.6.7.jquery.min.js"></script> <script src="/static/js/jquery-dragster/jquery.dragster.js"></script> + <script src="/static/js/babel-polyfill-6.1.18.min.js"></script> <script src="/static/js/katex.min.js"></script> <style id="antiClickjack">body{display:none !important;}</style> @@ -57,7 +58,13 @@ $(function () { $(window).bind('storage', function (e) { - if (e.originalEvent.key === '__logout__') { + // when one tab on a browser logs out, it sets __logout__ in localStorage to trigger other tabs to log out + if (e.originalEvent.key === '__logout__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) { + // make sure it isn't this tab that is sending the logout signal (only necessary for IE11) + if (window.BrowserStore.isSignallingLogout(e.originalEvent.newValue)) { + return; + } + console.log('detected logout from a different tab'); window.location.href = '/' + window.mm_team.name; } |