From 9c174c5bedb96f5c372147d9235f98be93739544 Mon Sep 17 00:00:00 2001 From: bvulaj Date: Mon, 31 Aug 2015 14:26:29 -0400 Subject: [PATCH 1/3] Initial setup for adding descriptions based on the currently selected operation. --- common/src/main/webapp/js/lightblue-apps.js | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/common/src/main/webapp/js/lightblue-apps.js b/common/src/main/webapp/js/lightblue-apps.js index bbddcf2..b0f0d16 100644 --- a/common/src/main/webapp/js/lightblue-apps.js +++ b/common/src/main/webapp/js/lightblue-apps.js @@ -265,6 +265,28 @@ function callLightblue(uri, jsonData, method) { }); } +// Show a description of the action +function loadActionDescription(entity) { + if (entity == null || entity == "") { + return; + } + switch(entity) { + case "view": + break; + case "edit": + break; + case "new": + break; + case "version": + break; + case "roles": + break; + case "summary": + break; + default: + } +} + function loadVersions() { "use strict"; @@ -342,6 +364,7 @@ $(document).ready(function() { loadVersions(); var entitySelect = $("#entities"); + var actionSelect = $("#action"); var versionSelect = $("#versions"); var submitButton = $("#load-content-btn"); @@ -350,6 +373,10 @@ $(document).ready(function() { loadEntities(); + actionSelect.change(function() { + loadActionDescription($(this).val()); + }); + entitySelect.change(function() { loadEntityVersions($(this).val()); }); From ab5b5ea1f0e6152d40c0f32279bde4411f91e18f Mon Sep 17 00:00:00 2001 From: bvulaj Date: Mon, 31 Aug 2015 15:27:20 -0400 Subject: [PATCH 2/3] Added description to most of the actions. --- common/src/main/webapp/js/lightblue-apps.js | 32 +++++++++++++++++---- metadata-mgmt/src/main/webapp/index.html | 2 ++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/common/src/main/webapp/js/lightblue-apps.js b/common/src/main/webapp/js/lightblue-apps.js index b0f0d16..1446b80 100644 --- a/common/src/main/webapp/js/lightblue-apps.js +++ b/common/src/main/webapp/js/lightblue-apps.js @@ -270,21 +270,41 @@ function loadActionDescription(entity) { if (entity == null || entity == "") { return; } + + var desc = ""; + var gitbook = "http://jewzaam.gitbooks.io/lightblue-specifications/content" + switch(entity) { case "view": + desc = "View all entity information and schemas associated with the entity."; break; case "edit": - break; + desc = "Edit the information of a specific entity."; + break; case "new": - break; + desc = "Create a new entity by defining new metadata."; + break; case "version": - break; + desc = "Create a new schema, representing a new version of an existing entity."; + break; case "roles": - break; + desc = "View all roles and the entities they allow access to. If an entity is slected, view all roles for that entity. If a version is seleceted, view all roles for that entity at the specified version."; + break; case "summary": - break; - default: + desc = ""; + break; } + $('#alert-box').html(desc); } function loadVersions() { diff --git a/metadata-mgmt/src/main/webapp/index.html b/metadata-mgmt/src/main/webapp/index.html index eb9274b..e03c449 100644 --- a/metadata-mgmt/src/main/webapp/index.html +++ b/metadata-mgmt/src/main/webapp/index.html @@ -82,6 +82,8 @@ +
+
From cd244c81f5003d75fe402297b7f445bdb21b0000 Mon Sep 17 00:00:00 2001 From: bvulaj Date: Mon, 31 Aug 2015 15:54:23 -0400 Subject: [PATCH 3/3] Updated all descriptions. Fixed jquery selector --- common/src/main/webapp/js/lightblue-apps.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/src/main/webapp/js/lightblue-apps.js b/common/src/main/webapp/js/lightblue-apps.js index 1446b80..a0282af 100644 --- a/common/src/main/webapp/js/lightblue-apps.js +++ b/common/src/main/webapp/js/lightblue-apps.js @@ -276,35 +276,35 @@ function loadActionDescription(entity) { switch(entity) { case "view": - desc = "View all entity information and schemas associated with the entity."; + + "/language_specification/metadata.html'>information associated with the selected entity."; break; case "edit": - desc = "Edit the information of a specific entity."; break; case "new": - desc = "Create a new entity by defining new metadata."; break; case "version": - desc = "Create a new schema, representing a new version of an existing entity."; break; case "roles": - desc = "View all roles and the entities they allow access to. If an entity is slected, view all roles for that entity. If a version is seleceted, view all roles for that entity at the specified version."; break; case "summary": - desc = ""; + desc = "View an overall summary of the available entities, including their versions."; break; } - $('#alert-box').html(desc); + $('#action-desc').html(desc); } function loadVersions() { @@ -384,7 +384,7 @@ $(document).ready(function() { loadVersions(); var entitySelect = $("#entities"); - var actionSelect = $("#action"); + var actionSelect = $("#actions"); var versionSelect = $("#versions"); var submitButton = $("#load-content-btn");