Questions tagged [jslink]

JSLink is the new feature introduced in SharePoint 2013, loading off the burden of XSLT webparts from the developer's mind

JSLink files have the ability to quickly and easily change how a list views and forms are rendered. More specifically how the fields in that list

47 questions
2
votes
1 answer

Javascript and SharePoint 2013: Set background color to list item

I have a script that I use in my SharePoint that sets the field to be green or white, depending on a calculated value. It works with no issues (I only included a snippet of the code, I can include the entire function if that requested). I calculate…
Shinobii
  • 2,401
  • 5
  • 24
  • 39
2
votes
2 answers

Custom "Like"-Button in SharePoint List

I've recently started to work with the JSLinks in SharePoint and I'm currently struggeling a bit with something here and multiple hours of browsing and searching haven't really helped me so far so I hoped maybe you could. I have a SharePoint-List…
relief.melone
  • 3,042
  • 1
  • 28
  • 57
2
votes
0 answers

How to hide/disable specific cell in SharePoint 2013 quick edit using CSR?

I'm using Sharepoint 2013 CSR to disable columns in quick edit. I want to disable complete row or cell based on column value. For example. If I have two requests whose status are pending there is one column request status which is a…
Light
  • 1,077
  • 10
  • 33
2
votes
2 answers

SharePoint web part automatic refresh javascript event?

Background: I'm modifying a SharePoint list web part using JSLink. I'm also adding jQuery and jQuery-UI to make the list items display as the jQuery Accordion. It works well, except that I also need to implement the ajax automatic refresh on the web…
jorluiseptor
  • 55
  • 2
  • 6
2
votes
1 answer

Making jslink target specific list

Background I got a page where I’m showing two list views from two separate lists which both have Custom List as their ListTemplate. They got their separate jslink file cause I don’t want them to look alike. Problem The js link file targets both…
Sersant
  • 21
  • 6
2
votes
1 answer

SharePoint 2013 JSLink OnPostRender

I use JSLink to color a SharePoint 2013 task list. This code is the entry point to call the 'HiglightRowOverride' function: (function () { var overrrideCtx = {}; overrrideCtx.Templates = {}; overrrideCtx.OnPostRender =…
Eisfuchs
  • 151
  • 2
  • 9
2
votes
1 answer

Sharepoint 2013 JSLink (CSR) Not Working

I'm trying to make our list view as an accordion by following this tutorial: https://code.msdn.microsoft.com/office/Client-side-rendering-code-ccdb2a0e - I followed the tutorial: Create a Custom List, add a new column to the list: Name:…
YogaPanda
  • 328
  • 1
  • 3
  • 12
1
vote
2 answers

SharePoint CSR Templates.View function not being called

I created a simple JSLink CSR test that should override the view in SharePoint when an individual list item is displayed. The viewTemplate function is never called. Here is the JSLink JavaScript file. I walked through the code in debugger and I step…
Hal Hayes
  • 11
  • 3
1
vote
0 answers

Create custom list view with data based on condition and disable oob filter from list view webpart usign JSLink Client Side Rendering

Below is the full code for client side rendering of List View Webpart: (function () { var overrideCurrentContext = {}; overrideCurrentContext.OnPreRender = hideRows; …
1
vote
1 answer

new Date() always read dd/mm/yyyy as mm/dd/yyyy(month first) hence day and month values get mixed resulting in NaN/Error

When converting date for example: var dateObj = new Date("10/01/2019"); console.log(dateObj); returns Tue Oct 01 2019 00:00:00 i.e. it takes in the day as month and likewise with the month value How to make new Date() to take dd/mm/yyyy ??
1
vote
4 answers

Change the format of a date to dd/MM/yyyy

Anybody know how to adjust the current JS code and make it so the [ItemDate] shows the date in dd/MM/yyyy format instead of defaulted: MM/dd/yyyy HH:mm:ss The code is copied from a website which converts XML into a readable HMTL format... trouble is…
Bucki
  • 33
  • 1
  • 1
  • 7
1
vote
2 answers

Confusing PermMask values in SharePoint Online

I came across the PermMask values while using JSLink in SharePoint Online for checking permissions of user from the ctx.CurrentItem.PermMask The values for different permissions aren't matching with the Microsoft's documentation, any idea what these…
krishna
  • 575
  • 2
  • 8
  • 22
1
vote
0 answers

Sharepoint - JS Link - How to render search box in a custom list?

I was working with JS Link in Sharepoint and managed to render a custom list. Here's a brief extract from the code: context.Templates.View =…
Henri Korpela
  • 111
  • 12
1
vote
3 answers

JS field rendering return standard field rendering

how can return the standard rendering of a field? (function () { var readonlyFiledContext = {}; readonlyFiledContext.Templates = {}; readonlyFiledContext.Templates.Fields = { // Apply the new rendering for Age field on Edit…
Stefan
  • 555
  • 5
  • 18
1
vote
0 answers

Render issue using Firefox 39.0, in a webpart in SharePoint 2013, using JSLink

First of all thanks for reading, I have never asked a question as I have always found answers in this website by googling my issue, but not this time. So here it goes. I am using SharePoint on Premises 2013 and I have a page, which contains a…
1
2 3 4