Interactive interface for browsing global, full-resolution satellite imagery
WV-336, WV-337, WV-338
Tilak Joshib5a12873f143
diff --git a/js/datePicker.js b/js/datePicker.jsindex 609365b8d..7788f50d6 100644--- a/js/datePicker.js+++ b/js/datePicker.js@@ -1,4 +1,4 @@-SOTE.namespace("SOTE.widget.MobileDatePicker");+SOTE.namespace("SOTE.widget.DatePicker");/**@@ -105,20 +105,24 @@ SOTE.widget.DatePicker.resize = function(e){if(!self.resizing){setTimeout(function(){if($(window).width() > 720){- self.current = self.ds;- val = self.mds.get();- self.mds.hide();- self.ds.show();- if(val)- self.ds.setValue(val);+ if(self.current != self.ds){+ self.current = self.ds;+ 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.mds.setValue(val);+ if(self.current != self.mds){+ self.current = self.mds;+ val = self.ds.get();+ self.ds.hide();+ self.mds.show();+ if(val)+ self.mds.setValue(val);+ }}self.changed = false;self.resizing = false;@@ -190,7 +194,7 @@ SOTE.widget.DatePicker.prototype.updateComponent = function(qs){**/SOTE.widget.DatePicker.prototype.loadFromQuery = function(qs){- this.current.loadFromQuery(qs);+ this.current.setValue(SOTE.util.extractFromQuery(this.id,qs));this.changed = true;};diff --git a/js/main.js b/js/main.jsindex 0488c0eaf..43009be16 100644--- a/js/main.js+++ b/js/main.js@@ -5,6 +5,9 @@ $(function() {// Initialize "static" varsvar mobileSafari = false;var hideURLbar = function() {+ /*if(document.documentElement.scrollHeight<window.outerHeight/window.devicePixelRatio)+ document.documentElement.style.height=(window.outerHeight/window.devicePixelRatio)+'px';+ setTimeout(window.scrollTo(1,1),0);*/window.scrollTo(0, 1);};@@ -25,13 +28,14 @@ $(function() {// Initialize "static" vars// Set the div heightfunction setHeight($body) {- var new_height = $(window).height();- // if mobileSafari add +60px- if (mobileSafari){+ if (navigator.userAgent.indexOf('iPhone') != -1 && navigator.userAgent.indexOf('Safari')!=-1) {+ var new_height = $(window).height();+ // if mobileSafari add +60pxnew_height += 60;$body.css('min-height', 0 );$body.css('height', new_height );- };++ }}diff --git a/js/products.js b/js/products.jsindex 9a3e22e3a..e1db21800 100644--- a/js/products.js+++ b/js/products.js@@ -148,7 +148,7 @@ SOTE.widget.Products.prototype.render = function(){var self = this;$(window).resize(function(){self.b.render();- self.s.render();+ self.s.resize();self.adjustAlignment();});};diff --git a/js/selector.js b/js/selector.jsindex f2fa11966..6cde1cae6 100644--- a/js/selector.js+++ b/js/selector.js@@ -165,6 +165,12 @@ SOTE.widget.Selector.prototype.render = function(){};+SOTE.widget.Selector.prototype.resize = function (){+ var tabs_height = $(".ui-tabs-nav").outerHeight(true);+ $('#'+this.id).height($('#'+this.id).parent().outerHeight() - tabs_height);+ setTimeout(SOTE.widget.Selector.adjustCategoryHeights,1,{self:this});+};+SOTE.widget.Selector.callRender = function (e){e.data.self.openCat = null;e.data.self.render();