Fixes issue #5936 - page count = infinity

Sets defaults to 200 if any dimension = 0
This commit is contained in:
Gustavo Tandeciarz
2015-10-12 14:15:50 -04:00
parent 9c88c7fcd1
commit 49ab41d4dc

View File

@@ -73,6 +73,8 @@ $(function () {
var listHeight = $('#media-library-main-list').height();
var itemWidth = $('.thumbnail').first().width();
var itemHeight = $('.thumbnail').first().height();
if (itemHeight == 0) itemHeight = 200;
if (itemWidth == 0) itemWidth = 200;
var draftText = $("#media-library").data("draft-text");
var itemsPerRow = Math.floor(listWidth / itemWidth);