Skip to content

Commit

Permalink
#14 #15 #16 Corrected Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
whistlinjoe committed Dec 27, 2018
1 parent a1e051f commit 3ae41d7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ <h2 id="profileHeader" onclick="goToDisplayRoot()"><i class="fa fa-id-card-o" ar
<a href="#">Tools</a>
<ul class="menu vertical">
<li><a title="Trust Networks" onclick="openAssertionTrustNetworkModal();"><i class="fa fa-thumbs-up" aria-hidden="true"></i> Trust</a></li>
<li><a title="Validate Claims" onclick="openProfileExpAssertionValidateModal();"><i class="fa fa-handshake-o" aria-hidden="true"></i> Validate</a></li>
<li><a title="Print Framework"><i class="fa fa-print" aria-hidden="true"></i> Print</a></li>
<li><a title="Export Framework"><i class="fa fa-download" aria-hidden="true"></i> Export</a></li>
<!--<li><a title="Validate Claims" onclick="openProfileExpAssertionValidateModal();"><i class="fa fa-handshake-o" aria-hidden="true"></i> Validate</a></li>-->
<!--<li><a title="Print Framework"><i class="fa fa-print" aria-hidden="true"></i> Print</a></li>-->
<!--<li><a title="Export Framework"><i class="fa fa-download" aria-hidden="true"></i> Export</a></li>-->
</ul>
</li>
</ul>
Expand Down
28 changes: 21 additions & 7 deletions js/cass-ui-prf-exp/cui-pe-session-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,35 @@ function getPersonObjectPk(po) {
return poPk;
}

function buildPersonObjectName(po) {
var name = getStringVal(po.getName());
if (!name || name.trim() == "") {
name = (po.givenName ? po.givenName + " " : "");
name += (po.familyName ? po.familyName : "");
}
return name.trim();
}

function buildViewableProfileData(ecpa) {
var addedProfiles = [];
viewableProfileList = [];
viewableProfileByPkPemMap = {};
viewableProfileByPersonIdMap = {};
viewableProfileByNameMap = {};
for (var i=0;i<ecpa.length;i++) {
var po = ecpa[i];
var poPk = getPersonObjectPk(po);
if (poPk) {
var vpo = new viewableProfObj(getStringVal(po.getName()),poPk);
viewableProfileList.push(vpo);
viewableProfileByPkPemMap[vpo.pkPem] = vpo;
viewableProfileByPersonIdMap[po.shortId()] = vpo;
if (!viewableProfileByNameMap[po.getName()]) viewableProfileByNameMap[po.getName()] = [];
viewableProfileByNameMap[po.getName()].push(vpo);
if (poPk && !addedProfiles.includes(po.getFingerprint())) {
var poName = buildPersonObjectName(po);
if (poName && poName != "") {
var vpo = new viewableProfObj(poName, poPk);
viewableProfileList.push(vpo);
viewableProfileByPkPemMap[vpo.pkPem] = vpo;
viewableProfileByPersonIdMap[po.shortId()] = vpo;
if (!viewableProfileByNameMap[poName]) viewableProfileByNameMap[poName] = [];
viewableProfileByNameMap[poName].push(vpo);
addedProfiles.push(po.getFingerprint());
}
}
}
viewableProfileList.sort(function (a, b) {return a.displayName.localeCompare(b.displayName);});
Expand Down

0 comments on commit 3ae41d7

Please sign in to comment.