Last active
August 29, 2015 13:58
-
-
Save marineko/36301af8b058a33d9567 to your computer and use it in GitHub Desktop.
This file contains 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
var currentuser = $().SPServices.SPGetCurrentUser(); | |
var lcid = _spPageContextInfo.currentLanguage; | |
var pp_str; | |
var img_str; | |
if (lcid == "1041") { | |
pp_str = "ユーザー選択ウィンドウ"; | |
img_str = "名前の確認"; | |
} else { | |
pp_str = "People Picker"; | |
img_str = "Check Names"; | |
}; | |
var columnName = 'Requestor Name'; | |
var searchText = RegExp("FieldName=\"" + columnName + "\"", "gi"); | |
$("td.ms-formbody").each(function () { | |
if (searchText.test($(this).html())) { | |
$(this).find("div[Title=\'" + pp_str + "\']").html(currentuser); | |
$(this).find("textarea[title=\'" + pp_str + "\']").val(currentuser); | |
$(this).find("img[title=\'" + img_str + "\']").trigger("click"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment