Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added sidebar icon

Mike McGann910c5ba9c721
diff --git a/web/css/products.css b/web/css/products.css
index 8dee0a4bf..3515cd426 100644
--- a/web/css/products.css
+++ b/web/css/products.css
@@ -90,7 +90,6 @@
.icon-layers { background-position:0 -10px; }
ul#productsHoldertabs .tab:hover i.icon-layers {background-position:0 20px;}
ul#productsHoldertabs li.ui-state-active .tab:hover i.icon-layers {background-position: 0 -10px;}
-.icon-download { background-position:-30px -10px; }
ul#productsHoldertabs .tab:hover i.icon-download { background-position:-30px 20px; }
ul#productsHoldertabs li.ui-state-active .tab:hover i.icon-download {background-position:-30px -10px;}
.icon-download-alt{ background-position:-60px -10px; }
@@ -99,6 +98,19 @@ ul#productsHoldertabs .tab:hover i.icon-add { background-position:-90px 20px;
ul#productsHoldertabs li.ui-state-active .tab:hover i.icon-add {background-position:-90px -10px;}
.icon-add-alt { background-position:-120px -10px; }
+.icon-events {
+ display:inline-block;
+ width: 20px;
+ height: 20px;
+ vertical-align: middle;
+ background: url(../images/events-icon.png);
+ margin:0;
+}
+
+.icon-events:hover {
+ background: url(../images/events-icon-highlight.png);
+}
+
/***********************************End Icons***********************************/
ul#productsHoldertabs li.ui-state-active i.productsIcon {
margin-right: 10px;
diff --git a/web/images/events-icon-highlight.png b/web/images/events-icon-highlight.png
new file mode 100644
index 000000000..2949c540a
Binary files /dev/null and b/web/images/events-icon-highlight.png differ
diff --git a/web/images/events-icon.png b/web/images/events-icon.png
new file mode 100644
index 000000000..5b518ad65
Binary files /dev/null and b/web/images/events-icon.png differ
diff --git a/web/js/layers/wv.layers.sidebar.js b/web/js/layers/wv.layers.sidebar.js
index 5d1720a28..c81dd4625 100644
--- a/web/js/layers/wv.layers.sidebar.js
+++ b/web/js/layers/wv.layers.sidebar.js
@@ -34,12 +34,12 @@ wv.layers.sidebar = wv.layers.sidebar || function(models, config) {
var HTML_TAB_ADD_UNSELECTED =
"<i class='productsIcon selected icon-add' title='Add Layers'></i>";
- var HTML_TAB_DOWNLOAD_SELECTED =
- "<i class='productsIcon selected icon-download'></i>" +
- "Download Data";
+ var HTML_TAB_EVENTS_SELECTED =
+ "<i class='selected icon-events'></i>" +
+ "Recent Events";
- var HTML_TAB_DOWNLOAD_UNSELECTED =
- "<i class='productsIcon selected icon-download' title='Download Data'></i>";
+ var HTML_TAB_EVENTS_UNSELECTED =
+ "<i class='selected icon-events' title='Recent Events'></i>";
var collapsed = false;
var collapseRequested = false;
@@ -70,7 +70,7 @@ wv.layers.sidebar = wv.layers.sidebar || function(models, config) {
$(self.selector).tabs("option", "active", 0);
} else if ( tabName === "add" ) {
$(self.selector).tabs("option", "active", 1);
- } else if ( tabName === "download" ) {
+ } else if ( tabName === "events" ) {
$(self.selector).tabs("option", "active", 2);
} else {
throw new Error("Invalid tab: " + tabName);
@@ -174,18 +174,16 @@ wv.layers.sidebar = wv.layers.sidebar || function(models, config) {
$addTab.append($addLink);
$tabs.append($addTab);
- if ( config.features.dataDownload ) {
- var $downloadTab = $("<li></li>")
- .addClass("layerPicker")
- .addClass("third")
- .attr("data-tab", "download");
- var $downloadLink = $("<a></a>")
- .attr("href", "#wv-data")
- .addClass("tab")
- .html(HTML_TAB_DOWNLOAD_UNSELECTED);
- $downloadTab.append($downloadLink);
- $tabs.append($downloadTab);
- }
+ var $eventsTab = $("<li></li>")
+ .addClass("layerPicker")
+ .addClass("third")
+ .attr("data-tab", "events");
+ var $eventsLink = $("<a></a>")
+ .attr("href", "#wv-events")
+ .addClass("tab")
+ .html(HTML_TAB_EVENTS_UNSELECTED);
+ $eventsTab.append($eventsLink);
+ $tabs.append($eventsTab);
$container.append($tabs);
var $collapseContainer = $("<div></div>")
@@ -261,14 +259,8 @@ wv.layers.sidebar = wv.layers.sidebar || function(models, config) {
HTML_TAB_ACTIVE_SELECTED : HTML_TAB_ACTIVE_UNSELECTED;
var tab2 = ( tab === "add" ) ?
HTML_TAB_ADD_SELECTED : HTML_TAB_ADD_UNSELECTED;
- var tab3 = ( tab === "download" ) ?
- HTML_TAB_DOWNLOAD_SELECTED : HTML_TAB_DOWNLOAD_UNSELECTED;
-
- if ( ui.index === "download" ) {
- self.events.trigger("dataDownloadSelect");
- } else {
- self.events.trigger("dataDownloadUnselect");
- }
+ var tab3 = ( tab === "events" ) ?
+ HTML_TAB_EVENTS_SELECTED : HTML_TAB_EVENTS_UNSELECTED;
self.events.trigger("before-select", tab);
diff --git a/web/js/wv.events.js b/web/js/wv.events.js
index 86b8a4488..888be0b1b 100644
--- a/web/js/wv.events.js
+++ b/web/js/wv.events.js
@@ -9,14 +9,15 @@
* All Rights Reserved.
*/
-var wv = wv || {}
+var wv = wv || {};
+
wv.events = wv.events || (function() {
var self = {};
self.query = function() {
console.log("DOING IT");
- $.getJSON("http://eonet.sci.gsfc.nasa.gov/events", function(data) {
+ $.getJSON("service/events/eo-net.cgi?path=/api/v1/events", function(data) {
console.log("GOT IT");
console.log(data);
});