Home › Forums › vLooup for SharePoint › DocIcon for PDFs and upload multiple text
- This topic has 5 replies, 2 voices, and was last updated 9 years, 7 months ago by Alexander Bautz.
-
AuthorPosts
-
-
April 9, 2015 at 20:40 #7387
Hi Alexander,
I ran into an issue with DocIcon as a column in vLookup, it shows a blank white page for PDFs instead of the usual Adobe icon (I added the icon myself: http://support.microsoft.com/en-us/kb/832809)
It is pointing to the generic icon: /_layouts/images/icgen.gif
Instead of what shows in the document library: /_layouts/images/pdf16.pngI was also wondering if this could be a feature in the future, or how to add it to the current one:
Having an option to hide or remove the “Upload multiple files” text when using the add button from the parent. This is counter intuitive if pre-populating since upload multiple skips the edit page, resulting in a bunch of files with no association.Thanks!
-
April 9, 2015 at 22:25 #7389
Hi,
By default vLookup expects a gif icon for pre SP2013 and png icon for SP2013 when handling PDF files.Does this explain the issue?
Regarding the upload multiple issue: are you using SP2010?
Alexander
-
April 10, 2015 at 16:42 #7394
I am using SP2010,
I replaced the png with a gif, updated the xml and restarted iis, the gif is showing in my normal document folders but still getting white generic icon in the vlookup areas
-
April 10, 2015 at 19:32 #7395
Oh, I forgot – the vLookup script will sense the pdf document type, but will try to add a link to an icon named “icpdf” of type gif for SP2007/10 and type png for SP2013.
If you change the name of your icon to icpdf.gif it should work.
If this is cumbersome, you can override the function that puts in the icgen icon like this (put this below where you include the vLookup script):
spjs.vLookup.imgErr = function(img){ if(spjs.$(img).attr("src").match(/pdf\./)){ spjs.$(img).attr("src","/_layouts/images/pdf16.gif"); // ensure the path is correct }else{ spjs.$(img).attr("src","/_layouts/images/icgen.gif"); } }
Hope this helps,
Alexander -
April 10, 2015 at 19:43 #7396
That did the trick, renamed the icon to icpdf and they look great!
Now I just have to figure out the upload multiple files.., I was able to remove it from all document libraries(from the uploadx.aspx in layouts) but really I just need it for the one being used with vlookup so I reverted the change for now.
-
April 10, 2015 at 20:07 #7397
Hi,
The only way I can think of is to add this code to the master page of the site – put it at the BOTTOM, right before the closing </body> tag:<script type="text/javascript"> if(location.pathname.toLowerCase() === "/_layouts/upload.aspx"){ if(GetUrlKeyValue("List").toLowerCase() === "4c886136-1a92-4e8f-bf80-17880df177ab"){ // Change GUID to match your library document.getElementById("ctl00_PlaceHolderMain_ctl01_ctl05_UploadMultipleLink").style.display = "none"; } } </script>
Change the path “/_layouts/upload.aspx” to include any subsites – like “/sites/mysite/_layouts/upload.aspx”, (note that the url is in lower case letters) and change the GUID to the library. You may also want to check that the ID of the upload link is correct.
Hope this helps,
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.