Merge pull request #151 from asaadmahmoodspin/master
MM-1469 - Loading message in more channel modal
Этот коммит содержится в:
@@ -61,6 +61,10 @@ module.exports = React.createClass({
|
|||||||
render: function() {
|
render: function() {
|
||||||
var server_error = this.state.server_error ? <div className='form-group has-error'><label className='control-label'>{ this.state.server_error }</label></div> : null;
|
var server_error = this.state.server_error ? <div className='form-group has-error'><label className='control-label'>{ this.state.server_error }</label></div> : null;
|
||||||
var outter = this;
|
var outter = this;
|
||||||
|
var moreChannels;
|
||||||
|
|
||||||
|
if (this.state.channels != null)
|
||||||
|
moreChannels = this.state.channels;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="modal fade" id="more_channels" ref="modal" tabIndex="-1" role="dialog" aria-hidden="true">
|
<div className="modal fade" id="more_channels" ref="modal" tabIndex="-1" role="dialog" aria-hidden="true">
|
||||||
@@ -75,10 +79,11 @@ module.exports = React.createClass({
|
|||||||
<button data-toggle="modal" data-target="#new_channel" data-channeltype={this.state.channel_type} type="button" className="btn btn-primary channel-create-btn" onClick={this.handleNewChannel}>Create New Channel</button>
|
<button data-toggle="modal" data-target="#new_channel" data-channeltype={this.state.channel_type} type="button" className="btn btn-primary channel-create-btn" onClick={this.handleNewChannel}>Create New Channel</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="modal-body">
|
<div className="modal-body">
|
||||||
{this.state.channels.length ?
|
{moreChannels ?
|
||||||
|
(moreChannels.length ?
|
||||||
<table className="more-channel-table table">
|
<table className="more-channel-table table">
|
||||||
<tbody>
|
<tbody>
|
||||||
{this.state.channels.map(function(channel) {
|
{moreChannels.map(function(channel) {
|
||||||
return (
|
return (
|
||||||
<tr key={channel.id}>
|
<tr key={channel.id}>
|
||||||
<td>
|
<td>
|
||||||
@@ -94,7 +99,16 @@ module.exports = React.createClass({
|
|||||||
: <div className="no-channel-message">
|
: <div className="no-channel-message">
|
||||||
<p className="primary-message">No more channels to join</p>
|
<p className="primary-message">No more channels to join</p>
|
||||||
<p className="secondary-message">Click 'Create New Channel' to make a new one</p>
|
<p className="secondary-message">Click 'Create New Channel' to make a new one</p>
|
||||||
</div>}
|
</div>)
|
||||||
|
: <div ref="loadingscreen" className="loading-screen loading-screen--channel">
|
||||||
|
<div className="loading__content">
|
||||||
|
<h3>Loading</h3>
|
||||||
|
<div id="round_1" className="round"></div>
|
||||||
|
<div id="round_2" className="round"></div>
|
||||||
|
<div id="round_3" className="round"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
{ server_error }
|
{ server_error }
|
||||||
</div>
|
</div>
|
||||||
<div className="modal-footer">
|
<div className="modal-footer">
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ module.exports = React.createClass({
|
|||||||
$('.post-list__content div .post').removeClass('post--last');
|
$('.post-list__content div .post').removeClass('post--last');
|
||||||
$('.post-list__content div:last-child .post').addClass('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'){
|
if(ev.type === 'mouseenter'){
|
||||||
$(this).parent('div').prev('.date-separator, .new-separator').addClass('hovered--after');
|
$(this).parent('div').prev('.date-separator, .new-separator').addClass('hovered--after');
|
||||||
$(this).parent('div').next('.date-separator, .new-separator').addClass('hovered--before');
|
$(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() {
|
componentDidUpdate: function() {
|
||||||
this.resize();
|
this.resize();
|
||||||
|
|||||||
@@ -282,7 +282,6 @@ module.exports = React.createClass({
|
|||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
PostStore.addSelectedPostChangeListener(this._onChange);
|
PostStore.addSelectedPostChangeListener(this._onChange);
|
||||||
PostStore.addChangeListener(this._onChangeAll);
|
PostStore.addChangeListener(this._onChangeAll);
|
||||||
$(".post-right__scroll").perfectScrollbar();
|
|
||||||
this.resize();
|
this.resize();
|
||||||
var self = this;
|
var self = this;
|
||||||
$(window).resize(function(){
|
$(window).resize(function(){
|
||||||
@@ -341,7 +340,7 @@ module.exports = React.createClass({
|
|||||||
var height = $(window).height() - $('#error_bar').outerHeight() - 100;
|
var height = $(window).height() - $('#error_bar').outerHeight() - 100;
|
||||||
$(".post-right__scroll").css("height", height + "px");
|
$(".post-right__scroll").css("height", height + "px");
|
||||||
$(".post-right__scroll").scrollTop(100000);
|
$(".post-right__scroll").scrollTop(100000);
|
||||||
$(".post-right__scroll").perfectScrollbar('update');
|
$(".post-right__scroll").perfectScrollbar();
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ var ChannelStore = assign({}, EventEmitter.prototype, {
|
|||||||
BrowserStore.setItem("more_channels", JSON.stringify(channels));
|
BrowserStore.setItem("more_channels", JSON.stringify(channels));
|
||||||
},
|
},
|
||||||
_getMoreChannels: function() {
|
_getMoreChannels: function() {
|
||||||
var channels = [];
|
var channels;
|
||||||
try {
|
try {
|
||||||
channels = JSON.parse(BrowserStore.getItem("more_channels"));
|
channels = JSON.parse(BrowserStore.getItem("more_channels"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ module.exports.updateLastViewedAt = function() {
|
|||||||
module.exports.getMoreChannels = function(force) {
|
module.exports.getMoreChannels = function(force) {
|
||||||
if (isCallInProgress("getMoreChannels")) return;
|
if (isCallInProgress("getMoreChannels")) return;
|
||||||
|
|
||||||
if (ChannelStore.getMoreAll().length == 0 || force) {
|
if (!ChannelStore.getMoreAll() || force) {
|
||||||
|
|
||||||
callTracker["getMoreChannels"] = utils.getTimestamp();
|
callTracker["getMoreChannels"] = utils.getTimestamp();
|
||||||
client.getMoreChannels(
|
client.getMoreChannels(
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0 1em 1em 0;
|
margin: 5px 10px 5px 0;
|
||||||
&.custom-file {
|
&.custom-file {
|
||||||
width: 85px;
|
width: 85px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
|||||||
@@ -5,10 +5,16 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
@include box-sizing(border-box);
|
@include box-sizing(border-box);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
&.loading-screen--channel {
|
||||||
|
position: relative;
|
||||||
|
padding: 4em 0 3.5em;
|
||||||
|
}
|
||||||
.loading__content {
|
.loading__content {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
font-size: 0;
|
||||||
h3 {
|
h3 {
|
||||||
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin: 0 0.2em 0;
|
margin: 0 0.2em 0;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -23,7 +29,7 @@
|
|||||||
width: 4px;
|
width: 4px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 1px;
|
margin: 0 2px;
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
@include border-radius(10px);
|
@include border-radius(10px);
|
||||||
-moz-animation: move 0.75s infinite linear;
|
-moz-animation: move 0.75s infinite linear;
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ body.ios {
|
|||||||
min-height:37px;
|
min-height:37px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#post-list {
|
|
||||||
.date-separator, .new-separator {
|
.date-separator, .new-separator {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 2em;
|
height: 2em;
|
||||||
@@ -102,6 +101,8 @@ body.ios {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#post-list {
|
||||||
.post-list-holder-by-time {
|
.post-list-holder-by-time {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
@@ -135,6 +136,7 @@ body.ios {
|
|||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-create__container {
|
.post-create__container {
|
||||||
form {
|
form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -306,7 +308,7 @@ body.ios {
|
|||||||
}
|
}
|
||||||
.post-image__columns {
|
.post-image__columns {
|
||||||
@include legacy-pie-clearfix;
|
@include legacy-pie-clearfix;
|
||||||
margin-top: 1em;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
.post-info--hidden {
|
.post-info--hidden {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -347,7 +349,7 @@ body.ios {
|
|||||||
}
|
}
|
||||||
&.post-info {
|
&.post-info {
|
||||||
.post-profile-time {
|
.post-profile-time {
|
||||||
width: 100px;
|
width: 150px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
@media screen and (max-width: 1800px) {
|
@media screen and (max-width: 1800px) {
|
||||||
.inner__wrap {
|
.inner__wrap {
|
||||||
&.move--left {
|
&.move--left {
|
||||||
|
.date-separator, .new-separator {
|
||||||
|
&.hovered--comment {
|
||||||
|
&:before, &:after {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.post {
|
.post {
|
||||||
&.same--root {
|
&.same--root {
|
||||||
margin-left: 60px;
|
margin-left: 60px;
|
||||||
@@ -82,6 +89,13 @@
|
|||||||
max-width: 810px;
|
max-width: 810px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.date-separator, .new-separator {
|
||||||
|
&.hovered--comment {
|
||||||
|
&:before, &:after {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.post {
|
.post {
|
||||||
&.same--root {
|
&.same--root {
|
||||||
margin-left: 60px;
|
margin-left: 60px;
|
||||||
@@ -207,8 +221,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
#post-list {
|
.date-separator, .new-separator {
|
||||||
.date-seperator, .new-separator {
|
|
||||||
&.hovered--after {
|
&.hovered--after {
|
||||||
&:before {
|
&:before {
|
||||||
background: none;
|
background: none;
|
||||||
@@ -220,7 +233,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.post {
|
.post {
|
||||||
&.same--root {
|
&.same--root {
|
||||||
margin-left: 25px;
|
margin-left: 25px;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user