Interactive interface for browsing global, full-resolution satellite imagery
Fixed: * WV-366 * WV-369 * WV-371 * WV-372
Tilak Joshi0309a0c6a9ca
diff --git a/css/products.css b/css/products.cssindex 5109c3675..abc0d6894 100644--- a/css/products.css+++ b/css/products.css@@ -1,4 +1,4 @@-.products {display:block; float:left; z-index:295; min-width:238px; width:18%; height:65%; position:relative; overflow:hidden;+.products {display:block; float:left; z-index:2; min-width:238px; width:18%; height:65%; position:relative; overflow:hidden;background: rgba(38,43,49,0.65); border-radius:0 10px 10px 0;}@@ -39,7 +39,7 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', e@media screen and (max-width: 720px) and (orientation: portrait){.products {display:block; float:left; min-width:238px; width:100%; height:100%; position:absolute !important; overflow:hidden;- background: rgba(38,43,49,0.95); border-radius:0 10px 10px 0; top:0;}+ background: rgba(38,43,49,0.95); border-radius:0 10px 10px 0; top:0; z-index:295;}.bank { height:96%;/*box-shadow: 0 0 4px 1px #bbb;*/ }#selectorboxcontent { max-height:97%;}.bank li.item a {float:right; color:#fff; margin-right:1.6em;}@@ -51,7 +51,7 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', ebackground: -o-linear-gradient(top, rgba(0,0,0,0.5) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.7) 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top, rgba(0,0,0,0.5) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.7) 100%); /* IE10+ */background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.7) 100%); /* W3C */- }+ }}diff --git a/js/bank.js b/js/bank.jsindex 3c1763ac7..5013322cb 100644--- a/js/bank.js+++ b/js/bank.js@@ -59,7 +59,6 @@ SOTE.widget.Bank = function(containerId, config){//console.log("state: " + this.state);this.selected = config.selected;this.values = this.unserialize(this.selected[this.state]);- this.count = this.getCount(this.selected[this.state]);this.dataSourceUrl = config.dataSourceUrl;//console.log("dataSourceUrl: " + this.dataSourceUrl);@@ -136,7 +135,6 @@ SOTE.widget.Bank.handleMetaSuccess = function(data,status,xhr,args){else{self.values = null;self.values = self.unserialize(self.selected[self.state]);- self.count = self.getCount(self.selected[self.state]);self.render();self.fire();}@@ -570,7 +568,6 @@ SOTE.widget.Bank.prototype.fire = function(){*/SOTE.widget.Bank.prototype.setValue = function(valString){- this.count = this.getCount(valString);this.values = this.unserialize(valString);var valid = true;var self = this;@@ -580,15 +577,6 @@ SOTE.widget.Bank.prototype.setValue = function(valString){};-SOTE.widget.Bank.prototype.getCount = function(string){- var categories = string.split("~");- var count = 0;- for(var i=0; i<categories.length; ++i){- count += categories[i].split(/[\.,]/).length - 1;- }- return count;-};-SOTE.widget.Bank.prototype.currCount = function(){return this.count;};@@ -640,6 +628,8 @@ SOTE.widget.Bank.prototype.unserialize = function(string){var unserialized = new Object;var hideIndicator = /^!/;var categories = string.split("~");+ var values = [];+ this.count = 0;for(var i=0; i<categories.length; i++){var items = categories[i].split(/[\.,]/);unserialized[items[0]] = new Array;@@ -651,15 +641,21 @@ SOTE.widget.Bank.prototype.unserialize = function(string){items[j] = items[j].replace(/!/g, "");this.hidden[items[j]] = 1;}- else {- delete this.hidden[items[j]];- }- unserialized[items[0]].push({"value":items[j]});+ unserialized[items[0]].push({"value":items[j]});+ values.push(items[j]);+ this.count++;}}}++ for(var key in this.hidden){+ if( values.indexOf(key) < 0 ){+ delete this.hidden[key];+ }+ }+return unserialized;};