Created
April 1, 2015 09:38
-
-
Save dimkk/a2562b56e87ee8689115 to your computer and use it in GitHub Desktop.
spservices extension mehtod
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
findPP: function (options) { | |
if (!options.Id || !options.valueToSet) | |
{ | |
console.error('spservices extensions findPP: args error'); | |
return; | |
}; | |
var $pp = $('span[id*="' + options.Id + '"]') | |
.first() | |
.wrap('<div '+options.debug ? +' style="background-color:red;" ' : ''+ '></div>'); | |
var $row = $pp | |
.wrap('<td></td>') | |
.parent() | |
.wrap('<tr></tr>') | |
.parent(); | |
$row.wrap('<table></table>'); | |
$row.append('<td><nobr style="display:none;">' + options.Id + '</nobr></td>'); | |
return $().SPServices.SPFindPeoplePicker({ | |
peoplePickerDisplayName: options.Id, | |
valueToSet: options.valueToSet, | |
checkNames: options.checkNames || true | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment