Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion media/com_joomgallery/js/joomgrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const defaults = {
pagination: 1,
layout: 'masonry',
num_columns: 3,
num_images: 12,
lightbox: false,
thumbnails: false,
lightboxes: {},
Expand Down Expand Up @@ -79,7 +80,7 @@ var callback = function() {
const imgs = document.querySelectorAll('.' + window.joomGrid.gridclass + ' img');
const options = {
idealHeight: window.joomGrid.justified.height,
maxRowImgs: 16,
maxRowImgs: Math.ceil(window.joomGrid.num_images * 1.2),
rowGap: window.joomGrid.justified.gap,
columnGap: window.joomGrid.justified.gap,
};
Expand Down
2 changes: 1 addition & 1 deletion site/com_joomgallery/src/Model/GalleryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ protected function setImagesModelState(ListModel &$listModel, array $fields = ar
}

// Load the number of images defined in the configuration
$listModel->setState('list.limit', $params['configs']->get('jg_gallery_view_numb_images', 12, 'int'));
$listModel->setState('list.limit', $params['configs']->get('jg_gallery_view_numb_images', 15, 'int'));

// Apply number of images to be loaded from list in the view
if(isset($imgform_list['limit']))
Expand Down
1 change: 1 addition & 0 deletions site/com_joomgallery/tmpl/category/default_cat.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
$iniJS .= ' pagination: ' . $use_pagination . ',';
$iniJS .= ' layout: "' . $category_class . '",';
$iniJS .= ' num_columns: ' . $num_columns . ',';
$iniJS .= ' num_images: ' . $numb_images . ',';
$iniJS .= ' lightbox: ' . ($lightbox ? 'true' : 'false') . ',';
$iniJS .= ' thumbnails: ' . ($thumbnails ? 'true' : 'false') . ',';
$iniJS .= ' justified: {height: '.$justified_height.', gap: '.$justified_gap.'}';
Expand Down
2 changes: 2 additions & 0 deletions site/com_joomgallery/tmpl/gallery/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
$image_type = $this->params['configs']->get('jg_gallery_view_type_image', 'thumbnail', 'STRING');
$gallery_class = $this->params['configs']->get('jg_gallery_view_class', 'masonry', 'STRING');
$num_columns = $this->params['configs']->get('jg_gallery_view_num_columns', 3, 'INT');
$numb_images = $this->params['configs']->get('jg_gallery_view_numb_images', 15, 'INT');
$image_class = $this->params['configs']->get('jg_gallery_view_image_class', 0, 'INT');
$justified_height = $this->params['configs']->get('jg_gallery_view_justified_height', 200, 'INT');
$justified_gap = $this->params['configs']->get('jg_gallery_view_justified_gap', 5, 'INT');
Expand Down Expand Up @@ -57,6 +58,7 @@
$iniJS .= ' pagination: 0,';
$iniJS .= ' layout: "' . $gallery_class . '",';
$iniJS .= ' num_columns: ' . $num_columns . ',';
$iniJS .= ' num_images: ' . $numb_images . ',';
$iniJS .= ' lightbox: ' . ($lightbox ? 'true' : 'false') . ',';
$iniJS .= ' justified: {height: '.$justified_height.', gap: '.$justified_gap.'}';
$iniJS .= '};';
Expand Down