New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorbox doesn't recognize gallery sets #8309

Closed
slyhne opened this Issue May 13, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@slyhne
Contributor

slyhne commented May 13, 2015

Colorbox in Elgg 1.11.1 is unable to recognize gallery sets. So I'm missing prev/next on images in a set.

I have tried different things, like change colorbox opts to include:
slideshow: true and rel: 'market-galley'

Is it my markup that's wrong, or is it a bug?

HTML output:

    <div>
      <a href="http://www.example.com/market/image/147/1/master/1431517965.jpg" class="elgg-lightbox-photo market-thumbnail" rel="market-gallery">
        <img src="http://"http://www.example.com/market/image/147/1/small/1431517965.jpg" class="elgg-photo"/>
      </a>
      <a href="http://www.example.com/market/image/148/1/master/1431517975.jpg" class="elgg-lightbox-photo market-thumbnail" rel="market-gallery">
        <img src="http://"http://www.example.com/market/image/148/1/small/1431517975.jpg" class="elgg-photo"/>
      </a>
      <a href="http://www.example.com/market/image/149/1/master/1431517979.jpg" class="elgg-lightbox-photo market-thumbnail" rel="market-gallery">
        <img src="http://"http://www.example.com/market/image/149/1/small/1431517979.jpg" class="elgg-photo"/>
      </a>
    </div>
@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay May 13, 2015

Member

Probably a bug in elgg.ui.lightbox. Does it work if you call $('a.market-thumbnail').colorbox() directly?

Member

mrclay commented May 13, 2015

Probably a bug in elgg.ui.lightbox. Does it work if you call $('a.market-thumbnail').colorbox() directly?

@slyhne

This comment has been minimized.

Show comment
Hide comment
@slyhne

slyhne May 13, 2015

Contributor

That actually works, but first image comes up with this text besides the prev/next buttons:

Image {#index#} of {#count#}

After 2 seconds this text becomes:

Image 1 of 3

There is definitely something strange going on :)

Contributor

slyhne commented May 13, 2015

That actually works, but first image comes up with this text besides the prev/next buttons:

Image {#index#} of {#count#}

After 2 seconds this text becomes:

Image 1 of 3

There is definitely something strange going on :)

@slyhne

This comment has been minimized.

Show comment
Hide comment
@slyhne

slyhne May 13, 2015

Contributor

Maybe not so good a test I did. The first test was done with my modified js/lightbox/settings.php where I had added these two to colorbox opts:

slideshow: true,
rel: 'market-galley',

  • With slideshow: true alone it doesn't work at all.
  • With rel= 'market-galley' alone I got prev/next, but no option to stop/start slideshow.
  • With both I get prev/next and start/stop slideshow.

The text I get first is the translated string, after 2 seconds these are replaced by what I believe is the built in text strings.

Strange...

Contributor

slyhne commented May 13, 2015

Maybe not so good a test I did. The first test was done with my modified js/lightbox/settings.php where I had added these two to colorbox opts:

slideshow: true,
rel: 'market-galley',

  • With slideshow: true alone it doesn't work at all.
  • With rel= 'market-galley' alone I got prev/next, but no option to stop/start slideshow.
  • With both I get prev/next and start/stop slideshow.

The text I get first is the translated string, after 2 seconds these are replaced by what I believe is the built in text strings.

Strange...

@jdalsem

This comment has been minimized.

Show comment
Hide comment
@jdalsem

jdalsem May 18, 2015

Member

i can confirm this issue. I ran into similar problems when working on a solution for #4158

Member

jdalsem commented May 18, 2015

i can confirm this issue. I ran into similar problems when working on a solution for #4158

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Apr 6, 2016

feature(js): adds elgg/lightbox AMD module, loaded on all pages
`elgg/lightbox` AMD module can now be used to open and close the lightbox
programmatically. The module is inlined in `elgg.js` alongside the colorbox
library, and the CSS is included with `elgg.css` as well.

Hence it's no longer necessary to use `elgg_load_js('lightbox')` or
`elgg_load_css('lightbox')`.

Fixes #7895
Fixes #8309
Fixes #6991

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Apr 6, 2016

feature(js): adds elgg/lightbox AMD module, loaded on all pages
`elgg/lightbox` AMD module can now be used to open and close the lightbox
programmatically. The module is inlined in `elgg.js` alongside the colorbox
library, and the CSS is included with `elgg.css` as well.

Hence it's no longer necessary to use `elgg_load_js('lightbox')` or
`elgg_load_css('lightbox')`.

Fixes #7895
Fixes #8309
Fixes #6991

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Apr 6, 2016

feature(js): adds elgg/lightbox AMD module, loaded on all pages
`elgg/lightbox` AMD module can now be used to open and close the lightbox
programmatically. The module is inlined in `elgg.js` alongside the colorbox
library, and the CSS is included with `elgg.css` as well.

Hence it's no longer necessary to use `elgg_load_js('lightbox')` or
`elgg_load_css('lightbox')`.

Fixes #7895
Fixes #8309
Fixes #6991

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Apr 6, 2016

feature(js): adds elgg/lightbox AMD module, loaded on all pages
`elgg/lightbox` AMD module can now be used to open and close the lightbox
programmatically. The module is inlined in `elgg.js` alongside the colorbox
library, and the CSS is included with `elgg.css` as well.

Hence it's no longer necessary to use `elgg_load_js('lightbox')` or
`elgg_load_css('lightbox')`.

Fixes #7895
Fixes #8309
Fixes #6991

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Apr 6, 2016

feature(js): adds elgg/lightbox AMD module, loaded on all pages
`elgg/lightbox` AMD module can now be used to open and close the lightbox
programmatically. The module is inlined in `elgg.js` alongside the colorbox
library, and the CSS is included with `elgg.css` as well.

Hence it's no longer necessary to use `elgg_load_js('lightbox')` or
`elgg_load_css('lightbox')`.

Fixes #7895
Fixes #8309
Fixes #6991

@mrclay mrclay closed this in #9625 Apr 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment