Skip to content

Instantly share code, notes, and snippets.

@BinaryPaean
Forked from ceej989/gist:c73803b2d96519a3c988
Last active August 29, 2015 14:07
Show Gist options
  • Save BinaryPaean/bb8d58d0c722bf5c6eac to your computer and use it in GitHub Desktop.
Save BinaryPaean/bb8d58d0c722bf5c6eac to your computer and use it in GitHub Desktop.
<div id="EmployeePhoneField">
<!--#_
var encodedWphone = $htmlEncode(ctx.CurrentItem.Workphone);
var displayWphone = Srch.U.getSingleHHXMLNodeValue(hhProps, "workphone");
console.log(displayWphone);
if ($isEmptyString(displayWphone)) { displayWphone = encodedWphone }
var firstDigitsDisplayWPhone = displayWphone.slice(0,-3);
var lastThreeDigitsWPhone = displayWphone.slice(-3);
_#-->
<div id="EmployeePhoneValue" class="ms-srch-ellipsis" title="_#= encodedWphone =#_">P: _#= firstDigitsDisplayWPhone =#_<strong>_#l=astThreeDigitsWPhone=#_</strong></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment