Skip to content

Commit

Permalink
cassproject/cass-viewer #8 #9 Related - Changed name and description
Browse files Browse the repository at this point in the history
  • Loading branch information
whistlinjoe committed Dec 11, 2018
1 parent 7b69d7d commit bbccee7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions js/cass-ui-prf-exp/cui-pe-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function isFrameworkIdOrProfileUser(id) {
function getFrameworkName(frameworkId) {
if (profileUserName && profileUserName != null && frameworkId == profileUserName) return profileUserName;
if (!applicableFrameworkMap[frameworkId] || applicableFrameworkMap[frameworkId] == null) return null;
return applicableFrameworkMap[frameworkId].name.trim();
return applicableFrameworkMap[frameworkId].getName().trim();
}

function getFrameworkDescription(frameworkId) {
Expand All @@ -205,7 +205,7 @@ function getFrameworkDescription(frameworkId) {
else return PROFILE_DESCRIPTION_OTHER;
}
if (!applicableFrameworkMap[frameworkId] || applicableFrameworkMap[frameworkId] == null) return null;
return applicableFrameworkMap[frameworkId].description.trim();
return applicableFrameworkMap[frameworkId].getDescription().trim();
}

function getFrameworksForCompetency(competencyId) {
Expand Down Expand Up @@ -236,7 +236,7 @@ function buildCassEditorFrameworkHyperlinkListForCompetency(competencyId) {
var retHtml = "";
for (var i = 0; i < fwa.length; i++) {
var fw = fwa[i];
retHtml += generateAnchorLink("https://cassproject.github.io/cass-editor/?frameworkId=" + fw.shortId() + "&view=true", fw.name, fw.name);
retHtml += generateAnchorLink("https://cassproject.github.io/cass-editor/?frameworkId=" + fw.shortId() + "&view=true", fw.getName(), fw.getName());
if (i < (fwa.length - 1)) retHtml += ", ";
}
return retHtml;
Expand All @@ -248,7 +248,7 @@ function buildFrameworkExplorerFrameworkHyperlinkListForCompetency(competencyId)
var retHtml = "";
for (var i = 0; i < fwa.length; i++) {
var fw = fwa[i];
retHtml += "<a onclick=\"openFrameworkExplorer('" + fw.shortId() + "');\">" + escapeSingleQuote(fw.name) + "</a>"
retHtml += "<a onclick=\"openFrameworkExplorer('" + fw.shortId() + "');\">" + escapeSingleQuote(fw.getName()) + "</a>"
if (i < (fwa.length - 1)) retHtml += ", ";
}
return retHtml;
Expand All @@ -266,7 +266,7 @@ function buildHyperlinkListForCompetency(competencyId) {
for (var i = 0; i < fwa.length; i++) {
var fw = fwa[i];
var linkHref = "https://cassproject.github.io/cass-editor/?frameworkId=" + fw.shortId() + "&competencyId=" + competencyId + "&view=true";
var linkName = compName + "(" + fw.name + ")";
var linkName = compName + "(" + fw.getName() + ")";
retHtml += generateAnchorLink(linkHref, linkName, linkName);
if (i < (fwa.length - 1)) retHtml += ", ";
}
Expand Down Expand Up @@ -1903,7 +1903,7 @@ function buildGraphProfileSummaryFrameworkCategories() {
$(CIR_FCS_SUM_LIST_CTR).empty();
frameworkGraphSummaryLiMap = {};
applicableFrameworkList.sort(function (a, b) {
return a.name.localeCompare(b.name);
return a.getName().localeCompare(b.getName());
});
var frameworkCategories = categorizeFrameworksForSummary();
for (var category in frameworkCategories) {
Expand Down Expand Up @@ -2085,18 +2085,18 @@ function collapseApplicableFrameworks() {
// Framework Fetching
//**************************************************************************************************

//TODO cleanFrameworkName expand on or get rid of
function cleanFrameworkName(fw) {
fw.name = fw.name.replace("CAP ", "");
}
// //TODO cleanFrameworkName expand on or get rid of
// function cleanFrameworkName(fw) {
// fw.name = fw.name.replace("CAP ", "");
// }

function filterApplicableFrameworks() {
debugMessage("filterApplicableFrameworks");
applicableFrameworkList = [];
applicableFrameworkMap = {};
for (var i = 0; i < rawApplicableFrameworkList.length; i++) {
fw = rawApplicableFrameworkList[i];
cleanFrameworkName(fw);
//cleanFrameworkName(fw);
if (!applicableFrameworkMap[fw.shortId()] || applicableFrameworkMap[fw.shortId()] == null) {
applicableFrameworkMap[fw.shortId()] = fw;
applicableFrameworkList.push(fw);
Expand Down

0 comments on commit bbccee7

Please sign in to comment.