Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Updated front page
Browse files Browse the repository at this point in the history
  • Loading branch information
botchi09 committed Aug 9, 2012
1 parent 2eefca6 commit 68dc7af
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 75 deletions.
16 changes: 12 additions & 4 deletions web/web/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,24 @@ div.overflow{
overflow:auto
}
div{
/*border:2px solid;*/
/*border:1px solid;*/
}
#mapContainer {
height: 300px;
width: 400px;
height: 200px;
width: 300px;
border:10px solid #eaeaea;
}

.header1{

font-size:130%;
font-size:500%;

}

.plussign{
float:left;
width:10%;
height:15%;
padding-left:10%;
padding-right:10%;
}
44 changes: 19 additions & 25 deletions web/web/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,18 @@ function Get() {

}

var localSearch
function Search() {



// Create a LocalSearch instance.
localSearch = new google.search.LocalSearch();

// Set the Local Search center point
localSearch.setCenterPoint("New York, NY");

// Set searchComplete as the callback function when a search is complete. The
// localSearch object will have results in it.
localSearch.setSearchCompleteCallback(this, SearchComplete, null);

// Specify search quer(ies)
localSearch.execute('coffee New York NY');

// Include the required Google branding.
// Note that getBranding is called on google.search.Search
google.search.Search.getBranding('branding');

}

function SearchComplete() {
function Search() {

alert(localSearch.results[0])
//is ID number
//if number, goto url
var searchSat=document.getElementById("satellite_input").value
if (searchSat.length>0) {
if (!isNaN(searchSat)) {
var longlat=getLongLat()
window.location="/" + searchSat + "/" + longlat.longitude + "/" + longlat.latitude
}
}

}

Expand All @@ -39,4 +24,13 @@ function init() {

}

var HasCleared=false
function ClearBox(object) {

if (!HasCleared) {
HasCleared=true
object.value=""
}

}

14 changes: 11 additions & 3 deletions web/web/js/mapfuncs.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function findLocation() {
}

function getLongLat() {
var longitude=parseInt(document.getElementById("longitude").innerText)
var latitude=parseInt(document.getElementById("latitude").innerText)
var longitude=parseFloat(document.getElementById("longitude").innerText)
var latitude=parseFloat(document.getElementById("latitude").innerText)
return {longitude:longitude,latitude:latitude}

}
Expand All @@ -46,7 +46,7 @@ function setLink(longt,lat) {
var link=document.getElementById("getlink")
var hrefNew=satId + "/" + longt + "/" + lat

//Minus symbol _may_ have URL issues.
//Minus symbol may have URL issues.
hrefNew.replace("-",newminus)
var curLoc=document.location.hostname.toString()

Expand All @@ -61,3 +61,11 @@ function setCurPos() {

setLink(longlat.longitude,longlat.latitude)
}
/*
var searchList
function getSearchList() {
$.get('ajax/test.html', function(data) {
$('.result').html(data);
alert('Load was performed.');
});
}*/
88 changes: 45 additions & 43 deletions web/web/templates/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,72 @@
<html>
<head>

<div id="latitude" style="display:none;visiblity:hidden;">0</div>
<div id="longitude" style="display:none;visiblity:hidden;">0</div>


<link href='http://fonts.googleapis.com/css?family=Marmelad' rel='stylesheet' type='text/css'>

<script type="text/javascript" src="/static/jquery-1.7.2.min.js"></script>
<script type="text/javascript">var satId={{data.id}}</script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="/static/mapfuncs.js"></script>
<script type="text/javascript" src="/static/main.js"></script>
<link href="/static/style.css" rel="stylesheet" type="text/css">
</head>
<body onload="init()">
<div id="latitude" style="display:none;visiblity:hidden;"></div>
<div id="longitude" style="display:none;visiblity:hidden;"></div>

<div id="header" class="containerstyle bg-style">
<a class="header1">You are now looking at the position of Satellite {{data.name}}. Satellite ID: {{data.id}}</a>
</div>
<div id="container_body" class="containerstyle bg-style" style="border-top-width:0">
<div id="container_link">
<a id="getlink" href="#">Error loading link. Is Javascript enabled?</a>
</div>
<div id="container_location" class="overflow">
<div id="location_searchbar" style="float:left;width:80%;">
<input type="text" style="width:99%;"></input>
</div>
<div id="location_search" style="float:left;">
<img src="/static/search.png" width="30" height="30" onclick="Search()" style="width:75%;height:75%;float:left;"></img>
<!--input type="submit" value="Search" onclick="Search()"></input-->
</div>
<!--div id="location_findme" style="float:right;">
<input type="submit" value="Find me" onclick="Get()"></input>
</div-->
</div>

<div id="container_body" class="containerstyle bg-style">

<div id="container_map" class="centered overflow">
<div id="map_map" style="float:left" class="centered overflow">
<div id="mapContainer"></div>
<!--iframe id="mapcanvas" width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;ll=37.0625,-95.677068&amp;spn=47.080837,85.78125&amp;t=m&amp;z=4&amp;output=embed"></iframe-->
</div>

<div id="map_weather" style="float:right;" class="overflow">
<div id="map_details" class="overflow">
<div id="details_plus" style="" class="plussign header1">
<a>+</a>
</div>
<div id="details_weather" style="float:left;" class="overflow">



<img width="100" height="100" src="/static/weather_sun.png"></img>


</div>
<div id="details_plus" style="" class="plussign header1">
<a>+</a>
</div>
<div id="details_satdata" style="width:30%;float:left;font-size:120%;">
<a>Satellite: {{data.name}} Satellite ID: {{data.id}}</a>
</div>
</div>
<div id="map_equals" style="padding-top:3%">
<a class="header1">=</a>
</div>
<div id="map_visibility" style="font-size:200%;">
<p>Visible from: {{data.results.0.start.time}}<br />Visible until: {{data.results.0.end.time}}</p>


<a>Viewing conditions</a>

</div>



</div>

<div id="container_conditions" style="clear:both;margin-top:5%" class="overflow">
<div id="conditions_weather" style="float:left;width:75%;">
<div id="conditions_weather_date">
<p>Tips for viewing!:</p>
<p>Visible from: {{data.results.0.start.time}}</p>
<p>Visible until: {{data.results.0.end.time}}</p>

</div>
<div id="conditions_weather_text">
<p>here i'll tell you it is a lovely day to be iss today. look at the weather mate
<br /> it is {weather_status}</p>
</div>

<div id="container_satellite" style="" class="centered overflow">

<div id="satellite_searchbar" style="float:left;width:20%;">
<a>Satellite ID: </a><input id="satellite_input" value="25544" onclick="ClearBox(this)" type="text" style="width:99%;"></input>
</div>
<div id="satellite_search" style="float:left;overflow:visible;">
<img src="/static/search.png" width="50" height="50" onclick="Search()" style="width:110%;height:110%;float:left;"></img>
</div>
<div id="satellite_link">
<a>Link: </a><a id="getlink" href="#">Error loading link. Is Javascript enabled?</a>
</div>

<div id="conditions_image" style="float:right;width:25%;height:25%">
<img width="100" height="100" src="/static/weather_sun.png"></img>

</div>
</div>

</div>
Expand Down

0 comments on commit 68dc7af

Please sign in to comment.