Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fixed the following:

Tilak Joshi5a864d62cd5e
diff --git a/css/bank.css b/css/bank.css
index 6fc017e6c..83e6523f6 100644
--- a/css/bank.css
+++ b/css/bank.css
@@ -51,9 +51,9 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99000000', e
.bank ul.category { overflow:auto; }
.bank ul.category li h3 {display:block; clear:both; float:none;}
img.bank-item-img { display:block; height: 14px; width:auto;}
-span.p-min {float:left;}
-span.p-max {float:left;}
-span.p-units {float:left;}
+span.p-min {float:left; font-size:0.8em;}
+span.p-max {float:left; font-size: 0.8em;}
+span.p-units {float:left; font-size:0.8em;}
.ui-tabs-hide {/*display:none !important;*/ position:absolute !important; left:-999em !important;}
diff --git a/css/dateSpan.css b/css/dateSpan.css
index f278af63a..dfb5f254b 100644
--- a/css/dateSpan.css
+++ b/css/dateSpan.css
@@ -2,6 +2,8 @@
#timemds {display:none;}
div.dwv, div.dwl, div.dw-i { font-weight:700; }
+.dwbw {width: 40%;}
+.dwb-c {display:none;}
.datespan ul, menu, dir{
-webkit-margin-before: 0em;
diff --git a/css/sote.css b/css/sote.css
index 5ba5a3fae..8c49eaf55 100644
--- a/css/sote.css
+++ b/css/sote.css
@@ -65,11 +65,15 @@ div.horizontalContainer {width:100%; display:block; float:left; position:absolu
#products {display:block; float:left; position:relative; left:0; }
#banner {
- display:block; z-index:291; float:left; position:relative; width:100%; height: 49px; background: transparent url("../images/toolbarbg.png");
+ display:block; z-index:291; float:left; position:relative; width:100%; background: transparent url("../images/toolbarbg.png");
}
+
+#wvlogo {background: transparent url('../images/logo.png') no-repeat center; width:154px; height:27px; padding:8px 5px; display:inline-block;}
#banner img.logo {padding:11px 5px;}
-#banner ul {float:right;}
-#banner ul li {display:block; float:right; margin:3px 3px;}
+#banner ul {float:right; }
+#banner ul li {display:block; float:right; margin:3px 3px; line-height:0; }
+#banner ul li div {line-height:0;}
+#banner .toolbar-link {display:inline-block; line-height:0; }
#hazard, #transition {z-index:1007; clear:both; float:left; display:block; position:relative; }
@@ -204,4 +208,8 @@ div.horizontalContainer {width:100%; display:block; float:left; position:absolu
border-color: yellow;
}
+@media screen and (max-width: 360px) and (orientation: portrait){
+ #wvlogo { width:32px; background-position: 6px center;}
+}
+
diff --git a/index.html b/index.html
index abaad0104..9a55207ef 100644
--- a/index.html
+++ b/index.html
@@ -157,18 +157,16 @@
<body class="yui-skin-sam">
<div data-role="page" id="mappage">
<div data-role="content">
- <div id="banner"><img class='logo' src='images/logo.png' />
+ <div id="banner"><div id='wvlogo'></div>
<ul id="toolbarlist">
- <li><!--<a id='aboutus_link' class='toolbaricon' title='Information' href='javascript:showOverlay();'>--><div id='info_drop'><div id='info' title='Information'><img src='images/information.png' /></div><div class='hidden'><a href="mailto:[email protected]?subject=Feedback for EOSDIS Worldview tool" target="_blank" title='Feedback'>Feedback</a><a href='javascript:Worldview.Tour.start(true);' title='Start Tour'>Start Tour</a><a href='javascript:Worldview.About.show();' title='About Worldview'>About</a></div></div><!--</a>--></li>
- <!--<li><a id='camera_link' class='toolbaricon' href='javascript:showRubberBand();'><img src='images/camera.png' /></a></li>-->
- <li><div id='camera'></div></li>
- <li><div id="switch"></div></li>
- <li><a id='perma_link' class='toolbaricon' title='Permalink' href='javascript:Worldview.Permalink.show();'><img src='images/permalink.png' /></a></li>
+ <li class='toolbar-icon'><div id='info_drop'><div id='info' title='Information'><img src='images/information.png' /></div><div class='hidden'><a href="mailto:[email protected]?subject=Feedback for EOSDIS Worldview tool" target="_blank" title='Feedback'>Feedback</a><a href='javascript:Worldview.Tour.start(true);' title='Start Tour'>Start Tour</a><a href='javascript:Worldview.About.show();' title='About Worldview'>About</a></div></div></li>
+ <li class='toolbar-icon'><div id='camera'></div></li>
+ <li class='toolbar-icon'><div id="switch"></div></li>
+ <li class='toolbar-icon'><a id='perma_link' class='toolbar-link' title='Permalink' href='javascript:Worldview.Permalink.show();'><img src='images/permalink.png' /></a></li>
</ul>
</div>
- <!--<div id="aboutus"><a id='aboutus_link' class='aboutus_link' href='javascript:showOverlay();'><img src='images/aboutIcon.png' /></a></div>
- <div id="permalink"><a id='perma_link' class='aboutus_link' href='javascript:showPermalink();'><img src='images/permalinkIcon.png' /></a></div>-->
+
<div id="hazard"></div>
<div id="productsHolder"></div>
<div id="map"></div>
diff --git a/js/bank.js b/js/bank.js
index 7fb81e87e..bea9a140d 100644
--- a/js/bank.js
+++ b/js/bank.js
@@ -301,7 +301,7 @@ SOTE.widget.Bank.prototype.render = function(){
var api = this.jsp.data('jsp');
if(api) api.destroy();
}
- this.jsp = $( "." + this.id + "category" ).jScrollPane({autoReinitialise: true});
+ this.jsp = $( "." + this.id + "category" ).jScrollPane({autoReinitialise: true, verticalGutter:0});
}
$( "." + this.id + "category li" ).disableSelection();
$( "." + this.id + "category" ).bind('sortstop',{self:this},SOTE.widget.Bank.handleSort);
diff --git a/js/datePicker.js b/js/datePicker.js
index f645639e7..eb4206701 100644
--- a/js/datePicker.js
+++ b/js/datePicker.js
@@ -92,26 +92,35 @@ SOTE.widget.DatePicker.prototype.init = function(){
SOTE.widget.DatePicker.handleFire = function(e,value){
var self = e.data.self;
- if(self.current.id == self.ds_id) self.mds.set(value); else self.ds.set(value);
+ self.changed = true;
+ //if(self.current.id == self.ds_id) self.mds.set(value); else self.ds.set(value);
self.fire();
};
SOTE.widget.DatePicker.resize = function(e){
var self = e.data.self;
+ var val = null;
if(!self.resizing){
setTimeout(function(){
if($(window).width() > 720){
self.current = self.ds;
- self.ds.show();
+ val = self.mds.get();
self.mds.hide();
+ self.ds.show();
+ if(val)
+ self.ds.setValue(val);
}
else {
self.current = self.mds;
+ val = self.ds.get();
self.ds.hide();
self.mds.show();
+ if(val)
+ self.ds.setValue(val);
}
+ self.changed = false;
self.resizing = false;
}, 1000);
}
@@ -144,8 +153,8 @@ SOTE.widget.DatePicker.prototype.fire = function(){
*
*/
SOTE.widget.DatePicker.prototype.setValue = function(value){
- this.ds.setValue(value);
- this.mds.setValue(value);
+ this.current.setValue(value);
+ this.changed = true;
};
/**
@@ -181,8 +190,8 @@ SOTE.widget.DatePicker.prototype.updateComponent = function(qs){
*
*/
SOTE.widget.DatePicker.prototype.loadFromQuery = function(qs){
- this.ds.loadFromQuery(qs);
- this.mds.loadFromQuery(qs);
+ this.current.loadFromQuery(qs);
+ this.changed = true;
};
/**
diff --git a/js/dateSpan.js b/js/dateSpan.js
index da5d4feac..3d03f7b3c 100644
--- a/js/dateSpan.js
+++ b/js/dateSpan.js
@@ -533,10 +533,6 @@ SOTE.widget.DateSpan.prototype.setValue = function(value){
}
};
-SOTE.widget.DateSpan.prototype.set = function(value){
- this.value = value;
-};
-
SOTE.widget.DateSpan.prototype.setVisualDate = function(){
var dateString = this.value.toISOStringDate();
$('#'+this.id+'dateHolder').html(dateString);
diff --git a/js/mobileDateSpan.js b/js/mobileDateSpan.js
index 3c0020f4e..30ab14e80 100644
--- a/js/mobileDateSpan.js
+++ b/js/mobileDateSpan.js
@@ -36,6 +36,7 @@ SOTE.widget.MobileDateSpan = function(containerId, config){
this.id = containerId;
//Store the container's ID
this.containerId=containerId;
+ this.MSEC_TO_MIN = 1000*60;
//Define an object for holding configuration
if (config===undefined){
@@ -72,7 +73,7 @@ SOTE.widget.MobileDateSpan = function(containerId, config){
this.startDate = config.startDate;
this.endDate = config.endDate;
this.isCollapsed = config.isCollapsed;
- this.value = config.selected;
+ this.value = config.selected;
this.dataSourceUrl = config.dataSourceUrl;
this.statusStr = "";
this.init();
@@ -99,7 +100,7 @@ SOTE.widget.MobileDateSpan.prototype.init = function(){
$("#linkmode").mobiscroll().date({display:"bottom",
onChange: function(valueText){
var d = new Date(valueText);
- self.setValue(d.toISOStringDate());
+ self.setValue(d.toISOStringDate(),true);
self.fire();
},
onShow: function(){
@@ -108,10 +109,13 @@ SOTE.widget.MobileDateSpan.prototype.init = function(){
onClose: function(){
$("#linkmode").css("display","block");
},
- dateFormat: 'yyyy-mm-dd'
+ dateFormat: 'yyyy-mm-dd',
+ minDate: self.UTCToLocal(self.startDate),
+ maxDate: self.UTCToLocal(self.endDate),
+ setText: 'OK'
});
- $("#linkmode").mobiscroll('setDate',this.value,true);
+ $("#linkmode").mobiscroll('setDate',this.UTCToLocal(this.value),true);
$("#linkmode").bind("onselect",function(){
alert("fire");
@@ -128,6 +132,15 @@ SOTE.widget.MobileDateSpan.prototype.init = function(){
};
+/* This function is adjusts the UTC time to local for interaction with the mobiscroll widget
+ * The mobiscroll widget shows the mobile slider and only supports local time
+ */
+SOTE.widget.MobileDateSpan.prototype.UTCToLocal = function(d){
+ var timezoneOffset = d.getTimezoneOffset()*this.MSEC_TO_MIN;
+
+ return new Date(d.getTime() + timezoneOffset);
+};
+
SOTE.widget.MobileDateSpan.prototype.getToday = function() {
// If at the beginning of the day, wait on the previous day until GIBS
// catches up.
@@ -168,24 +181,23 @@ SOTE.widget.MobileDateSpan.prototype.fire = function(){
* @returns {boolean} true or false depending on if the passed in date validates
*
*/
-SOTE.widget.MobileDateSpan.prototype.setValue = function(value){
+SOTE.widget.MobileDateSpan.prototype.setValue = function(value, noRender){
var d;
try {
var d = value ? Date.parseISOString(value)
: this.getToday();
+ var changed = false;
+ if ( this.value.compareTo(d) !== 0 )
+ changed = true;
} catch ( error ) {
this.log.warn("Invalid time: " + value + ", reason: " + error +
"; using today");
d = Worldview.today();
}
this.value = d;
- $("#linkmode").mobiscroll('setDate',this.value,true);
-
-};
-
-SOTE.widget.MobileDateSpan.prototype.set = function(value){
- this.value = value;
- $("#linkmode").mobiscroll('setDate',this.value,true);
+ if(!noRender && changed){
+ $("#linkmode").mobiscroll('setDate',this.UTCToLocal(this.value),true);
+ }
};
@@ -292,6 +304,7 @@ SOTE.widget.MobileDateSpan.prototype.getStatus = function(){
*/
SOTE.widget.MobileDateSpan.prototype.hide = function(){
$("#"+this.id).css("display","none");
+ $("#linkmode").mobiscroll('hide',true);
};
/**
diff --git a/js/rubberBand.js b/js/rubberBand.js
index 371a4f097..7815bba1c 100644
--- a/js/rubberBand.js
+++ b/js/rubberBand.js
@@ -59,7 +59,7 @@ SOTE.widget.RubberBand.prototype = new SOTE.widget.Component;
SOTE.widget.RubberBand.prototype.init = function(){
this.container.setAttribute("class","rubberband");
- this.container.innerHTML = "<a id='"+this.id+"camera_link' class='toolbaricon' title='Take a snapshot'><img src='"+this.icon+"' /></a>";
+ this.container.innerHTML = "<a id='"+this.id+"camera_link' class='toolbar-link' title='Take a snapshot'><img src='"+this.icon+"' /></a>";
$('#'+this.id+"camera_link").bind('click',{self:this},SOTE.widget.RubberBand.toggle);
if(REGISTRY){