From 38cc1485749c60c32ee9ef8a01da74140588cc3a Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Tue, 22 Sep 2015 11:21:28 +0500 Subject: [PATCH 1/2] UI Modifications for multiple tickets --- web/react/components/channel_loader.jsx | 11 ++++++----- web/react/components/new_channel_modal.jsx | 3 ++- web/react/components/sidebar_right_menu.jsx | 4 ++++ web/react/utils/utils.jsx | 3 ++- web/sass-files/sass/partials/_forms.scss | 1 + 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index ce6f60f87e..20ea34e153 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -90,11 +90,12 @@ export default class ChannelLoader extends React.Component { } /* Setup global mouse events */ - $('body').on('click.userpopover', function popOver(e) { - if ($(e.target).attr('data-toggle') !== 'popover' && - $(e.target).parents('.popover.in').length === 0) { - $('.user-popover').popover('hide'); - } + $('body').on('click', function hidePopover(e) { + $('[data-toggle="popover"]').each(function eachPopover() { + if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) { + $(this).popover('hide'); + } + }); }); $('body').on('mouseenter mouseleave', '.post', function mouseOver(ev) { diff --git a/web/react/components/new_channel_modal.jsx b/web/react/components/new_channel_modal.jsx index 1488a14312..99d5b49e97 100644 --- a/web/react/components/new_channel_modal.jsx +++ b/web/react/components/new_channel_modal.jsx @@ -93,6 +93,7 @@ export default class NewChannelModal extends React.Component { @@ -122,7 +123,7 @@ export default class NewChannelModal extends React.Component { /> {displayNameError}

- {'Channel URL: ' + prettyTeamURL + this.props.channelData.name + ' ('} + {'URL: ' + prettyTeamURL + this.props.channelData.name + ' ('} 24) { + if (teamURL.length > 35) { return teamURL.substring(0, 10) + '...' + teamURL.substring(teamURL.length - 12, teamURL.length) + '/'; } + return teamURL + '/'; } diff --git a/web/sass-files/sass/partials/_forms.scss b/web/sass-files/sass/partials/_forms.scss index c8b08f44d2..65ea161d45 100644 --- a/web/sass-files/sass/partials/_forms.scss +++ b/web/sass-files/sass/partials/_forms.scss @@ -18,6 +18,7 @@ .input__help { color: #777; margin: 10px 0 0 10px; + word-break: break-word; &.dark { color: #222; } From 302372cfa0c1f86f78336a5b77e879eac32d27cb Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Tue, 22 Sep 2015 21:01:55 +0500 Subject: [PATCH 2/2] Removing click event for channel description popover --- web/react/components/channel_header.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index 8d23ec6463..b81936b57c 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -55,7 +55,7 @@ export default class ChannelHeader extends React.Component { if (!Utils.areStatesEqual(newState, this.state)) { this.setState(newState); } - $('.channel-header__info .description').popover({placement: 'bottom', trigger: 'hover click', html: true, delay: {show: 500, hide: 500}}); + $('.channel-header__info .description').popover({placement: 'bottom', trigger: 'hover', html: true, delay: {show: 500, hide: 500}}); } onSocketChange(msg) { if (msg.action === 'new_user') {