From 91511281c55ac9b7d3d8ce21d409905c2aec1955 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Tue, 7 Jul 2015 13:10:11 -0700 Subject: Changed loading logic for retrieving more channels to allow for loading animation to be inserted into the More... menu that allows you to join more channels while waiting for the list of channels to load --- web/react/components/more_channels.jsx | 53 +++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 20 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index be2a5e93c..3cb83cec5 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -61,6 +61,10 @@ module.exports = React.createClass({ render: function() { var server_error = this.state.server_error ?
: null; var outter = this; + var moreChannels; + + if (this.state.channels != null) + moreChannels = this.state.channels; return (
- {this.state.channels.length ? - - - {this.state.channels.map(function(channel) { - return ( - - - - - ) - })} - -
-

{channel.display_name}

-

{channel.description}

-
- :
-

No more channels to join

-

Click 'Create New Channel' to make a new one

+ {moreChannels ? + (moreChannels.length ? + + + {this.state.channels.map(function(channel) { + return ( + + + + + ) + })} + +
+

{channel.display_name}

+

{channel.description}

+
+ :
+

No more channels to join

+

Click 'Create New Channel' to make a new one

+
) + :
+
+

Loading

+
+
+
+
} - { server_error } + { server_error }
-- cgit v1.2.3-1-g7c22 From ff4b94f02b038bf754ba3fcb00b7dd2a421a2d71 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Tue, 7 Jul 2015 13:18:10 -0700 Subject: Small changes and code clean-up --- web/react/components/more_channels.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index 3cb83cec5..dad0a644a 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -83,7 +83,7 @@ module.exports = React.createClass({ (moreChannels.length ? - {this.state.channels.map(function(channel) { + {moreChannels.map(function(channel) { return (
@@ -108,7 +108,7 @@ module.exports = React.createClass({
} - { server_error } + { server_error }
-- cgit v1.2.3-1-g7c22 From de742baac09726fe2ef9f7274d260950a6828589 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Wed, 8 Jul 2015 23:08:06 +0500 Subject: MM-1469 - Loading message in more channel modal --- web/react/components/more_channels.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index dad0a644a..1af259853 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -79,7 +79,7 @@ module.exports = React.createClass({
- {moreChannels ? + {moreChannels ? (moreChannels.length ? @@ -100,14 +100,15 @@ module.exports = React.createClass({

No more channels to join

Click 'Create New Channel' to make a new one

) - :
+ :

Loading

-
} +
+ } { server_error }
-- cgit v1.2.3-1-g7c22 From a533ff4d71cd6416d959ae970cded679242ba3e8 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 9 Jul 2015 02:53:07 +0500 Subject: MM-1444 - Fixing text selection issue --- web/react/components/post_right.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx index 2c28c5d9f..115ee87d4 100644 --- a/web/react/components/post_right.jsx +++ b/web/react/components/post_right.jsx @@ -282,7 +282,6 @@ module.exports = React.createClass({ componentDidMount: function() { PostStore.addSelectedPostChangeListener(this._onChange); PostStore.addChangeListener(this._onChangeAll); - $(".post-right__scroll").perfectScrollbar(); this.resize(); var self = this; $(window).resize(function(){ @@ -341,7 +340,7 @@ module.exports = React.createClass({ var height = $(window).height() - $('#error_bar').outerHeight() - 100; $(".post-right__scroll").css("height", height + "px"); $(".post-right__scroll").scrollTop(100000); - $(".post-right__scroll").perfectScrollbar('update'); + $(".post-right__scroll").perfectScrollbar(); }, render: function() { -- cgit v1.2.3-1-g7c22 From c760e06433fa9829c92905cc3b8cdedb5479466d Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 9 Jul 2015 21:11:47 +0500 Subject: Updating Ui for posts --- web/react/components/post_list.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'web/react/components') diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index fc5157ce6..d6dc9ce30 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -123,7 +123,7 @@ module.exports = React.createClass({ $('.post-list__content div .post').removeClass('post--last'); $('.post-list__content div:last-child .post').addClass('post--last'); - $('body').on('mouseenter mouseleave', '.post:not(.post--comment.same--root)', function(ev){ + $('body').on('mouseenter mouseleave', '.post', function(ev){ if(ev.type === 'mouseenter'){ $(this).parent('div').prev('.date-separator, .new-separator').addClass('hovered--after'); $(this).parent('div').next('.date-separator, .new-separator').addClass('hovered--before'); @@ -134,6 +134,17 @@ module.exports = React.createClass({ } }); + $('body').on('mouseenter mouseleave', '.post.post--comment.same--root', function(ev){ + if(ev.type === 'mouseenter'){ + $(this).parent('div').prev('.date-separator, .new-separator').addClass('hovered--comment'); + $(this).parent('div').next('.date-separator, .new-separator').addClass('hovered--comment'); + } + else { + $(this).parent('div').prev('.date-separator, .new-separator').removeClass('hovered--comment'); + $(this).parent('div').next('.date-separator, .new-separator').removeClass('hovered--comment'); + } + }); + }, componentDidUpdate: function() { this.resize(); -- cgit v1.2.3-1-g7c22