Admidio / admidio

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
https://www.admidio.org
GNU General Public License v2.0
336 stars 131 forks source link

Navigation icons in photo view have wrong position #67

Closed Fasse closed 9 years ago

Fasse commented 9 years ago

If you view the photos in the photo module than the navigation icons have wrong position with Chrome and Safari on iPad.

See http://forum.admidio.org/viewtopic.php?p=21359

ximex commented 9 years ago

I have updated the lib ekko-lightbox. maybe this have fixed this.

I found an other little bug: https://github.com/ashleydw/lightbox/issues/121

ximex commented 9 years ago

Ok i found a way to fix this. but this has to get fixed in the ekko-lightbox lib.

ekko-lightbox.js Line 315ff

preloadImage: function(src, onLoadShowImage) {
  var img,
    _this = this;
  img = new Image();
  if ((onLoadShowImage == null) || onLoadShowImage === true) {
    img.onload = function() {
      var image;
      image = $('<img />');
      image.attr('src', img.src);
      image.addClass('img-responsive');
      _this.lightbox_body.html(image);
      if (_this.modal_arrows) {
        _this.modal_arrows.css('display', 'block');
      }
      // Start Fix
      image.load(function() {
        _this.resize(img.width);
      });
      // End Fix
      return _this.options.onContentLoaded.call(_this);
    };
    img.onerror = function() {
      return _this.error('Failed to load image: ' + src);
    };
  }
  img.src = src;
  return img;
}
ximex commented 9 years ago

i created a pull request to fix this bug in the lib. Waiting for merge https://github.com/ashleydw/lightbox/pull/126

ximex commented 9 years ago

fixed with https://github.com/Admidio/admidio/commit/4782b09e4d4db4007b394c96913478fdc5004750