Replace message list loading spinner with bar
// FREEBIE
This commit is contained in:
parent
d39a19d889
commit
7310afd1b4
8 changed files with 102 additions and 67 deletions
|
@ -75,7 +75,11 @@
|
||||||
{{> avatar }}
|
{{> avatar }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='discussion-container'></div>
|
<div class='discussion-container'>
|
||||||
|
<div class='bar-container hide'>
|
||||||
|
<div class='bar active progress-bar-striped progress-bar'></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class='bottom-bar' id='footer'>
|
<div class='bottom-bar' id='footer'>
|
||||||
<form class='send'>
|
<form class='send'>
|
||||||
|
|
|
@ -105,10 +105,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchMessages: function() {
|
fetchMessages: function() {
|
||||||
this.$('.message-list').addClass('loading');
|
this.$('.bar-container').show();
|
||||||
return this.model.fetchContacts().then(function() {
|
return this.model.fetchContacts().then(function() {
|
||||||
return this.model.fetchMessages().then(function() {
|
return this.model.fetchMessages().then(function() {
|
||||||
this.$('.message-list').removeClass('loading');
|
this.$('.bar-container').hide();
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
// TODO catch?
|
// TODO catch?
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.bar-container {
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.message-list {
|
.message-list {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -36,16 +40,6 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 2em 8px 0;
|
padding: 2em 8px 0;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
&:before {
|
|
||||||
display: block;
|
|
||||||
margin: -25px auto 10px;
|
|
||||||
content: " ";
|
|
||||||
height: $loading-height;
|
|
||||||
width: $loading-height;
|
|
||||||
border: solid 3px transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -396,6 +396,33 @@ img.emoji {
|
||||||
input[type=text]:active, input[type=text]:focus, input[type=search]:active, input[type=search]:focus, textarea:active, textarea:focus {
|
input[type=text]:active, input[type=text]:focus, input[type=search]:active, input[type=search]:focus, textarea:active, textarea:focus {
|
||||||
outline: 1px solid #2090ea; }
|
outline: 1px solid #2090ea; }
|
||||||
|
|
||||||
|
@keyframes progress-bar-stripes {
|
||||||
|
from {
|
||||||
|
background-position: 40px 0; }
|
||||||
|
to {
|
||||||
|
background-position: 0 0; } }
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
-webkit-background-size: 40px 40px;
|
||||||
|
background-size: 40px 40px; }
|
||||||
|
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent); }
|
||||||
|
|
||||||
|
.progress-bar.active {
|
||||||
|
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
-o-animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
animation: progress-bar-stripes 2s linear infinite; }
|
||||||
|
|
||||||
|
.bar-container {
|
||||||
|
background: #a2d2f4; }
|
||||||
|
.bar-container .progress-bar {
|
||||||
|
height: 100%; }
|
||||||
|
|
||||||
.conversation-stack,
|
.conversation-stack,
|
||||||
.new-conversation, .inbox, .gutter {
|
.new-conversation, .inbox, .gutter {
|
||||||
height: 100%; }
|
height: 100%; }
|
||||||
|
@ -610,6 +637,8 @@ input.search {
|
||||||
.conversation .panel .discussion-container {
|
.conversation .panel .discussion-container {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
position: relative; }
|
position: relative; }
|
||||||
|
.conversation .panel .discussion-container .bar-container {
|
||||||
|
height: 5px; }
|
||||||
.conversation .panel .discussion-container .message-list {
|
.conversation .panel .discussion-container .message-list {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -618,13 +647,6 @@ input.search {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 2em 8px 0;
|
padding: 2em 8px 0;
|
||||||
overflow-y: auto; }
|
overflow-y: auto; }
|
||||||
.conversation .panel .discussion-container .message-list:before {
|
|
||||||
display: block;
|
|
||||||
margin: -25px auto 10px;
|
|
||||||
content: " ";
|
|
||||||
height: 16px;
|
|
||||||
width: 16px;
|
|
||||||
border: solid 3px transparent; }
|
|
||||||
|
|
||||||
.group-member-list,
|
.group-member-list,
|
||||||
.new-group-update,
|
.new-group-update,
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// Global Settings, Variables, and Mixins
|
// Global Settings, Variables, and Mixins
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
@import 'global';
|
@import 'global';
|
||||||
|
@import 'progress';
|
||||||
|
|
||||||
// Build the main view
|
// Build the main view
|
||||||
@import 'index';
|
@import 'index';
|
||||||
|
|
|
@ -809,6 +809,33 @@
|
||||||
.intl-tel-input .country-list .iti-flag, .intl-tel-input .country-list .country-name {
|
.intl-tel-input .country-list .iti-flag, .intl-tel-input .country-list .country-name {
|
||||||
margin-right: 6px; }
|
margin-right: 6px; }
|
||||||
|
|
||||||
|
@keyframes progress-bar-stripes {
|
||||||
|
from {
|
||||||
|
background-position: 40px 0; }
|
||||||
|
to {
|
||||||
|
background-position: 0 0; } }
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
-webkit-background-size: 40px 40px;
|
||||||
|
background-size: 40px 40px; }
|
||||||
|
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent); }
|
||||||
|
|
||||||
|
.progress-bar.active {
|
||||||
|
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
-o-animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
animation: progress-bar-stripes 2s linear infinite; }
|
||||||
|
|
||||||
|
.bar-container {
|
||||||
|
background: #a2d2f4; }
|
||||||
|
.bar-container .progress-bar {
|
||||||
|
height: 100%; }
|
||||||
|
|
||||||
.iti-flag {
|
.iti-flag {
|
||||||
background: url("/images/flags.png"); }
|
background: url("/images/flags.png"); }
|
||||||
|
|
||||||
|
@ -1047,28 +1074,6 @@ ul.country-list {
|
||||||
float: right;
|
float: right;
|
||||||
margin-left: 10px; }
|
margin-left: 10px; }
|
||||||
|
|
||||||
@keyframes progress-bar-stripes {
|
|
||||||
from {
|
|
||||||
background-position: 40px 0; }
|
|
||||||
to {
|
|
||||||
background-position: 0 0; } }
|
|
||||||
.progress-bar-striped {
|
|
||||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
|
||||||
-webkit-background-size: 40px 40px;
|
|
||||||
background-size: 40px 40px; }
|
|
||||||
|
|
||||||
.progress-bar-striped {
|
|
||||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.75) 75%, transparent 75%, transparent); }
|
|
||||||
|
|
||||||
.progress-bar.active {
|
|
||||||
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
|
||||||
-o-animation: progress-bar-stripes 2s linear infinite;
|
|
||||||
animation: progress-bar-stripes 2s linear infinite; }
|
|
||||||
|
|
||||||
.progress-dialog {
|
.progress-dialog {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
@import 'intlTelInput';
|
@import 'intlTelInput';
|
||||||
|
@import 'progress';
|
||||||
.iti-flag {
|
.iti-flag {
|
||||||
// override intlTelInput's flags image location
|
// override intlTelInput's flags image location
|
||||||
background: url("/images/flags.png");
|
background: url("/images/flags.png");
|
||||||
|
@ -283,31 +284,6 @@ ul.country-list {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@keyframes progress-bar-stripes {
|
|
||||||
from {
|
|
||||||
background-position: 40px 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
background-position: 0 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.progress-bar-striped {
|
|
||||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
|
||||||
-webkit-background-size: 40px 40px;
|
|
||||||
background-size: 40px 40px;
|
|
||||||
}
|
|
||||||
.progress-bar-striped {
|
|
||||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
|
||||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
|
||||||
}
|
|
||||||
.progress-bar.active {
|
|
||||||
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
|
||||||
-o-animation: progress-bar-stripes 2s linear infinite;
|
|
||||||
animation: progress-bar-stripes 2s linear infinite;
|
|
||||||
}
|
|
||||||
.progress-dialog {
|
.progress-dialog {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
|
33
stylesheets/progress.scss
Normal file
33
stylesheets/progress.scss
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
@keyframes progress-bar-stripes {
|
||||||
|
from {
|
||||||
|
background-position: 40px 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
||||||
|
-webkit-background-size: 40px 40px;
|
||||||
|
background-size: 40px 40px;
|
||||||
|
}
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, .75) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .75) 50%, rgba(255, 255, 255, .75) 75%, transparent 75%, transparent);
|
||||||
|
}
|
||||||
|
.progress-bar.active {
|
||||||
|
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
-o-animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
animation: progress-bar-stripes 2s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-container {
|
||||||
|
background: $blue_l;
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue