From d65cdbf64602e22deaa96aa2dd0fc18e97957cd5 Mon Sep 17 00:00:00 2001 From: Shamal Faily Date: Fri, 30 Mar 2018 07:48:30 +0100 Subject: [PATCH] Fix #199 #200 --- cairis/web/dist/js/cairis/goals.js | 4 +++- cairis/web/dist/js/cairis/obstacles.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cairis/web/dist/js/cairis/goals.js b/cairis/web/dist/js/cairis/goals.js index 1679abc72..e188e5cd5 100644 --- a/cairis/web/dist/js/cairis/goals.js +++ b/cairis/web/dist/js/cairis/goals.js @@ -109,7 +109,8 @@ mainContent.on('click', ".goalEnvProperties", function () { $.each(goal.theEnvironmentProperties, function (index, env) { if(env.theEnvironmentName == name){ - $('#goalProperties').loadJSON(env,null); + $('#theCategory').val(env.theCategory); + $('#thePriority').val(env.thePriority); $("#theIssue").val(env.theIssue); $("#theDefinition").val(env.theDefinition); $("#theFitCriterion").val(env.theFitCriterion); @@ -345,6 +346,7 @@ function addGoalEnvironment() { $("#goalProperties").show("fast"); $.session.set("GoalEnvName", text); $.session.set("Goal", JSON.stringify(goal)); + $("#theGoalEnvironments").find("tbody").find(".goalEnvProperties:last").trigger('click'); }; mainContent.on('click', ".deleteGoalEnv", function () { diff --git a/cairis/web/dist/js/cairis/obstacles.js b/cairis/web/dist/js/cairis/obstacles.js index 9b516b5b3..251a60671 100644 --- a/cairis/web/dist/js/cairis/obstacles.js +++ b/cairis/web/dist/js/cairis/obstacles.js @@ -269,6 +269,7 @@ function addObstacleEnvironment() { clearObstacleEnvironmentPanel(); $("#obstacleProperties").show("fast"); $.session.set("Obstacle", JSON.stringify(obstacle)); + $("#theObstacleEnvironments").find("tbody").find(".obstacleEnvProperties:last").trigger('click'); }; function clearObstacleEnvironmentPanel() {