Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • BarneyHall 141 posts 210 karma points
    Nov 26, 2009 @ 17:36
    BarneyHall
    0

    Any way to turn the preview off?

    Hi, this is superb. But I just wondered if there was an easy way to turn the preview off? I'm just listing pdf documents from Media and the large folder icons are a bit over bearing.

    Many thanks,
    Barney

  • Laurence Gillian 600 posts 1219 karma points
    Nov 26, 2009 @ 18:01
    Laurence Gillian
    0

    Yes we also have this issue, might be quite nice if it just showed the latest 6, etc?

    /L

  • BarneyHall 141 posts 210 karma points
    Nov 27, 2009 @ 12:51
    BarneyHall
    0

    No one knows how to turn off the thumb?

    I've made it a transparent png but the dimensions appear to be hardcoded.

    Cheers,
    Barney

  • Marco Lusini 176 posts 1370 karma points
    Dec 01, 2009 @ 16:49
    Marco Lusini
    0

    Errr... I should know :)

    Sorry for being late, I just wish this forum supported mail notifications :(

    Anyway, I had a peek at the code and, although preview can't be turned off, it doesn't has hardcoded dimensions.

    My code tries first to find a suitable thumbnail for the media and, if it can't find any, defaults to the Thumbnail defined in the Media Types tree under Settings section, which are stored under /umbraco/images/thumbnails/.

    So you should be able to create a smaller or transparent PNG in /umbraco/images/thumbnails and assign it to your PDF document Media Type (or to the standard file, if you haven't defined a specific type).

    This is the related code, in treeMultiPickerDataEditor.cs, line 299:

     

    string docImage = (doc.ContentType.Thumbnail != "") ? doc.ContentType.Thumbnail : "../nada.gif";

    docImage =

    GlobalSettings.Path + "/images/thumbnails/" + docImage;

     

    return string.Format(@"<img src=""{0}"" />{1}<span class=""tmpPath"">{2}</span>", docImage, doc.Text, doc.Path);

    Marco

     

     

  • BarneyHall 141 posts 210 karma points
    Dec 04, 2009 @ 15:08
    BarneyHall
    0

    Hi Macro,

    Thanks for coming back to me.

    I've done as you've suggested and changed the thumbnail to a 1x1px transparent PNG but for some reason the image is being displayed at a dimension other than 1 x 1 pixels.

    Please see the linked screen grab which will show more clearly what is occuring:
    http://dl.dropbox.com/u/1512180/Documents_thumbnail_grab.jpg

    There's some firebug info captured in the grab too, to show the dimension and source of the thumbnail.

    Since the thumbnail is taking up so much screen space it's making the user experience of managing the list slightly unpleasant.

    Any ideas?

    Thanks again,
    Barney

  • Marco Lusini 176 posts 1370 karma points
    Dec 05, 2009 @ 09:02
    Marco Lusini
    0

    Ops...

    I forgot that I used CSS to have a fixed width for images (100px), so that they align nicely :)

    You can minimize the space wasted by using an image which is 100px wide, so that the browser doesn't resize it anymore and don't stretch it vertically.

    You could use a 100x1 image or, better, a 100x12 (or an height that matches your line height) with a small PDF logo inside: you'll still waste horizontal space but the overall user experience should be better.

    As a last option you could just remove "td.tmpNode img" class from treeMultiPickerDataEditor.cs and recompile the DLL.

    I'll try to find a better solution for this on the next release, but I don't know when I'll find the time to work on it, so don't hold your breath :)

    Marco

     

  • BarneyHall 141 posts 210 karma points
    Dec 05, 2009 @ 10:43
    BarneyHall
    0

    Thanks Marco - and sorry for calling you Macro last time! :)

    Like I say, it's very nice facility so thanks for making it available. A little bit of polishing is only a nice to have when you get the chance, but I hope the feedback is helpful.

    All the best,
    Barney

  • Marco Lusini 176 posts 1370 karma points
    Dec 06, 2009 @ 09:56
    Marco Lusini
    0

    Yes, a (not so) little cleanup is in my todo list, but is not very high :)

     

Please Sign in or register to post replies

Write your reply to:

Draft