diff --git a/predict/ajax.php b/predict/ajax.php
index 8ba5e4a..263ad04 100644
--- a/predict/ajax.php
+++ b/predict/ajax.php
@@ -3,6 +3,8 @@ require_once("includes/functions.inc.php");
$action = $_GET['action'];
+$software_available = array("gfs", "gfs_hd");
+
switch($action) {
case "getCSV":
$uuid = $_GET['uuid'];
@@ -35,7 +37,7 @@ case "getModelByUUID":
} else {
// populate the array, JSON encode it and return
$pred_model = parse_ini_file("preds/".$uuid."/scenario.ini");
- if ( verifyModel($pred_model) ){
+ if ( verifyModel($pred_model, $software_available) ){
$pred_model['valid'] == true;
} else {
$pred_model['valid'] == false;
@@ -46,8 +48,6 @@ case "getModelByUUID":
break;
case "submitForm":
- $software_available = array("gfs", "gfs_hd");
-
$pred_model = array();
if ( isset($_POST['submit'])) {
diff --git a/predict/css/pred.css b/predict/css/pred.css
index 77b2f93..7891b21 100644
--- a/predict/css/pred.css
+++ b/predict/css/pred.css
@@ -69,6 +69,8 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
left: 0; bottom: 0;
border-left: none;
border-bottom: none;
+ max-height: 400px;
+ overflow: scroll;
}
#input_form {
@@ -77,25 +79,19 @@ a { text-decoration: underline; color: #333; cursor: pointer; }
height:350px;
width: 400px;
padding: 5px;
+ bottom: 0; right: 0;
}
#scenario_info {
+ position: absolute;
+ top: 25px;
+ right: 0px;
border-right: none;
- height:100px;
+ height:70px;
width: 400px;
- padding: 5px;
- top: -115px;
- overflow: hidden;
}
-#bottom_right {
- right: 0;
- bottom: 0;
- width: 400px;
- padding: 0px;
-}
-
td.right-td {
text-align: right;
}
diff --git a/predict/index.php b/predict/index.php
index ad18887..00b1e96 100644
--- a/predict/index.php
+++ b/predict/index.php
@@ -57,15 +57,24 @@ function initialize() {
}
}
});
- //$("#input_form").draggable({containment: '#map_canvas'});
+ $("#input_form").draggable({containment: '#map_canvas'});
if ( current_uuid != '0' ) {
appendDebug("Got an old UUID to plot:
" + current_uuid);
+ appendDebug("Trying to populate form with scenario data");
+ populateFormByUUID(current_uuid);
appendDebug("Trying to get flight path from server...");
getCSV(current_uuid);
}
- $("#debuginfo").hide();
+ $("#scenario_template").hide();
$("#showHideDebug").click(function() {
- toggleDebugWindow();
+ toggleWindow("scenario_template", "showHideDebug", "Show Debug", "Hide Debug");
+ });
+ $("#showHideDebug_status").click(function() {
+ toggleWindow("scenario_template", "showHideDebug", "Show Debug", "Hide Debug");
+ });
+ $("#showHideForm").click(function() {
+ toggleWindow("input_form", "showHideForm", "Show Launch Card",
+ "Hide Launch Card");
});
}
@@ -78,9 +87,7 @@ function initialize() {