Last active
August 29, 2015 14:06
-
-
Save premchandpl/3fedcdd0611055a31a9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| var overrideCtx = {}; | |
| overrideCtx.Templates = {}; | |
| overrideCtx.Templates.Fields = | |
| { | |
| 'Title':{'View':changeTitle}, | |
| 'Permissions':{'View':changePermissionLink} | |
| }; | |
| SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx); | |
| })(); | |
| function changeTitle(ctx){ | |
| var fieldValue = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; | |
| return fieldValue.toString() + " Changed Value" | |
| } | |
| function changePermissionLink(ctx){ | |
| var fieldValue = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; | |
| var siteUrl = ctx.CurrentItem.SiteURL; | |
| var permissionUrl = $(siteUrl).html()+"/_layouts/15/user.aspx" | |
| var permissionLink = '<a href='+permissionUrl+' target="_blank"/>Permission</a>' | |
| return permissionLink; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment