Adjusting flashing loading indicator to be less conspicuous.

This commit is contained in:
Samuel Clay 2016-06-28 16:50:30 -07:00
parent 65888f4270
commit 9f3cd66822
4 changed files with 30 additions and 19 deletions

View file

@ -748,7 +748,8 @@ def load_single_feed(request, feed_id):
# if page <= 3:
# import random
# time.sleep(random.randint(2, 4))
# time.sleep(random.randint(2, 7) / 10.0)
# # time.sleep(random.randint(2, 14))
# if page == 2:
# assert False

View file

@ -84,15 +84,19 @@ NEWSBLUR.InteractionsPopover = NEWSBLUR.ReaderPopover.extend({
this.hide_loading();
var $endline = $.make('div', { className: "NB-end-line NB-short" });
$endline.css({'background': '#E1EBFF'});
$endline.css({'background': '#FFF'});
this.$(".NB-"+this.options.tab+"-container").append($endline);
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
$endline.animate({'backgroundColor': '#E1EBFF'}, {'duration': 550, 'easing': 'easeInQuad'})
.animate({'backgroundColor': '#5C89C9'}, {'duration': 1550, 'easing': 'easeOutQuad'})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
this.interactions_loading = setInterval(function() {
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
}, 1500);
_.delay(_.bind(function() {
this.interactions_loading = setInterval(function() {
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
}, 1700);
}, this), (550+1550+1050) - 1700);
},
hide_loading: function() {

View file

@ -361,15 +361,18 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
var $feed_scroll = NEWSBLUR.reader.$s.$feed_scroll;
this.$('.NB-end-line').remove();
var $endline = $.make('div', { className: "NB-end-line NB-short" });
$endline.css({'background': '#E1EBFF'});
$endline.css({'background': '#FFF'});
$feed_scroll.append($endline);
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
$endline.animate({'backgroundColor': '#E1EBFF'}, {'duration': 550, 'easing': 'easeInQuad'})
.animate({'backgroundColor': '#5C89C9'}, {'duration': 1550, 'easing': 'easeOutQuad'})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
this.feed_stories_loading = setInterval(function() {
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
}, 1700);
_.delay(_.bind(function() {
this.feed_stories_loading = setInterval(function() {
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
}, 1700);
}, this), (550+1550+1050) - 1700);
},
check_premium_river: function() {

View file

@ -163,15 +163,18 @@ NEWSBLUR.Views.StoryTitlesView = Backbone.View.extend({
var $story_titles = NEWSBLUR.reader.$s.$story_titles;
this.$('.NB-end-line').remove();
var $endline = $.make('div', { className: "NB-end-line NB-short" });
$endline.css({'background': '#E1EBFF'});
$endline.css({'background': '#FFF'});
$story_titles.append($endline);
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
$endline.animate({'backgroundColor': '#E1EBFF'}, {'duration': 550, 'easing': 'easeInQuad'})
.animate({'backgroundColor': '#5C89C9'}, {'duration': 1550, 'easing': 'easeOutQuad'})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
this.feed_stories_loading = setInterval(function() {
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
}, 1700);
_.delay(_.bind(function() {
this.feed_stories_loading = setInterval(function() {
$endline.animate({'backgroundColor': '#5C89C9'}, {'duration': 650})
.animate({'backgroundColor': '#E1EBFF'}, 1050);
}, 1700);
}, this), (550+1550+1050) - 1700);
if (options.scroll_to_loadbar) {
this.pre_load_page_scroll_position = $('#story_titles').scrollTop();