When you open a file from Sharepoint, it will receive a short term lock that will prevent others to change some properties on the file. This protection can be useful, but also very annoying, for example when the file is not closed properly, then the lock could stay « forever ». There are many posts on the […]
Étiquette : sharepoint
Sharepoint WopiFrame allow framing
In Sharepoint you can use <WebPartPages:AllowFraming runat= »server » /> to disable the SAMEORIGIN for X-FRAME-OPTION giving you the opportunity to call your page from an iframe (see this other article). However you cannot use the same trick to preview a file into the browser with WopiFrame.aspx. But there is a way to do it, using the […]
Change a « Choice with Fill-In » field into a magic dropdown [Sharepoint]
Sometimes you want to modify the options for a dropdown box by removing some existing options, however you want to be able to keep these old values for reporting or whatever reasons. Below is a way to do it by using jQuery and SharepointPlus. It will hide the « Specify your own value » stuff, and add […]
Trigger an event when a file is uploaded on Sharepoint 2013 by drag and drop
If you want to trigger an event after a drag&drop a file for an upload operation on Sharepoint, then you’ll have to add some JavaScript into your page. // we need to make sure sp.core.js is loaded SP.SOD.executeOrDelayUntilScriptLoaded(function() { window.UploadFinishFunc=function(b, a) { typeof g_currentControl.postUploadFunc == « function » && a.status != UploadStatus.CANCELLED && g_currentControl.postUploadFunc(a.files); a.status != UploadStatus.CANCELLED […]
Adding a custom action to a callout in SharePoint 2013
This article has been VERY useful. But I wanted something lightly different: I wanted to add a custom action, but also have the « EDIT » button (but not the « SHARE »), and to use the current item info for my custom action. Here is the result: // source: https://www.eliostruyf.com/adding-a-custom-action-to-a-callout-in-sharepoint-2013/ // add a special callout action for our […]
Sharepoint Callout Documentation
It’s difficult to find the JavaScript documentation for the Sharepoint Callout popup… So there is the link for a quick reference: https://msdn.microsoft.com/en-us/library/office/dn135236%28v=office.15%29.aspx
How to hide the left navigation bar in Sharepoint without CSS
We can easily find some workarounds to hide the left navigation bar on Sharepoint using CSS…. But I wanted to remove it on a specific page, without using any CSS. It’s actually pretty simple. You need to add the below tag into your .aspx page: <asp:Content ContentPlaceHolderID= »PlaceHolderLeftNavBar » runat= »Server »></asp:Content> Tested with Sharepoint 2013 On-Promise.
How to cache the CSS Fonts with Sharepoint
If you use your own CSS file with your own CSS fonts, then we’ll notice that Sharepoint doesn’t send cache headers if you use the below CSS code: @font-face { font-family: ‘Roboto’; src: url(‘/_catalogs/masterpage/css/fonts/Roboto/Regular/Roboto-Regular.woff2’) format(‘woff2’), url(‘/_catalogs/masterpage/css/fonts/Roboto/Regular/Roboto-Regular.woff’) format(‘woff’), url(‘/_catalogs/masterpage/css/fonts/Roboto/Regular/Roboto-Regular.ttf’) format(‘truetype’); font-weight: 400; font-style: normal; } To have this resource sent back from the Sharepoint server with […]
Sharepoint CallOut Popup
You can find the documentation of the cool Sharepoint CallOut Popup on dev.office.com: https://dev.office.com/sharepoint/docs/sp-add-ins/highlight-content-and-enhance-the-functionality-of-sharepoint-hosted-sharepoint
Create an Unpublished Content view for the masterpage galery [Sharepoint]
With Sharepoint 2013 I wanted an easy way to list of the pages in my masterpage galery that haven’t been published yet. You first need to Create a new view named Unpublished Content. You can sort by Name, and scroll down to the Folders settings and choose Show all items without folders. We now have […]