Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-987: Style updates to data download

Mike McGann71598accfc53
diff --git a/src/css/dataDownload.css b/src/css/dataDownload.css
index aa89e540e..5a5e8c0d6 100644
--- a/src/css/dataDownload.css
+++ b/src/css/dataDownload.css
@@ -49,6 +49,7 @@
}
#wv-data-selection li {
+ font: 100 10px/10px "Lucida Sans",Monaco,monospace;
margin-top: 3px;
display: list-item;
list-style-type: none;
@@ -100,7 +101,6 @@
#wv-data-selection td {
border-bottom: 1px solid #404040;
padding: 5px;
- vertical-align: top;
}
#wv-data-selection .remove {
@@ -153,6 +153,28 @@
padding: 0 0 0.5em 2.5em;
}
+#wv-data-bulk-download-links {
+ border-top: 1px solid #bebebe;
+}
+
+#wv-data-bulk-download-links div.bulk {
+ padding: 10px;
+}
+
+#wv-data-bulk-download-links h5 {
+ font-size: 11pt;
+ font-weight: 700;
+ margin: 0 0 10px 0;
+ color: #FFFBE7;
+}
+
+#wv-data-bulk-download-links li {
+ list-style-type: disc;
+ margin-left: 10px;
+ display: list-item;
+ margin-top: 3px;
+}
+
.wv-data-unavailable-header {
color: #eeeeee;
font-size: 12pt;
@@ -162,14 +184,12 @@
#wv-data-selection-notice {
width: 80%;
- margin: 0 auto;
- border-radius: 5px;
- background-color: #eee;
+ margin: 0 auto 15px auto;
padding: 5px;
}
#wv-data-selection-notice .icon {
- color: #404040;
+ color: #fffbe7;
width: 32px;
height: 32px;
float: left;
@@ -177,9 +197,10 @@
#wv-data-selection-notice .text {
margin-left: 47px;
- color: #404040;
+ color: #fffbe7;
}
+/*
#wv-data-selection-notice .text a {
color: #444;
}
@@ -187,6 +208,7 @@
#wv-data-selection-notice .text a:hover {
color: #24d;
}
+*/
/*
#DataDownload_GranuleList .button {
diff --git a/src/css/wv.main.css b/src/css/wv.main.css
index 8345ff2cd..2f07730f7 100644
--- a/src/css/wv.main.css
+++ b/src/css/wv.main.css
@@ -157,7 +157,7 @@ div.horizontalContainer {width:100%; display:block; float:left; position:absolu
#wv-toolbar li{
display:inline-block;
margin:0;
- background:rgba(40,40,40,0.85);
+ background:rgba(40,40,40,0.85);
border:1px solid #333;
border-radius:5px;
}
@@ -235,10 +235,24 @@ border-radius:0;
color: #000;
}
+a {
+ color: #8cf;
+ text-decoration: none;
+}
+
+.ui-widget-content a {
+ color: #8cf;
+ text-docoration: none;
+}
+
a:hover {
color: #8cf;
}
+.ui-menu-item a {
+ color: #fff;
+}
+
.ui-accordion .ui-accordion-content {
background: rgba(0, 0, 0, 0);
}
diff --git a/src/js/data/wv.data.ui.js b/src/js/data/wv.data.ui.js
index e7231aef3..d600137d4 100644
--- a/src/js/data/wv.data.ui.js
+++ b/src/js/data/wv.data.ui.js
@@ -320,7 +320,7 @@ wv.data.ui = wv.data.ui || function(models, ui, config) {
$("#" + productId + "dynamictext").html("" + count + " selected");
});
if ( downloadListPanel && downloadListPanel.visible() ) {
- downloadListPanel.show();
+ downloadListPanel.refresh();
}
};
@@ -508,16 +508,23 @@ wv.data.ui.downloadListPanel = function(config, model) {
self.events = wv.util.events();
self.show = function() {
- selection = reformatSelection();
- var newPanel = false;
$dialog = wv.ui.getDialog()
- .attr("id", "wv-data-selection")
- .html(bodyText(selection));
+ .attr("id", "wv-data-selection");
+
$dialog.dialog({
title: "Download Links",
width: 600,
- height: 400
+ height: 400,
+ autoOpen: false
});
+ var $bottomPane = $("<div></div>")
+ .attr("id", "wv-data-bulk-download-links")
+ .addClass("ui-dialog-buttonpane")
+ .addClass("ui-widget-content")
+ .addClass("ui-helper-clearfix")
+ .html(bulkDownloadText());
+ $(".ui-dialog").append($bottomPane);
+ $dialog.dialog("open");
$("#wv-data-selection a.wget").click(showWgetPage);
$("#wv-data-selection a.curl").click(showCurlPage);
@@ -525,16 +532,6 @@ wv.data.ui.downloadListPanel = function(config, model) {
$("#wv-data-selection tr").on("mouseenter", onHoverOver);
$("#wv-data-selection tr").on("mouseleave", onHoverOut);
- var bulkVisible = isBulkDownloadable() &&
- _.size(model.selectedGranules) !== 0;
- if ( bulkVisible ) {
- $("#wv-data-selection .ft .bulk")
- .css("visibility", "visible");
- } else {
- $("#wv-data-selection .ft .bulk")
- .css("visibility", "hidden");
- }
-
$dialog.find(".collapse").accordion({
collapsible: true,
active: false,
@@ -546,6 +543,20 @@ wv.data.ui.downloadListPanel = function(config, model) {
$dialog.on("dialogclose", function() {
self.events.trigger("close");
});
+ self.refresh();
+ };
+
+ self.refresh = function() {
+ console.log("refresh");
+ selection = reformatSelection();
+ $("#wv-data-selection").html(bodyText(selection));
+ var bulkVisible = isBulkDownloadable() &&
+ _.size(model.selectedGranules) !== 0;
+ if ( bulkVisible ) {
+ $("wv-data-bulk-download-links").show();
+ } else {
+ $("wv-data-bulk-download-links").hide();
+ }
};
self.hide = function() {
@@ -717,16 +728,7 @@ wv.data.ui.downloadListPanel = function(config, model) {
"<h3>" + product.name + "</h3>"
];
- if ( product.links && product.links.length > 0 ) {
- elements.push("<div class='collapse'>");
- elements.push("<h5>Data Collection Information</h5>");
- elements.push("<div class='product'>");
- elements.push(linksText(product.links));
- elements.push("</div>");
- elements.push("</div>");
- }
-
- //elements.push("<h5>Selected Data</h5>");
+ elements.push("<h5>Selected Data</h5>");
elements.push("<table>");
$.each(product.list, function(index, item) {
@@ -734,6 +736,13 @@ wv.data.ui.downloadListPanel = function(config, model) {
});
elements.push("</table>");
+ if ( product.links && product.links.length > 0 ) {
+ elements.push("<h5>Data Collection Information</h5>");
+ elements.push("<div class='product'>");
+ elements.push(linksText(product.links));
+ elements.push("</div>");
+ }
+
return elements.join("\n");
};
@@ -745,14 +754,11 @@ wv.data.ui.downloadListPanel = function(config, model) {
if ( urs ) {
elements.push(NOTICE);
}
- if ( isBulkDownloadable() ) {
- elements.push(bulkDownloadText());
- }
var products = [];
$.each(selection, function(key, product) {
products.push(productText(product));
});
- elements.push(products.join("<br/>"));
+ elements.push(products.join("<br/><br/><br/>"));
var text = elements.join("");
return text;
};
@@ -762,10 +768,10 @@ wv.data.ui.downloadListPanel = function(config, model) {
"<div class='bulk collapse'>" +
"<h5>Bulk Download</h5>" +
"<ul class='BulkDownload'>" +
- "<li><a class='wget' href='#'>List of Links:</a> " +
+ "<li><a class='wget' href='#'>List of Links</a>: " +
"for wget or download managers that accept a list of " +
"URLs</li>" +
- "<li><a class='curl' href='#'>List of cURL Commands:</a> " +
+ "<li><a class='curl' href='#'>List of cURL Commands</a>: " +
"can be copied and pasted to " +
"a terminal window to download using cURL.</li>" +
"</ul>" +
diff --git a/src/pages/css/wv.document.css b/src/pages/css/wv.document.css
index 475b7ff2e..36508b616 100644
--- a/src/pages/css/wv.document.css
+++ b/src/pages/css/wv.document.css
@@ -54,15 +54,18 @@
}
.wv-document a {
- color: #eeeeee;
+ color: #8cf;
+ text-decoration: none;
}
.wv-document a:visted {
- color: #eeeeee;
+ color: #8cf;
+ text-decoration: none;
}
-.wv-document a:hover:link {
+.wv-document a:hover {
color: #8cf;
+ text-decoration: none;
}
.wv-document .right {