Interactive interface for browsing global, full-resolution satellite imagery
Added notification dialog
Taylor Gunnoe53914508c22e
diff --git a/web/css/events.css b/web/css/events.cssindex 64655b5ae..d23937b77 100644--- a/web/css/events.css+++ b/web/css/events.css@@ -91,31 +91,69 @@ a.evexpand {top:380px;}-.events h1, .events h2, .events h3, .events h4 {margin:0px; padding:0px; position:relative; }-.events h2 {display:block; color:#fffbe7; font-size: 14px; font-weight:100; border:none; padding:6px 0;}-.events h3 {display:block; color:#fffb27; font-size: 12px; font-weight:100; border:none; text-decoration:none; }-.events div,.events ul {display:block; overflow:hidden; width:100%; margin:0 auto;}+.events h1, .events h2,+.events h3, .events h4 {+ margin:0px;+ padding:0px;+ position:relative;+}+.events h2 {+ display:block;+ color:#fffbe7;+ font-size: 14px;+ font-weight:100;+ border:none;+ padding:6px 0;+}+.events h3 {+ display:block;+ color:#fffb27;+ font-size: 12px;+ font-weight:100;+ border:none;+ text-decoration:none;+}+.events div,.events ul {+ display:block;+ overflow:hidden;+ width:100%;+ margin:0 auto;+}.events ul h3 {}/* blue header bar */.events div.header {- margin: auto; text-align: center; position:relative;- background: -moz-linear-gradient(top, rgba(255,255,255,0.7) 0%, rgba(11,95,160,0.7) 23%, rgba(0,88,156,0.7) 24%, rgba(0,81,144,0.7) 99%, rgba(0,81,144,0.7) 100%); /* FF3.6+ */- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.7)), color-stop(23%,rgba(11,95,160,0.7)), color-stop(24%,rgba(0,88,156,0.7)), color-stop(99%,rgba(0,81,144,0.7)), color-stop(100%,rgba(0,81,144,0.7))); /* Chrome,Safari4+ */- background: -webkit-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Chrome10+,Safari5.1+ */- background: -o-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Opera 11.10+ */- background: -ms-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* IE10+ */- background: linear-gradient(to bottom, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* W3C */- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', endColorstr='#b3005190',GradientType=0 ); /* IE6-9 */+ margin: auto;+ text-align: center;+ position:relative;+ background: -moz-linear-gradient(top, rgba(255,255,255,0.7) 0%, rgba(11,95,160,0.7) 23%, rgba(0,88,156,0.7) 24%, rgba(0,81,144,0.7) 99%, rgba(0,81,144,0.7) 100%); /* FF3.6+ */+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.7)), color-stop(23%,rgba(11,95,160,0.7)), color-stop(24%,rgba(0,88,156,0.7)), color-stop(99%,rgba(0,81,144,0.7)), color-stop(100%,rgba(0,81,144,0.7))); /* Chrome,Safari4+ */+ background: -webkit-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Chrome10+,Safari5.1+ */+ background: -o-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* Opera 11.10+ */+ background: -ms-linear-gradient(top, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* IE10+ */+ background: linear-gradient(to bottom, rgba(255,255,255,0.7) 0%,rgba(11,95,160,0.7) 23%,rgba(0,88,156,0.7) 24%,rgba(0,81,144,0.7) 99%,rgba(0,81,144,0.7) 100%); /* W3C */+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3ffffff', endColorstr='#b3005190',GradientType=0 ); /* IE6-9 */}-.events div.header h2{margin: auto; text-align: center; float: none}+.events div.header h2{+ margin: auto;+ text-align: center;+ float: none+}/* entry list */-.events ul {max-height:240px; height:240px;}-.events ul.entry { min-height:50px; }-.events ul.entry li h3 {display:block; clear:both; float:none;}-+.events ul {+ max-height:240px;+ height:240px;+}+.events ul.entry {+ min-height:50px;+}+.events ul.entry li h3 {+ display:block;+ clear:both;+ float:none;+}/* entry list items */.events li.item {diff --git a/web/css/wv.events.css b/web/css/wv.events.cssnew file mode 100644index 000000000..28efbafd3--- /dev/null+++ b/web/css/wv.events.css@@ -0,0 +1,25 @@+.notify-alert {+ position: absolute;+ top: 60px !important;+ right: 10px !important;+ left: auto !important;+}+.notify-alert i{+ font-size: 1.4em;+ height: 40px;+ box-sizing: border-box;+ line-height: 40px;+}+.notify-alert i:first-child{+ color: #d54e21;+ margin-right: 10px;+}+.notify-alert i:last-child{+ float: right;+ margin-left: 10px;+}+.notify-alert .ui-dialog-content {+ padding: 0 10px;+ box-sizing: border-box;+ line-height: 40px;+}diff --git a/web/index.html b/web/index.htmlindex 866c49b22..7b8829121 100644--- a/web/index.html+++ b/web/index.html@@ -86,6 +86,7 @@<!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/products.css"><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/indicator.css"><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/events.css">+ <!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/wv.events.css"><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/dataDownload.css"><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/global.css"><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="css/wv.sidebar.css">diff --git a/web/js/wv.events.js b/web/js/wv.events.jsindex d5a18365b..0f9b50bd4 100644--- a/web/js/wv.events.js+++ b/web/js/wv.events.js@@ -81,6 +81,9 @@ wv.events = wv.events || function(models, ui) {self.data = {};var lastIndex = -1;var lastDateIndex = -1;+ //Local storage may not be a good idea because they'll never see it again+ var notified = false;//wv.util.localStorage('notified') || false;+ var $notification;var init = function() {self.query();@@ -103,8 +106,6 @@ wv.events = wv.events || function(models, ui) {.addClass("bank").addClass("selector");- var $message = $('<div>Events may not be visible until the following day.</div>');-$panels.append($list);var $detailContainer = $("<div></div>")@@ -128,6 +129,7 @@ wv.events = wv.events || function(models, ui) {showEvent($(this).attr("data-index"));$(self.selector + "content li").removeClass('item-selected');$(this).addClass('item-selected');+ notify();});$(self.selector + "content a.date").click(function(event) {showEvent($(this).attr("data-index"), $(this).attr("data-date-index"));@@ -193,7 +195,6 @@ wv.events = wv.events || function(models, ui) {_.each(events, function(event) {$("#wv-events").append(createEvent(event));});- // $("#wv-events").jScrollPane();};var showEvent = function(index, dateIndex) {@@ -269,11 +270,52 @@ wv.events = wv.events || function(models, ui) {goTo(method, extent);}};- var notify = function() {- var $message = $('<div>Events may not be visible until the following day.</div>');+ var notify = function( text ) {+ var message = text || 'Events may not be visible ' ++ 'until the next day.';++ var $icon = $('<i></i>')+ .addClass('fa fa-warning')+ .addClass('fa-1x');++ var $close = $('<i></i>')+ .addClass('fa fa-times-circle-o')+ .addClass('fa-1x')+ .click(function(e){+ $notification.dialog( 'close' );+ });++ //$notification.clear();++ $notification = $('<div></div>')+ .append( $icon)+ .append( message )+ .append( $close );+ if ( !notified ){+ $notification.dialog({+ autoOpen: true,+ resizable: false,+ height: 40,+ width: 370,+ draggable: false,+ show: {+ effect: "fade",+ duration: 400+ },+ hide: {+ effect: "fade",+ duration: 200+ },+ dialogClass: 'no-titlebar notify-alert',+ close: function( event, ui ) {+ wv.util.localStorage( 'notified', !notified );+ }+ });+ }};var goTo = function(method, location) {+ //TODO: Seems to be starting zoom, make it current zoomvar zoom = 3;var map = ui.map.selected;var duration = ( method == "fly" ) ? 5000 : 1000;diff --git a/web/js/wv.tour.js b/web/js/wv.tour.jsindex 960b6bcfa..689fe0f9b 100644--- a/web/js/wv.tour.js+++ b/web/js/wv.tour.js@@ -125,15 +125,16 @@ wv.tour = wv.tour || function(models, ui, config) {var repeatTour = function(e) {e.stopPropagation();$(".ui-dialog-content").dialog("close");- $('#joyRideTipContent').joyride({adjustForPhone:false,- bordered:true,- includepage:true,- template : {'link':'<a href="#" class="joyride-close-tip">X</a>'},- postStepCallback : function (index, tip) {- if(index == 5) {- endTour();- }- }});+ $('#joyRideTipContent').joyride({+ adjustForPhone:false,+ bordered:true,+ includepage:true,+ template : {'link':'<a href="#" class="joyride-close-tip">X</a>'},+ postStepCallback : function (index, tip) {+ if(index == 5) {+ endTour();+ }+ }});};/*@@ -167,11 +168,12 @@ wv.tour = wv.tour || function(models, ui, config) {$(".ui-dialog-content").dialog("close");initTourState();- $('#joyRideTipContent').joyride({adjustForPhone:false,- bordered:true,- includepage:true,- template : {'link':'<a href="#" class="joyride-close-tip">X</a>'},- postStepCallback : onStop});+ $('#joyRideTipContent').joyride({+ adjustForPhone:false,+ bordered:true,+ includepage:true,+ template : {'link':'<a href="#" class="joyride-close-tip">X</a>'},+ postStepCallback : onStop});};/*