1

I'm using SharePoint online. I've a list and, in the datasheet view, I put some HTML code in a script web part. I've found the code for the sticky headers here: http://spoodoo.com/products/stickyheaders-for-sharepoint/

This is the HTML code:

<script src="https://contoso.sharepoint.com/mysite/ContentEditor/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="https://contoso.sharepoint.com/mysite/ContentEditor/StickyHeaders_3.1.1.js"></script>

Everything is working fine for my user (site collection administrator), but when I try with a "normal" user, the script is not working.

I've put js files in a document library called ContentEditor and checked permissions for this document library.

I've also disabled MDS (Minimal Download Strategy) for this specific site.

Any idea?

  • Are the files checked in? What does the browser's console inform to the regular user for who the script doesn't work? – moe Jul 10 '17 at 13:58
  • Files are ok. I've seen in Network tab on Google Chrome that js files are correctly loaded, but nothing happens. Also I've added a simple console.log("test") to the web part and it is displayed correctly in the browser console. – Pepozzo Jul 10 '17 at 14:04
2

I'm the author of this script and I just fixed that bug and released a new version.

For some reason the order of class names of certain DOM elements is different when the permission level is below Edit. My script was looking for some elements where the first class name starts with 'ms-vh' via a selector similar to this one: element[class^='ms-vh']. When the order of class names is different though, this doesn't work any longer. The solution was to replace the selector with one that looks like this: element[class*='ms-vh']).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.