summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
authorStas Vovk <stas@vovk.me>2015-10-12 21:54:51 +0300
committerStas Vovk <stas@vovk.me>2015-10-12 21:54:51 +0300
commitbafb341015e6a9aaba878bec8126fcc825531015 (patch)
tree1312efa11b3435205d2d31818a0f2ce91269373c /web/react/components
parentb5a499977ec212139444974255a27f8e66d0befd (diff)
parent246d934e5e557555645a1d26ae005be452ecbd2d (diff)
downloadchat-bafb341015e6a9aaba878bec8126fcc825531015.tar.gz
chat-bafb341015e6a9aaba878bec8126fcc825531015.tar.bz2
chat-bafb341015e6a9aaba878bec8126fcc825531015.zip
Merge remote-tracking branch 'upstream/master' into PLT-589
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/channel_loader.jsx6
-rw-r--r--web/react/components/settings_sidebar.jsx2
-rw-r--r--web/react/components/view_image.jsx3
3 files changed, 3 insertions, 8 deletions
diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index d16069725..d0d6ab5e2 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -104,12 +104,6 @@ export default class ChannelLoader extends React.Component {
}
});
- /* Setup modal events */
- $('.modal').on('show.bs.modal', function onShow() {
- $('.modal-body').css('overflow-y', 'auto');
- $('.modal-body').css('max-height', $(window).height() * 0.7);
- });
-
/* Prevent backspace from navigating back a page */
$(window).on('keydown.preventBackspace', (e) => {
if (e.which === 8 && !$(e.target).is('input, textarea')) {
diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx
index b5d2132d7..66568e1c8 100644
--- a/web/react/components/settings_sidebar.jsx
+++ b/web/react/components/settings_sidebar.jsx
@@ -10,7 +10,7 @@ export default class SettingsSidebar extends React.Component {
handleClick(tab, e) {
e.preventDefault();
this.props.updateTab(tab.name);
- $('.settings-modal').addClass('display--content');
+ $(e.target).closest('.settings-modal').addClass('display--content');
}
render() {
let tabList = this.props.tabs.map(function makeTab(tab) {
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx
index 8ef68dd0a..c5f0abc12 100644
--- a/web/react/components/view_image.jsx
+++ b/web/react/components/view_image.jsx
@@ -195,6 +195,7 @@ export default class ViewImageModal extends React.Component {
target='_blank'
>
<img
+ style={{maxHeight: this.state.imgHeight}}
ref='image'
src={this.getPreviewImagePath(filename)}
/>
@@ -210,6 +211,7 @@ export default class ViewImageModal extends React.Component {
content = (
<video
+ style={{maxHeight: this.state.imgHeight}}
ref='video'
data-setup='{}'
controls='controls'
@@ -334,7 +336,6 @@ export default class ViewImageModal extends React.Component {
>
<div
className={'image-wrapper ' + bgClass}
- style={{maxHeight: this.state.imgHeight}}
onMouseEnter={this.onMouseEnterImage}
onMouseLeave={this.onMouseLeaveImage}
onClick={(e) => e.stopPropagation()}