From fd4bfee6ea393b6b707919b5da805a6a46e72d1a Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Mon, 12 Oct 2015 19:22:05 +0500 Subject: Multiple UI Improvements --- web/react/components/channel_loader.jsx | 6 ------ web/react/components/settings_sidebar.jsx | 2 +- web/react/components/view_image.jsx | 3 ++- web/react/utils/constants.jsx | 2 +- web/react/utils/utils.jsx | 7 +++++-- web/sass-files/sass/partials/_base.scss | 5 +++++ web/sass-files/sass/partials/_markdown.scss | 9 ++------- web/sass-files/sass/partials/_responsive.scss | 2 +- web/templates/channel.html | 2 +- 9 files changed, 18 insertions(+), 20 deletions(-) (limited to 'web') 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' > @@ -210,6 +211,7 @@ export default class ViewImageModal extends React.Component { content = (