+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / 7.0 Images Gallery - move to and Lightbox title problem?

7.0 Images Gallery - move to and Lightbox title problem?

7 posts, 0 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    16 Apr 2014
    Link to this post

    Just upgraded another site from 5.4 to 7.0 and noticed some stuff.

    If you have a image gallery widget on a page which filters a certain library and that library is moved then the page is not updated.

    I have set the parent top library to have 3 thumbnail setting however the wiget lets me choose all available sizes (I would have exepcted only the once set for the library to be available)

    If you leave the comment of a image empty the title will be displayed below the image in lightbox style. I think it used to be that if you had no comment you get no description under the page. If this is default it would force everyone to change the title for every image not to have DSC_044566 displayed.

     

     www.marktold.com/screencast/sf_7_image_gallery.swf

     I have a problem moving some libraries. First I thought it had to do with libraries with more then 100 images bug that did not seem to be the case

    www.marktold.com/screencast/sf_7_image_libraries_move_not_working.swf

    Markus

  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    17 Apr 2014
    Link to this post

    I figured out why I was not able to move some libraries.

    The library to be moved contained some double images. Same URL twice. So when I tried to move it would create the now folder (sublibrary) but due to the erorr stop moving.

    I found this out when I then tried to move the images to the new sub library and got the error message Images_00043 allready exists.

     

    @Telerik

    ----------------

     About the ability to choose all thumb settings in gallery widget when you have only set 2 thumbs settings to a library. It seems the 7.0 has a lazy thumbnail generation. Which makes me wonder if we should still add thumbsettings to libaries and create the thumbs or if this is just needed if you want some api usage on the thumbs.

    -------------------- 

    Still would like to know why titles are now shown in the lightbox when no comments are entered.  

    ----------- 

    Markus

     

  3. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    21 Apr 2014
    Link to this post
    Hello Markus,

    I tried to replicate the behaviour:

    Still would like to know why titles are now shown in the lightbox when no comments are entered.  


    However, the title of the images ( when using lightbox mode of the gallery widget ) was shown in all cases:

    1. Comments disabled.
    2. Comments enabled, none comments entered.
    3. Comments enabled, some of the images containing comments others not.

    In all cases, the controls performed as expected.

    If possible, can you outline your scenario when using a brand new project, to verify the problematic behaviour.

    Regarding the thumbnails - you can continue using the thumbnail generation settings- they are useful in all cases, whether you use thumbnails API or the backend UI.

    Regards,
    Victor Velev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    22 Apr 2014 in reply to Victor Velev
    Link to this post

    Sorry Victor 

    My bad in not getting the problem over correct (translation not comment but description). This screencast should explain it :-)

    www.marktold.com/screencast/sf_lightbox_title_visible.swf

     It used to be like this. If you entered a description for an image you would get the bar under the image when using lightbox.No description = no bar (description) for image.

    Now in 7.0 if you have no description the comment is shown which is (if not changed) often something like DSC_98938 or similar.

    So in order not to get an useless description under the image you need to give proper titles to each image. Which if you have a lot can be a lot of work.

    Markus

     

  5. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    24 Apr 2014
    Link to this post
    Hi Markus,

    The lightbox image title is set directly from the presenting image and falls back to its title when there is no description. We can change its behavior client side and choose whether to show the lightbox title at all, or only the one that has description.
    To disable the title you should add the following javascript to the page where the gallery is:
    Telerik.Sitefinity.Modules.Libraries.Web.UI.Images.MasterThumbnailLightBoxView.prototype.
    _onLoad= function () {
      $('#' + this.get_element().id + " a.sfLightBox").fancybox({'titleShow':false});
    }
    Load it before the closing body tag.

    If you want the previous behavior, i.e the description to be shown if there is one, add the following to the List of thumbnails and overlay dialog (lightbox) template (Line 3):
    1.<sf:SitefinityHyperLink
    2.          CssClass="sfLightBox"
    3.         data-desc='<%# Eval("Description")%>'
    4.          runat="server"
    5.          rel='<%# String.Format("{0}_mainImageGallery", this.ClientID) %>'
    6.          id="singleItemLink"/>
    and the following javascript:
    01.Telerik.Sitefinity.Modules.Libraries.Web.UI.Images.MasterThumbnailLightBoxView.prototype.
    02._onLoad= function () {
    03.  var els = $("a.sfLightBox");
    04.  debugger;
    05.  for(var i=0; i<els.length; i++){
    06.    var desc= $(els[i]).data("desc");
    07.    $(els[i]).attr("title",desc);
    08.    $('#' + this.get_element().id + " a.sfLightBox").fancybox();
    09.  }
    10.}
    Result.
    I hope this helps.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  6. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    25 Apr 2014 in reply to Nikola Zagorchev
    Link to this post

    Dear Nikola

    Thanks for the help. Any reason why this was changed?

    Markus

  7. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    28 Apr 2014
    Link to this post
    Hi Markus,

    The generated <a> tag element has title property automatically added and when you do not have description of the image it fallbacks to the image title. Then, this property is used as the lightbox by the fancybox plugin, which generates the full images gallery.
    Since, changing the template will not work in this case, the changes should be done client side.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
7 posts, 0 answered