Skip to content

Commit

Permalink
Remove old calls to getdata.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-marshall committed Apr 3, 2020
1 parent 0d43d24 commit 72766d5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 75 deletions.
31 changes: 0 additions & 31 deletions getData.php

This file was deleted.

44 changes: 0 additions & 44 deletions js/cFIREsimOpen.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,50 +76,6 @@ var Simulation = {
sim: [],
tabs: 0,
g: [], //dygraph object
getQueries: function() {
var username = $("#username").html();
$.ajax({
url: "getData.php",
type: "POST",
dataType: 'JSON',
data: {
param: "getNames",
username: username,
},
}).success(function(data) {
var html = "";
for (var i = 0; i < data.qid.length; i++) {
html += "<li><a href='#' id='" + data.qid[i] + "' class='savedSim'>ID:" + data.qid[i] + " - " + data.simName[i] + "</a></li>"
}
$("#savedSimsDropdown").html(html);
$('.dropdown-menu a').click(function() {
var id = $(this).attr('id');
Simulation.getSavedSim(id);
});
});
},
getSavedSim: function(qid) {
$.ajax({
url: "getData.php",
type: "POST",
dataType: "JSON",
data: {
param: "getSavedSim",
qid: qid,
}
}).success(function(data) {
if (data == null) {
var html = "<p>Could not load ID:" + Simulation.getUrlVars(['id']) + ". There is no data for that ID.</p>";
$("#loadedSimFailText").html(html);
$("#loadedSimFail").show();
} else {
Simulation.loadSavedSim(data.data);
var html = "<p>Successfully loaded ID#" + data.qid + " - '" + data.simName + "'</p>";
$("#loadedSimHeaderText").html(html);
$("#loadedSimHeader").show();
}
});
},
loadSavedSim: function(data) {
//Load in angular scope from outside the controller
var scope = angular.element($("#input")).scope();
Expand Down

0 comments on commit 72766d5

Please sign in to comment.