Skip to content

Commit

Permalink
Доработка more
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhelskiy committed Nov 1, 2015
1 parent 717095f commit 7259712
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions frontend/components/more/js/more.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@
var countLeft = this.getCount() - response.count_loaded;

if ( countLeft <= 0 ) {
this.destroy();
this.element.remove();
response.hide = true;
} else {
this.setCount( countLeft );
}
Expand All @@ -138,16 +137,16 @@
if ( response[ v ] ) this._setParam( v, response[ v ] );
}.bind( this ));

if ( response.hide ) {
this.destroy();
this.element.remove();
}

} else {
// Для блоков без счетчиков
ls.msg.notice( null, ls.lang.get( 'more.empty' ) );
}

this.destroy();
this.element.remove();
if ( response.hide ) {
this.element.hide();
} else {
this.element.show();
}

this.unlock();
Expand Down

0 comments on commit 7259712

Please sign in to comment.