restrict lightbox nav in table view

lcollong

FabriKant d'applications web
Hi,

Having a list with a repeated join on another one containing a non-ajax fileupload element.
In list view (merge and reduce), it displays the records with a variable number of images as expected.
Clicking on one of them show up the mediabox popup with the full image. But you can navigate to all the image in the page. Not only to the one belonging to the same record.

Have found this post : http://fabrikar.com/forums/index.php?threads/fileupload-issues.37607/
on the same matter.

I did the following mod on /plugins/fabrik_element/fileupload/models/image.php :

PHP:
//        $n = $this->inTableView ? '' : $model->getElement()->name;
        $n = $this->inTableView ? (string)$thisRow->slug : $model->getElement()->name;       

        if ($params->get('restrict_lightbox', 1) == 0)
        {
            $n = '';
        }

Thus adding the pk_value in the lightbox parameters which restrict the navigation to the images belonging to the same record.

According to github, Troester proposal wasn't committed. What are the possible side effects of such a mod ? Wouldn't be useful ?

I can't use layout override to do it because the pk / rowid is not available in the $displayData object.

Any suggestion ?

Thanks
 
I assume I closed the pull request because meanwhile it had conflicts.

I still think it would be usefull. Maybe we would have to add an extra option like restrict_lightbox_list to keep it backward compatible (although I can't imagine that somebody wants to restrict it to an element in details view but want to scroll through ALL elements and all records in list view).
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top