diff --git a/src/main/webapp/cass-ui-concept-editor-ctr.html b/src/main/webapp/cass-ui-concept-editor-ctr.html new file mode 100644 index 000000000..deff1a35b --- /dev/null +++ b/src/main/webapp/cass-ui-concept-editor-ctr.html @@ -0,0 +1,66 @@ + + + + + + + + CaSS Concept Editor + + + + + + + +
+ +
+ +
+ + + +
+ +
+ + +
+ + + + + + + + + + + diff --git a/src/main/webapp/cass-ui-editor-ctr.html b/src/main/webapp/cass-ui-editor-ctr.html index 2a82c9e48..39ef912fd 100644 --- a/src/main/webapp/cass-ui-editor-ctr.html +++ b/src/main/webapp/cass-ui-editor-ctr.html @@ -5,7 +5,7 @@ - CaSS Editor + CaSS Competency Editor diff --git a/src/main/webapp/cass-ui-home.html b/src/main/webapp/cass-ui-home.html index 0d6130b04..aabeae88b 100644 --- a/src/main/webapp/cass-ui-home.html +++ b/src/main/webapp/cass-ui-home.html @@ -79,7 +79,7 @@

CaSS Profiles

Explore a unique and detailed view of an individual

-
- - Virtual Learning Resource Center • - - CaSS Editor • - - High Level Documentation • - - Technical Documentation -
- - + +
+ + Virtual Learning Resource Center + + CaSS Editor + + High Level Documentation • + + Technical Documentation +
diff --git a/src/main/webapp/css/cass-ui.css b/src/main/webapp/css/cass-ui.css index 20eee5dbd..613b01230 100644 --- a/src/main/webapp/css/cass-ui.css +++ b/src/main/webapp/css/cass-ui.css @@ -236,6 +236,7 @@ canvas { #framework-card, #gap-card, #vlrc-card, +#concept-editor-card, #editor-card, #docs-card, #devdocs-card { @@ -467,6 +468,7 @@ li { #framework-card, #gap-card, #vlrc-card, + #concept-editor-card, #editor-card, #docs-card, #devdocs-card { @@ -507,6 +509,7 @@ li { #framework-card, #gap-card, #vlrc-card, + #concept-editor-card, #editor-card, #docs-card, #devdocs-card { diff --git a/src/main/webapp/js/page/cass-ui-concept-editor-ctr.js b/src/main/webapp/js/page/cass-ui-concept-editor-ctr.js new file mode 100644 index 000000000..1496981ed --- /dev/null +++ b/src/main/webapp/js/page/cass-ui-concept-editor-ctr.js @@ -0,0 +1,71 @@ +//************************************************************************************************** +// CASS UI Profile Explorer Functions +//************************************************************************************************** + +//************************************************************************************************** +// Constants + +const ADD_CEASN_DATA_FIELDS = false; +const CEASN_FIELD_TOGGLE = "ceasnDataFields=true"; + +const PRF_EXP_IFRAME = "#prfExpIFrame"; +const PRF_EXP_IFRAME_SOURCE = "cass-editor/index.html?concepts=true&tlaProfile=true&user=wait&editIframe=true"; + +const WAITING_MESSAGE = "waiting"; +const INIT_FWK_EXP_MESSAGE = "initFrameworkExplorer"; + +const INIT_IDENTITY_ACTION = "identity"; + +const CASSUI_FWK_EXP_PAGE = "cass-ui-concept-editor-ctr.html"; + +//************************************************************************************************** +// Variables + +//************************************************************************************************** +// Page Functions +//************************************************************************************************** + +function handleInitFrameworkExplorerMessage(frameworkId) { + debugMessage("handleInitFrameworkExplorerMessage storing framework id: " + frameworkId); + storeFrameworkToExploreInfo(frameworkId); + location.replace(CASSUI_FWK_EXP_PAGE); +} + +function sendIdentityInitializeMessage() { + $(PRF_EXP_IFRAME)[0].contentWindow.postMessage(JSON.stringify({ + action: INIT_IDENTITY_ACTION, + identity: loggedInPpkPem + }), window.location.origin); +} + +$(PRF_EXP_IFRAME).ready(function () { + $(window).on("message", function (event) { + if (event.originalEvent.data.message == WAITING_MESSAGE) { + sendIdentityInitializeMessage(); + } else if (event.originalEvent.data.message == INIT_FWK_EXP_MESSAGE) { + handleInitFrameworkExplorerMessage(event.originalEvent.data.frameworkId); + } + }); +}); + +function getEditorIframeSourceLink() { + var ifs = PRF_EXP_IFRAME_SOURCE; + if (ADD_CEASN_DATA_FIELDS) ifs += "&" + CEASN_FIELD_TOGGLE; + ifs += "&origin="+ window.location.origin + "&server=" + selectedServer; + debugMessage("Opening cass concept editor iFrame with: " + ifs); + return ifs; +} + +function init() { + loadCassUiSessionState(); + $(PRF_EXP_IFRAME).attr("src", getEditorIframeSourceLink()); + setCassUiMainMenuUserName(); +} + +//************************************************************************************************** +// Document on ready +//************************************************************************************************** + +$(document).ready(function () { + init(); +}); diff --git a/src/main/webapp/js/page/cass-ui-home.js b/src/main/webapp/js/page/cass-ui-home.js index a019241c1..e9cc64582 100644 --- a/src/main/webapp/js/page/cass-ui-home.js +++ b/src/main/webapp/js/page/cass-ui-home.js @@ -10,6 +10,7 @@ const CASSUI_PRF_EXP_PAGE = "cass-ui-profile-exp-ctr.html"; const CASSUI_GAP_ANL_PAGE = "cass-ui-gap-analysis-ctr.html"; const CASSUI_VLRC_PAGE = "cass-ui-vlrc-exp-ctr.html"; const CASSUI_EDITOR_PAGE = "cass-ui-editor-ctr.html"; +const CASSUI_CONCEPT_EDITOR_PAGE = "cass-ui-concept-editor-ctr.html"; //************************************************************************************************** // Variables @@ -38,6 +39,10 @@ function goToEditor() { location.replace(CASSUI_EDITOR_PAGE); } +function goToConceptEditor() { + location.replace(CASSUI_CONCEPT_EDITOR_PAGE); +} + function goToDocs() { location.assign("https://docs.cassproject.org"); } diff --git a/src/main/webapp/js/page/cass-ui-login.js b/src/main/webapp/js/page/cass-ui-login.js index c02f8da06..1c57b175a 100644 --- a/src/main/webapp/js/page/cass-ui-login.js +++ b/src/main/webapp/js/page/cass-ui-login.js @@ -10,7 +10,7 @@ const CASSUI_LOGIN_PW = "#cassUiLoginPassword"; const CASSUI_LOGIN_NAME = "#cassUiLoginName"; const CASSUI_LOGIN_EMAIL = "#cassUiLoginEmail"; const CASSUI_LOGIN_BTN = "#cassUiLoginBtn"; -const CASSUI_LOGIN_BTN = "#cassUiCreateBtn"; +const CASSUI_CREATE_BTN = "#cassUiCreateBtn"; const CASSUI_LOGIN_BUSY_CTR = "#cassUiLoginBusyCtr"; const CASSUI_LOGIN_ERR_CTR = "#cassUiLoginErrorCtr"; const CASSUI_LOGIN_ERR_TXT = "#cassUiLoginErrorText";