Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

got scroll bar working.

Beth Timmonsc02eb269a048
diff --git a/css/events.css b/css/events.css
index 11b9a4d06..b75734cd8 100644
--- a/css/events.css
+++ b/css/events.css
@@ -1,14 +1,44 @@
-.events{ display:inline-block; float:right; width: 210px; min-height:190px; max-height:300px; padding-bottom:20px; /*box-shadow: 0 0 4px 1px #bbb;*/ background: rgba(38,43,49,0.65); font: 10px/12px "Gill Sans","helvetica",sans-serif; color: #141b4c; border-radius: 10px 0 0 10px; text-shadow:none;overflow:auto;}
-.events h1,h2,h3,h4 {margin:0px; padding:0px;}
-.events h2 {display:inline-block; float: left; color:#fffbe7; font-size: 14px; font-weight:100; border:none; padding:6px 0;}
-.events h3 {display:inline-block; float: left; color:#fffb27; font-size: 12px; font-weight:100; border:none; text-decoration:none; }
-.events div,.events ul {display:block; overflow:auto; width:100%; margin:0 auto; max-height:250px; }
-.events ul h3 {}
+#eventsHolder {
+ display:block;
+ float:right;
+ z-index:200;
+ width:238px;
+ height:300px;
+ position:absolute;
+ right:0;
+ top:30%;
+ font: 10px/12px "Gill Sans","helvetica",sans-serif;
+ text-shadow:none;
+ color: #141b4c;
+}
+
+#events {
+ display: block;
+ float: right;
+ right: 0;
+ position: relative;
+}
+.events {
+ display:block;
+ position:relative;
+ float:right;
+ width: 210px;
+ min-height:275px;
+ max-height:300px;
+ background: none repeat scroll 0 0 rgba(38, 43, 49, 0.65);
+ border-radius: 10px 0 0 10px;
+ overflow:hidden;
+}
+.events h1,h2,h3,h4 {margin:0px; padding:0px; position:relative;}
+.events h2 {display:block; float: left; color:#fffbe7; font-size: 14px; font-weight:100; border:none; padding:6px 0;}
+.events h3 {display:block; float: left; color:#fffb27; font-size: 12px; font-weight:100; border:none; text-decoration:none; }
+.events div,.events ul {display:block; overflow:hidden; width:100%; margin:0 auto;}
+.events ul h3 {}
/* blue header bar */
-.events div.header {margin: auto; text-align: center;
+.events div.header {margin: auto; text-align: center; position:relative;
background: -moz-linear-gradient(top, rgba(255,255,255,0.7) 0%, rgba(11,95,160,0.7) 23%, rgba(0,88,156,0.7) 24%, rgba(0,81,144,0.7) 99%, rgba(0,81,144,0.7) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.7)), color-stop(23%,rgba(11,95,160,0.7)), color-stop(24%,rgba(0,88,156,0.7)), color-stop(99%,rgba(0,81,144,0.7)), color-stop(100%,rgba(0,81,144,0.7))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Chrome10+,Safari5.1+ */
@@ -21,14 +51,16 @@
.events div.header h2{margin: auto; text-align: center; float: none}
/* entry list */
-.events ul.entry { min-height:50px;}
+.events ul {max-height:240px;}
+.events ul.entry { min-height:50px; }
.events ul.entry li h3 {display:block; clear:both; float:none;}
/* entry list items */
+/*border:solid; border-width:3px; border-color:transparent;*/
.events li.item {
border:solid; border-width:3px; border-color:transparent;
- padding:0; display:block; width:192px; max-width:192px; padding:8px 9px 8px 3px;
+ padding:0; display:block; width:188px; max-width:188px; padding:8px 9px 8px 3px;
background: -moz-linear-gradient(top, rgba(0,0,0,0.54) 0%, rgba(2,2,2,0.54) 1%, rgba(78,78,78,0.54) 50%, rgba(0,0,0,0.54) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.24)), color-stop(1%,rgba(2,2,2,0.24)), color-stop(50%,rgba(78,78,78,0.24)), color-stop(100%,rgba(0,0,0,0.24))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,0.24) 0%,rgba(2,2,2,0.24) 1%,rgba(78,78,78,0.24) 50%,rgba(0,0,0,0.24) 100%); /* Chrome10+,Safari5.1+ */
diff --git a/css/sote.css b/css/sote.css
index 41193a410..bccad62e0 100644
--- a/css/sote.css
+++ b/css/sote.css
@@ -55,7 +55,7 @@ div.horizontalContainer {width:100%; display:block; float:left; position:absolu
#products {display:block; float:left; position:relative; left:0; }
-#events { z-index:200; display:block; float:right; position:absolute; right:0; top:30%;}
+
#banner {
display:block; z-index:291; float:left; position:relative; width:100%; height: 49px; background: transparent url("../images/toolbarbg.png");
diff --git a/index.html b/index.html
index 4523fe738..146216263 100644
--- a/index.html
+++ b/index.html
@@ -146,7 +146,7 @@
<div id="hazard"></div>
<div id="productsHolder"></div>
<div id="map"></div>
- <div id="events"></div>
+ <div id="eventsHolder"></div>
<div id="imagedownload"></div>
<div id="dlMap"></div>
diff --git a/js/events.js b/js/events.js
index 8eca5006a..d2d8f04a6 100644
--- a/js/events.js
+++ b/js/events.js
@@ -79,6 +79,28 @@ SOTE.widget.Events.handleMetaSuccess = function(arg) {
instr:eInstr
};
+ eTitle = "Dust Plumes off Argentina";
+ eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81120;src=nhrss";
+ eCategory = "Dust, Smoke, and Haze";
+ eImage = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81120/argentina_amo_2013132.jpg";
+ eDescription = "Dust plumes blew out of southern Argentina and over the Atlantic Ocean in early May 2013.";
+ eTime = "2013-05-12";
+ ePoint = "55.418 -161.892";
+ eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81120/argentina_amo_2013132_geo.tif";
+ eSatellite = "Aqua";
+ eInstr = "MODIS";
+ self.meta[1] = {title:eTitle,
+ link:eLink,
+ category:eCategory,
+ image:eImage,
+ description:eDescription,
+ date:eTime,
+ point:ePoint,
+ geo:eGeoTiff,
+ sat:eSatellite,
+ instr:eInstr
+ };
+
eTitle = "Burning Fields near the Angara River";
eLink = "http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=81115;src=nhrss";
eCategory = "Fires";
@@ -89,7 +111,7 @@ SOTE.widget.Events.handleMetaSuccess = function(arg) {
eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81115/russia_amo_2013130_fires_geo.tif";
eSatellite = "Aqua";
eInstr = "MODIS";
- self.meta[1] = {title:eTitle,
+ self.meta[2] = {title:eTitle,
link:eLink,
category:eCategory,
image:eImage,
@@ -111,7 +133,7 @@ SOTE.widget.Events.handleMetaSuccess = function(arg) {
eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81092/sarabia_tmo_2013128_geo.tif";
eSatellite = "Terra";
eInstr = "MODIS";
- self.meta[2] = {title:eTitle,
+ self.meta[3] = {title:eTitle,
link:eLink,
category:eCategory,
image:eImage,
@@ -133,7 +155,7 @@ SOTE.widget.Events.handleMetaSuccess = function(arg) {
eGeoTiff = "http://eoimages.gsfc.nasa.gov/images/imagerecords/81000/81049/california_tmo_2013122_fires_geo.tif";
eSatellite = "Terra";
eInstr = "MODIS";
- self.meta[3] = {title:eTitle,
+ self.meta[4] = {title:eTitle,
link:eLink,
category:eCategory,
image:eImage,
@@ -145,7 +167,7 @@ SOTE.widget.Events.handleMetaSuccess = function(arg) {
instr:eInstr
};
- self.metaLength = 4;
+ self.metaLength = 5;
self.render();
self.fire();
@@ -172,6 +194,7 @@ SOTE.widget.Events.prototype.render = function() {
this.container.innerHTML = "";
var container = document.createElement("div");
+ container.setAttribute("id", "events");
container.setAttribute("class", "events");
var titleContainer = document.createElement("div");
@@ -289,6 +312,10 @@ SOTE.widget.Events.prototype.render = function() {
});
+ $("#eventList").mCustomScrollbar({horizontalScroll:false, advanced:{
+ updateOnContentResize: true
+ }});
+
// mark the component as ready in the registry if called via init()
if((this.initRenderComplete === false) && REGISTRY) {
this.initRenderComplete = true;
diff --git a/js/main.js b/js/main.js
index fe327141f..eeb5a4cad 100644
--- a/js/main.js
+++ b/js/main.js
@@ -65,7 +65,7 @@ $(function() {// Initialize "static" vars
var opacity = new Worldview.Widget.Opacity(config);
var epsg = new Worldview.Widget.EPSG(config);
- var ev = new SOTE.widget.Events("events", {mapWidget:m,
+ var ev = new SOTE.widget.Events("eventsHolder", {mapWidget:m,
paletteWidget:palettes,
switchWidget:ss,
bankWidget:p,