I wanted to change the behavior of the “Edit Item” button from the Sharepoint 2010 ribbon of the Display Form (DispForm.aspx). It wasn’t really easy, so I finally found a solution that I’m going to share here. You’ll need to use JavaScript for that. In the below example, the click on the “Edit Item” will […]
Tag: Niveau intermédiaire
Show/Hide a Sharepoint fields in the NewForm, EditForm and DispForm
With the Sharepoint WebServices it’s possible to hide a field into the NewForm, the Editform and/or the DispForm. You’ll need to use JavaScript with jQuery and SPServices. It’s the UpdateList service that will do the trick. Once you have loaded the both librairies you can use the below code: var fieldsToUpdate = ‘<Fields>’; fieldsToUpdate += […]
Delete a User Custom Action from Sharepoint [JavaScript]
The MSDN documentation is a nightmare…. For example Microsoft provides an example to create a User Custom Action for Sharepoint, however there is no code about how to delete it. So here is the code to use to delete the usercustomaction just created with the above example: var siteUrl = ‘/site collection/site/’; function deleteUserCustomAction() { […]
Dynamically inject a CSS code into the page [JavaScript]
Mozilla created a function that permits to inject some CSS into the document: addStylesheetRules() But if you use jQuery you may want to use this function: function injectCSS(rule) { $(“head”).append(‘<style>’ + rule + ‘</style>’) } // example injectCSS(“div { padding:5px }”)
Show the full content of a Sharepoint Calendar event box
With a Sharepoint Calendar the events with a long title/description are cropped and you cannot see the full description, except if you move your mouse over it. Example: So I’ve had to do some CSS and a complicated JavaScript code to be able to create some large boxes. Now we are able to see the […]
FreeFileSync with size only comparison
FreeFileSync is a powerful backup tool for Windows, Linux and Mac that permits to save over the network to a WebDAV drive for example. They can be very useful with some cloud services like Box.com. However, it’s best to use the comparison by size only, and not size AND date. The reason is that some […]
Partage sous Windows 7 et “System error 53 has occurred.”
Ma configuration réseau est un peu particulière : j’ai un ordinateur (machine A) sous Windows 7 en WORKGROUP (avec un login et un mot de passe), et une autre machine Windows 7 du boulot avec un login/pass sur un domaine (machine B). Pour réussir à se connecter aux disques partagés de la machine A, voici […]
Simple Org Chart in HTML/CSS/JS for Sharepoint
In my job I’ve had to create an organizational chart on our Sharepoint. Find more on the Github Repository I opened for this little project: OrgChart-JS-Sharepoint
Vérifier du code HTML en PHP
Supposons que vos utilisateurs peuvent entrer du code HTML et que vous souhaitiez vous assurer que les tags sont correctement fermés. Alors vous pouvez utiliser PHP pour faire ça : $codeUtilisateur = ‘<p><b>Mon texte</b>’; // il manque ‘</p>’ $doc = new DOMDocument(); // on utilise DOMDocument qui est installé par défaut avec PHP $doc->loadHTML($codeUtilisateur); $codeRetour […]
Sharepoint 2010 and IE in standard mode (issues with IE9/IE10)
I wanted to have a masterpage for Sharepoint 2010 with a HTML5 Doctype… unfortunately Sharepoint 2010 has been coded without standards, so lot of things are now broken. I spent some time to find the broken functions. I’ve created a file that is called just after <SharePoint:ScriptLink language=”javascript” name=”core.js” OnDemand=”true” runat=”server”/>, and you can download […]