Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Gallery - CSS classes in rows are wrong #2803

Closed
ghost opened this issue Nov 29, 2011 · 4 comments
Closed

Gallery - CSS classes in rows are wrong #2803

ghost opened this issue Nov 29, 2011 · 4 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Nov 29, 2011

Hello Leo!

I do not know, if this is a feature or a bug.

If number of images per page is limited and paging is needed, the last row of the first page does not have the CSS class "row_last". Only in the last row of the last page this class is set. The same is to "row_first" on second and following pages. This is only set on first page first row.

For CSS formatting, I think, it looks better, to have the possibility, to set properties to first and last row on each page not only on first or last page.

Sincerely
Oliver

--- Originally created by ofriedrich on January 15th, 2011, at 08:08pm (ID 2803)

@ghost ghost assigned leofeyer Nov 29, 2011
@ghost
Copy link
Author

ghost commented Nov 29, 2011

My mistake: row_first is set correctly! It only happens to row_last.

If you have only one row, both classes should be set. This should be the same to col_first and col_last, if there is only one column.

system/modules/frontend/ContentGallery.php
near line 228 replace

            if (($i + $this->perRow) >= count($images))
            {
                $class_tr = ' row_last';
            }

with

            if (($i + $this->perRow) >= $limit)
            {
                $class_tr .= ' row_last';
            }

near line 245 replace

                if ($j == ($this->perRow - 1))
                {
                    $class_td = ' col_last';
                }

with

                if ($j == ($this->perRow - 1))
                {
                    $class_td .= ' col_last';
                }

Detected in Contao version 2.9.3

--- Originally created by ofriedrich on January 16th, 2011, at 06:52am

@leofeyer
Copy link
Member

[[WikiIncompleteDe|Unvollständiges Ticket]]

--- Originally created on January 21st, 2011, at 11:00pm

@leofeyer
Copy link
Member

Fixed in a79d757.

--- Originally created on February 24th, 2011, at 03:19pm

@leofeyer
Copy link
Member

--- Originally completed on February 24th, 2011, at 03:19pm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant