1// ÐÑавила ÑендеÑа каÑÑомнÑÑ Ð¿Ñолей в ÑÑандаÑÑном пÑедÑÑавлении 2SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { 3 // Create object that have the context information about the field that we want to change it's output render 4 var priorityFiledContext = {}; 5 priorityFiledContext.Templates = {}; 6 priorityFiledContext.Templates.Fields = { 7 "sldfLinkResultLookup": { "View": spellabsLookupFieldRender }, 8 "sldfStepLinksLookup": { "View": spellabsLookupFieldRender }, 9 "sldfWorkflowLookup": { "View": spellabsLookupFieldRender }, 10 "sldfWorkflowStepLookup": { "View": spellabsLookupFieldRender }, 11 "sldfFirstWorkflowStepLookup": { "View": spellabsLookupFieldRender }, 12 "sldfFromWorkflowStateLookup": { "View": spellabsLookupFieldRender }, 13 "sldfToWorkflowStateLookup": { "View": spellabsLookupFieldRender }, 14 "sldfLogLookup": { "View": spellabsLookupFieldRender }, 15 "rshbIRRoleLookup": { "View": spellabsLookupFieldRender }, 16 "sldfWorkflowStateLookup": { "View": spellabsLookupFieldRender } 17 }; 18 SPClientTemplates.TemplateManager.RegisterTemplateOverrides(priorityFiledContext); 19}); 20 21// This function provides the rendering logic for list view 22function spellabsLookupFieldRender(ctx) { 23 var lookupValue = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; 24 var sDispFormUrl = ctx.CurrentFieldSchema.DispFormUrl+"&ID=";//+lookupValue[0]; 25 var sUrl =""; 26 for (var i=0;i<lookupValue.length;i++) 27 { 28 var sItemUrl = sDispFormUrl + lookupValue[i].lookupId; 29 sUrl += '<a onclick="OpenPopUpPage(\''+sItemUrl+'\', RefreshPage); return false;" href="'+sItemUrl+'">'+lookupValue[i].lookupValue;'</a>'; 30 } 31 return sUrl; 32}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.