diff --git a/modules/collections/client/controllers/collections.client.controller.js b/modules/collections/client/controllers/collections.client.controller.js index ec440fe7..20188495 100644 --- a/modules/collections/client/controllers/collections.client.controller.js +++ b/modules/collections/client/controllers/collections.client.controller.js @@ -6,16 +6,29 @@ .controller('CollectionController', CollectionController); CollectionController.$inject = ['$scope', '$translate', 'getStorageLangService', 'MeanTorrentConfig', 'CollectionsService', 'NotifycationService', - 'DebugConsoleService']; + 'DebugConsoleService', '$timeout']; function CollectionController($scope, $translate, getStorageLangService, MeanTorrentConfig, CollectionsService, NotifycationService, - mtDebug) { + mtDebug, $timeout) { var vm = this; vm.lang = getStorageLangService.getLang(); vm.appConfig = MeanTorrentConfig.meanTorrentConfig.app; vm.itemsPerPageConfig = MeanTorrentConfig.meanTorrentConfig.itemsPerPage; vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig; + /** + * window.resize() + */ + $(window).resize(function () { + vm.setAlbumItemHeight(); + }); + + /** + * setAlbumItemHeight + */ + vm.setAlbumItemHeight = function () { + $('.collection-item').height($('.collection-item').width() / 1.772); + }; /** * buildPager @@ -37,6 +50,10 @@ vm.filterLength = items.total; vm.pagedItems = items.rows; + $timeout(function () { + vm.setAlbumItemHeight(); + }, 10) + if (callback) callback(); }); }; diff --git a/modules/collections/client/views/collections.client.view.html b/modules/collections/client/views/collections.client.view.html index a262e24c..746eeec3 100644 --- a/modules/collections/client/views/collections.client.view.html +++ b/modules/collections/client/views/collections.client.view.html @@ -27,7 +27,7 @@
-
+