From cf7fbc6722a69d0453656ef5273f6493619c0a06 Mon Sep 17 00:00:00 2001 From: Pujan Joshi Date: Mon, 11 Jan 2016 11:59:10 -0500 Subject: [PATCH 1/2] Revert "pathfinding dialog box redone, added configuration option" This reverts commit e311185a936de302b4c64fd78b93a51d40562c46. --- VQI_PathwayEditor.js | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/VQI_PathwayEditor.js b/VQI_PathwayEditor.js index 9be0089..442f656 100755 --- a/VQI_PathwayEditor.js +++ b/VQI_PathwayEditor.js @@ -80,9 +80,7 @@ var VQI_PathwayEditor = function (parent) { strVar += "
  • <\/input><\/li>"; strVar += "
  • <\/input><\/li>"; strVar += "
  • <\/input><\/li>"; - strVar += "
  • "; - strVar += "
  • <\/input><\/li>"; - strVar += " <\/ul>"; + strVar += " <\/ul>"; strVar += " "; strVar += " <\/li>"; strVar += "
  • "; @@ -146,25 +144,24 @@ var VQI_PathwayEditor = function (parent) { strVar += " <\/div>"; strVar += "
    "; strVar += "
    "; - strVar += "
    "; + strVar += "
    "; strVar += "
    "; + strVar += " <\/input>"; + strVar += " <\/fieldset>"; strVar += " <\/form>"; strVar += " <\/div>"; strVar += "
    "; @@ -1161,11 +1158,14 @@ var VQI_PathwayEditor = function (parent) { } - function findPath(sid,vid) { + function wrapperFindPath() { var cy = $('#' + parent + '-cy').cytoscape('get'); + var sid = orderedSelectedNodes[0]._private.data['id']; + var vid = orderedSelectedNodes[1]._private.data['id']; $.post(services['pathwayFinderUrl'], { data_json: JSON.stringify(JSON.parse(states[states.length - 1])) }, function (yue_data) { + console.log(yue_data); var result = JSON.parse(yue_data); var table = document.getElementById(parent + "-inner-table"); var length = document.getElementById(parent + "-inner-table").rows.length; @@ -1226,16 +1226,6 @@ var VQI_PathwayEditor = function (parent) { dialogPathfind.dialog("close"); }); } - - function findPathsAll(){ - findPath(null,null); - } - - function findPathOne(){ - var sid = orderedSelectedNodes[0]._private.data['id']; - var vid = orderedSelectedNodes[1]._private.data['id']; - findPath(sid,vid); - } function saveState() { var cy = $('#' + parent + '-cy').cytoscape('get'); @@ -1862,7 +1852,6 @@ var VQI_PathwayEditor = function (parent) { $('#' + parent + '-undo').removeClass('disabled'); $('#' + parent + '-redo').removeClass('disabled'); $('#' + parent + '-duplicate-nodes').removeClass('disabled'); - $('#' + parent + '-config-pathway').removeClass('disabled'); // Add processed nodes cy.add(obj.elements); @@ -2122,6 +2111,7 @@ var VQI_PathwayEditor = function (parent) { height: 300, width: 350, buttons: { + "submit": wrapperFindPath, Cancel: function () { dialogPathfind.dialog("close"); } @@ -2216,8 +2206,6 @@ var VQI_PathwayEditor = function (parent) { document.getElementById(parent + '-undo').addEventListener('click', undo); document.getElementById(parent + '-redo').addEventListener('click', redo); document.getElementById(parent + '-duplicate-nodes').addEventListener('click', addDuplicateNodes); - document.getElementById(parent + '-find-paths-all').addEventListener('click', findPathsAll); - document.getElementById(parent + '-find-paths-one').addEventListener('click', findPathOne); //search document.getElementById(parent + '-search-node-name').addEventListener('keyup', search); From ba937103e0ee39deba44f0d295e182731dc59f40 Mon Sep 17 00:00:00 2001 From: Pujan Joshi Date: Mon, 11 Jan 2016 15:41:00 -0500 Subject: [PATCH 2/2] sortable --- VQI_PathwayEditor.js | 186 ++++++++++++++++++++++--------------------- 1 file changed, 96 insertions(+), 90 deletions(-) diff --git a/VQI_PathwayEditor.js b/VQI_PathwayEditor.js index 6bbfd25..fc137e1 100755 --- a/VQI_PathwayEditor.js +++ b/VQI_PathwayEditor.js @@ -4,9 +4,9 @@ var VQI_PathwayEditor = function (parent) { // var serverURL = "http://cardinal3.engr.uconn.edu/pathwayVisual/"; var services = {}; - /*Local Services*/ - services["pathwayFinderUrl"] = "http://bibci.engr.uconn.edu/puj07001/pathway_services/find_path_and_score/find_path_and_score.php"; - + /*Local Services*/ + services["pathwayFinderUrl"] = "http://bibci.engr.uconn.edu/puj07001/pathway_services/find_path_and_score/find_path_and_score.php"; + /* Yue's Local Server*/ services['pathwayFinder'] = 'http://cardinal3.engr.uconn.edu/pathwayVisual/PathwayParser/ajaxJSON.php'; services['pathwaySaver'] = 'http://cardinal3.engr.uconn.edu/pathwayVisual/PathwayParser/updateDB_json.php'; @@ -122,7 +122,7 @@ var VQI_PathwayEditor = function (parent) { strVar += " rna distance<\/td>"; strVar += " cnv distance<\/td>"; strVar += " mut distance<\/td>"; - strVar += " <\/tr>"; + strVar += " <\/tr>"; strVar += " <\/table>"; strVar += " <\/div>"; strVar += "
    "; @@ -161,14 +161,10 @@ var VQI_PathwayEditor = function (parent) { strVar += "
    "; strVar += "
    "; ->>>>>>> origin/master strVar += " <\/form>"; strVar += " <\/div>"; strVar += "
    "; @@ -258,8 +254,8 @@ var VQI_PathwayEditor = function (parent) { strVar += "