Move toolbar declaration after the :visible check, like it was before [28019].

props kovshenin.
fixes #24859.

git-svn-id: https://develop.svn.wordpress.org/trunk@28046 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-04-08 11:20:34 +00:00
parent 0e44baa89e
commit 82ac1009c4

View File

@ -4903,13 +4903,14 @@
scroll: function() {
var view = this,
toolbar = this.views.parent.toolbar;
toolbar;
// @todo: is :visible still necessary?
if ( ! this.$el.is(':visible') || ! this.collection.hasMore() ) {
return;
}
toolbar = this.views.parent.toolbar;
// Show the spinner only if we are close to the bottom.
if ( this.el.scrollHeight - ( this.el.scrollTop + this.el.clientHeight ) < this.el.clientHeight / 3 ) {
toolbar.get('spinner').show();