Skip to content

Commit

Permalink
pathway select in selection box and stringify json
Browse files Browse the repository at this point in the history
  • Loading branch information
ivp08001 committed Dec 4, 2015
1 parent 9886e47 commit 591ca9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion VQI_PathwayEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ var VQI_PathwayEditor = function(parent) {

function saveAsPathway(event) {
var obj = JSON.parse(states[states.length - 1]);
JSON.stringify(obj);
obj.data.NAME = document.getElementById(parent + "-pathway-name").value;
$.post(services['pathwaySaver'], {
insertPathway : obj
Expand All @@ -396,6 +397,7 @@ var VQI_PathwayEditor = function(parent) {

function savePathway(event) {
var obj = JSON.parse(states[states.length - 1]);
JSON.stringify(obj);
$.post(services['pathwaySaver'], {
updatePathway : obj
}, function(data) {
Expand Down Expand Up @@ -845,6 +847,9 @@ var VQI_PathwayEditor = function(parent) {
pathwayList : '1'
}, function(data) {
var obj = JSON.parse(data);
var el = document.createElement("option");
el.textContent = "Select pathway";
select.appendChild(el);
for (var i = 0; i < obj.length; i++) {
var opt = obj[i].NAME;
var val = obj[i].ID;
Expand Down Expand Up @@ -976,7 +981,6 @@ var VQI_PathwayEditor = function(parent) {
}, function(yue_data) {
var selectedPaths = findPath(JSON.parse(states[states.length - 1]), sid, vid);
var nodePaths = convertEdgePathtoNodePath(selectedPaths);
console.log(JSON.stringify(nodePaths));
$.post(services['objectFinder'], {
data_paths : JSON.stringify(nodePaths)
}, function(tham_data) {
Expand Down

0 comments on commit 591ca9a

Please sign in to comment.