Debug window show and hideable

pull/73/head
jonsowman 2010-05-30 23:20:26 +01:00
rodzic 11758a436a
commit b407ef84e7
3 zmienionych plików z 20 dodań i 2 usunięć

Wyświetl plik

@ -63,6 +63,7 @@ body {
}
#scenario_template {
width: 400px;
left: 0; bottom: 0;
border-left: none;
border-bottom: none;

Wyświetl plik

@ -48,7 +48,7 @@ function predSub() {
function handlePred(pred_uuid) {
$("#prediction_status").html("Downloading wind data...");
appendDebug("Prediction running with uuid: " + pred_uuid);
appendDebug("Prediction running with uuid:<br>" + pred_uuid);
appendDebug("Attempting to download GFS data for prediction");
$("#input_form").hide("slide", { direction: "down" }, 500);
$("#map_canvas").fadeTo(1000, 0.2);
@ -154,6 +154,11 @@ function initialize() {
});
//$("#input_form").draggable({containment: '#map_canvas'});
// if ( running_uuid != 0 ) handlePred(running_uuid);
$("#debuginfo").hide();
$("#showHideDebug").click(function() {
// $("#debuginfo").show("slide", { direction: "down" }, 500);
toggleDebugWindow();
});
}
@ -263,7 +268,9 @@ function clearMapItems() {
<div id="map_canvas" style="width:100%; height:100%"></div>
<div id="scenario_template" class="box">
<h1>Debug Window</h1>
<h1>Debug Window -
<a href='#'><span id="showHideDebug">Show</span></a></span>
</h1>
<span id="debuginfo">No Messages</span>
</div>

Wyświetl plik

@ -12,6 +12,16 @@ function appendDebug(appendage, clear) {
}
}
function toggleDebugWindow() {
if( $("#debuginfo").css('display') != "none" ){
$("#debuginfo").hide("slide", { direction: "down" }, 500);
$("#showHideDebug").html("Show");
} else {
$("#debuginfo").show("slide", { direction: "down" }, 500);
$("#showHideDebug").html("Hide");
}
}
// launch site dropdown switcher
function UpdateLaunchSite(id) {
txtLat = document.getElementById("lat");